Openfire disconnected after sometime

Hi,

I have setup openfire and it’s working fine. Setup configuration are below

  1. Openfire 4.1.0

  2. Sever amazon

  3. Database and Version MySQL 5.6.33

  4. JDBC Driver Version mysql-connector-java-5.1.30

I can send message, receive message But problem is that after sometime it suddenly stopped. Don’t know the exact reason why it stopped. Some time openfire stopped some time mySql stopped. After execute re-start command everything start normally.

When It’s stopped error logs are below

line
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
2017.03.27 15:37:05 org.jivesoftware.openfire.http.HttpBindServlet - Error sending packet to client.
org.jivesoftware.openfire.http.HttpConnectionClosedException: The http connection is no longer available to deliver content
at org.jivesoftware.openfire.http.HttpConnection.deliverBody(HttpConnection.java:1 16)
at org.jivesoftware.openfire.http.HttpSession.forwardRequest(HttpSession.java:599)
at org.jivesoftware.openfire.http.HttpBindServlet.handleSessionRequest(HttpBindSer vlet.java:255)
at org.jivesoftware.openfire.http.HttpBindServlet.processContent(HttpBindServlet.j ava:210)
at org.jivesoftware.openfire.http.HttpBindServlet$ReadListenerImpl.onAllDataRead(H ttpBindServlet.java:428)
at org.eclipse.jetty.server.HttpInput.run(HttpInput.java:443)
at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1175 )
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:355)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635 )
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)
2017.03.28 04:07:50 org.jivesoftware.database.SchemaManager - SchemaManager: Failed to execute SQL:
ALTER TABLE ofMucConversationLog ADD INDEX ofMucConvLog_msg_id (messageID);
2017.03.28 04:07:50 org.jivesoftware.database.SchemaManager - Duplicate key name 'ofMucConvLog_msg_id’
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate key name 'ofMucConvLog_msg_id’
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1307)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)
at org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)
at $java.sql.Statement$$EnhancerByProxool$$e859cad7.execute()
at org.jivesoftware.database.SchemaManager.executeSQLScript(SchemaManager.java:380 )
at org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:282)
at org.jivesoftware.database.SchemaManager.checkOpenfireSchema(SchemaManager.java: 85)
at org.jivesoftware.database.DbConnectionManager.setConnectionProvider(DbConnectio nManager.java:606)
at org.jivesoftware.database.DbConnectionManager.ensureConnectionProvider(DbConnec tionManager.java:99)
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:121)
at org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:357)
at org.jivesoftware.util.JiveProperties.init(JiveProperties.java:88)
at org.jivesoftware.util.JiveProperties.getInstance(JiveProperties.java:66)
at org.jivesoftware.util.JiveGlobals.getProperty(JiveGlobals.java:548)
at org.jivesoftware.util.cache.CacheFactory.(CacheFactory.java:94)
at org.jivesoftware.openfire.XMPPServer.initialize(XMPPServer.java:311)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:414)
at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:163)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:105)
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:56)
2017.03.28 04:07:51 org.jivesoftware.openfire.vcard.VCardManager - Error loading vcard provider: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider
java.lang.ClassNotFoundException: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.jivesoftware.util.ClassUtils.loadClass(ClassUtils.java:76)
at org.jivesoftware.util.ClassUtils.forName(ClassUtils.java:48)
at org.jivesoftware.openfire.vcard.VCardManager.initialize(VCardManager.java:262)
at org.jivesoftware.openfire.XMPPServer.initModules(XMPPServer.java:538)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:427)
at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:163)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:105)
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:56)
2017.03.28 11:40:55 org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager - Error processing file transfer proxy connection
java.io.IOException: Only SOCKS5 supported
at org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager.processConn ection(ProxyConnectionManager.java:161)
at org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager.access$200( ProxyConnectionManager.java:58)
at org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager$1$1.run(Pro xyConnectionManager.java:130)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017.03.28 12:08:42 org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager - Error processing file transfer proxy connection
java.io.IOException: Only SOCKS5 supported
at org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager.processConn ection(ProxyConnectionManager.java:161)
at org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager.access$200( ProxyConnectionManager.java:58)
at org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager$1$1.run(Pro xyConnectionManager.java:130)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017.03.29 03:51:38 org.jivesoftware.database.SchemaManager - SchemaManager: Failed to execute SQL:
ALTER TABLE ofMucConversationLog ADD INDEX ofMucConvLog_msg_id (messageID);
2017.03.29 03:51:38 org.jivesoftware.database.SchemaManager - Duplicate key name 'ofMucConvLog_msg_id’
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate key name 'ofMucConvLog_msg_id’
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1307)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)
at org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)
at com.mysql.jdbc.Statement$$EnhancerByProxool$$acced92e.execute()
at org.jivesoftware.database.SchemaManager.executeSQLScript(SchemaManager.java:380 )
at org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:282)
at org.jivesoftware.database.SchemaManager.checkOpenfireSchema(SchemaManager.java: 85)
at org.jivesoftware.database.DbConnectionManager.setConnectionProvider(DbConnectio nManager.java:606)
at org.jivesoftware.database.DbConnectionManager.ensureConnectionProvider(DbConnec tionManager.java:99)
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:121)
at org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:357)
at org.jivesoftware.util.JiveProperties.init(JiveProperties.java:88)
at org.jivesoftware.util.JiveProperties.getInstance(JiveProperties.java:66)
at org.jivesoftware.util.JiveGlobals.getProperty(JiveGlobals.java:548)
at org.jivesoftware.util.cache.CacheFactory.(CacheFactory.java:94)
at org.jivesoftware.openfire.XMPPServer.initialize(XMPPServer.java:311)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:414)
at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:163)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:105)
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:56)
2017.03.29 03:51:39 org.jivesoftware.openfire.vcard.VCardManager - Error loading vcard provider: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider
java.lang.ClassNotFoundException: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.jivesoftware.util.ClassUtils.loadClass(ClassUtils.java:76)
at org.jivesoftware.util.ClassUtils.forName(ClassUtils.java:48)
at org.jivesoftware.openfire.vcard.VCardManager.initialize(VCardManager.java:262)
at org.jivesoftware.openfire.XMPPServer.initModules(XMPPServer.java:538)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:427)
at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:163)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:105)
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:56)

Is there any extra settings I missed? I’ve monitor it since 15 days, alternative days openfire was stopped.

Please give me any suggestions/ Instructions.

Thanks in advance.

I experienced the same behaviour. So I took a look at the database schema update statements in

/usr/share/openfire/resources/database/upgrade

The subfolder name seems to be the version, that can also be found in the database with

SELECT version FROM ofVersion WHERE name = ‘openfire’;

Within you will find statements by database type.

In my case the database schema version number was still 24, but the actual version 25 change (adding index “ofMucConvLog_msg_id”) had obviously been performed. As a quick fix I just updated the schema version number. Of course there is no warranty for this. It might be a bad solution, and a solution for you might differ. A full backup of the filesystem and database is recommended anyway.