powered by Jive Software

Openfire does not restart properly

My server was restarted today. Now users cannot connect to openfire server. Openfire tried to update the database from ver.10 to ver.11 and now I get a schema error:

org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:251)

java.sql.SQLException: Table ‘jivePresence’ already exists

Openfire 3.3.1

Centos 4.x

Mysql 5.x

From info.log:

2007.08.22 13:02:52 Found old database version 10 for openfire. Upgrading to version 11…

2007.08.22 13:03:09 Multi User Chat domain: conference.jabber.xxxx.com

2007.08.22 13:03:09 Publish-Subscribe domain: pubsub.jabber.xxxx.com

2007.08.22 13:03:09 Started server (unencrypted) socket on port: 5269

2007.08.22 13:03:09 Started plain (unencrypted) socket on port: 5222

2007.08.22 13:03:10 Started SSL (encrypted) socket on port: 5223

2007.08.22 13:03:12 Openfire 3.3.1

2007.08.22 13:03:13 Admin console listening at:

http://jabber.xxxx.com:9090

https://jabber.xxxx.com:9091

2007.08.22 13:09:47 Openfire stopped

2007.08.22 13:09:47 Server halted

2007.08.22 13:09:51 Found old database version 10 for openfire. Upgrading to version 11…

2007.08.22 13:09:52 Multi User Chat domain: conference.jabber.xxxx.com

2007.08.22 13:09:52 Publish-Subscribe domain: pubsub.jabber.xxxx.com

2007.08.22 13:09:52 Started server (unencrypted) socket on port: 5269

2007.08.22 13:09:52 Started plain (unencrypted) socket on port: 5222

2007.08.22 13:09:53 Started SSL (encrypted) socket on port: 5223

2007.08.22 13:09:54 Openfire 3.3.1

2007.08.22 13:09:55 Admin console listening at:

http://jabber.xxxx.com:9090

https://jabber.xxxx.com:9091

2007.08.22 13:50:12 Openfire stopped

2007.08.22 13:50:12 Server halted

2007.08.22 13:50:41 Found old database version 10 for openfire. Upgrading to version 11…

2007.08.22 13:50:46 Multi User Chat domain: conference.jabber.xxxx.com

2007.08.22 13:50:46 Publish-Subscribe domain: pubsub.jabber.xxxx.com

2007.08.22 13:50:46 Started server (unencrypted) socket on port: 5269

2007.08.22 13:50:46 Started plain (unencrypted) socket on port: 5222

2007.08.22 13:50:47 Started SSL (encrypted) socket on port: 5223

2007.08.22 13:50:48 Openfire 3.3.1

2007.08.22 13:50:49 Admin console listening at:

http://jabber.xxxx.com:9090

https://jabber.xxxx.com:9091om

From error.log:

2007.08.22 13:02:52 org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:251)

java.sql.SQLException: Table ‘jivePresence’ already exists

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1695)

at com.mysql.jdbc.Connection.execSQL(Connection.java:2998)

at com.mysql.jdbc.Connection.execSQL(Connection.java:2927)

at com.mysql.jdbc.Statement.execute(Statement.java:535)

at org.jivesoftware.database.SchemaManager.executeSQLScript(SchemaManager.java:348 )

at org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:248)

at org.jivesoftware.database.SchemaManager.checkOpenfireSchema(SchemaManager.java: 68)

at org.jivesoftware.database.DbConnectionManager.setConnectionProvider(DbConnectio nManager.java:467)

at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:77)

at org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:271)

at org.jivesoftware.util.JiveProperties.init(JiveProperties.java:70)

at org.jivesoftware.util.JiveProperties.<init>(JiveProperties.java:52)

at org.jivesoftware.util.JiveProperties.getInstance(JiveProperties.java:46)

at org.jivesoftware.util.JiveGlobals.getProperty(JiveGlobals.java:524)

at org.jivesoftware.openfire.XMPPServer.initialize(XMPPServer.java:286)

at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:383)

at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:148)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)

at java.lang.Class.newInstance(Class.java:303)

at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:93)

at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:49)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)

at com.install4j.runtime.Launcher.main(Unknown Source)

2007.08.22 13:09:51 org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:251)

java.sql.SQLException: Table ‘jivePresence’ already exists

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1695)

at com.mysql.jdbc.Connection.execSQL(Connection.java:2998)

at com.mysql.jdbc.Connection.execSQL(Connection.java:2927)

at com.mysql.jdbc.Statement.execute(Statement.java:535)

at org.jivesoftware.database.SchemaManager.executeSQLScript(SchemaManager.java:348 )

at org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:248)

at org.jivesoftware.database.SchemaManager.checkOpenfireSchema(SchemaManager.java: 68)

at org.jivesoftware.database.DbConnectionManager.setConnectionProvider(DbConnectio nManager.java:467)

at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:77)

at org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:271)

at org.jivesoftware.util.JiveProperties.init(JiveProperties.java:70)

at org.jivesoftware.util.JiveProperties.<init>(JiveProperties.java:52)

at org.jivesoftware.util.JiveProperties.getInstance(JiveProperties.java:46)

at org.jivesoftware.util.JiveGlobals.getProperty(JiveGlobals.java:524)

at org.jivesoftware.openfire.XMPPServer.initialize(XMPPServer.java:286)

at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:383)

at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:148)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)

at java.lang.Class.newInstance(Class.java:303)

at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:93)

at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:49)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)

at com.install4j.runtime.Launcher.main(Unknown Source)

2007.08.22 13:10:28 org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHandle r.java:109)

java.lang.IllegalStateException

at org.apache.mina.filter.support.SSLHandler.decrypt(SSLHandler.java:425)

at org.apache.mina.filter.support.SSLHandler.messageReceived(SSLHandler.java:297)

at org.apache.mina.filter.SSLFilter.messageReceived(SSLFilter.java:398)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)

at org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageReceived (AbstractIoFilterChain.java:617)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(Abstra ctIoFilterChain.java:353)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.j ava:246)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcesso r.java:206)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProce ssor.java:44)

at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProce ssor.java:506)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 650)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

at java.lang.Thread.run(Thread.java:595)

2007.08.22 13:10:58 org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHandle r.java:109)

java.lang.IllegalStateException

at org.apache.mina.filter.support.SSLHandler.decrypt(SSLHandler.java:425)

at org.apache.mina.filter.support.SSLHandler.messageReceived(SSLHandler.java:297)

at org.apache.mina.filter.SSLFilter.messageReceived(SSLFilter.java:398)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)

at org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageReceived (AbstractIoFilterChain.java:617)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(Abstra ctIoFilterChain.java:353)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.j ava:246)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcesso r.java:206)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProce ssor.java:44)

at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProce ssor.java:506)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 650)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

at java.lang.Thread.run(Thread.java:595)

2007.08.22 13:11:27 org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHandle r.java:109)

java.lang.IllegalArgumentException

at java.nio.Buffer.position(Buffer.java:218)

at org.apache.mina.filter.support.SSLHandler.messageReceived(SSLHandler.java:303)

at org.apache.mina.filter.SSLFilter.messageReceived(SSLFilter.java:398)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)

at org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageReceived (AbstractIoFilterChain.java:617)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(Abstra ctIoFilterChain.java:353)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.j ava:246)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcesso r.java:206)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProce ssor.java:44)

at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProce ssor.java:506)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 650)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

at java.lang.Thread.run(Thread.java:595)

2007.08.22 13:11:30 org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHandle r.java:109)

java.lang.IllegalArgumentException

at java.nio.Buffer.position(Buffer.java:218)

at org.apache.mina.filter.support.SSLHandler.messageReceived(SSLHandler.java:303)

at org.apache.mina.filter.SSLFilter.messageReceived(SSLFilter.java:398)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)

at org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageReceived (AbstractIoFilterChain.java:617)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(Abstra ctIoFilterChain.java:353)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.j ava:246)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcesso r.java:206)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProce ssor.java:44)

at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProce ssor.java:506)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 650)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

at java.lang.Thread.run(Thread.java:595)

2007.08.22 13:11:57 org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHandle r.java:109)

java.lang.IllegalArgumentException

at java.nio.Buffer.position(Buffer.java:218)

at org.apache.mina.filter.support.SSLHandler.messageReceived(SSLHandler.java:303)

at org.apache.mina.filter.SSLFilter.messageReceived(SSLFilter.java:398)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)

at org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageReceived (AbstractIoFilterChain.java:617)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(Abstra ctIoFilterChain.java:353)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.j ava:246)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcesso r.java:206)

at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProce ssor.java:44)

at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProce ssor.java:506)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43

Hi,

in /path-to-openfire_3_3_1/resources/database/upgrade/11/ you’ll find a script for your database, the content will look similar to:

CREATE TABLE jivePresence (

username VARCHAR(64) NOT NULL,

offlinePresence LONGVARCHAR,

offlineDate VARCHAR(15) NOT NULL,

CONSTRAINT jivePresence_pk PRIMARY KEY (username)

);

UPDATE jiveVersion set version=11 where name = ‘openfire’;

So I guess that the CREATE statement was executed while the UPDATE statement was not. Connect to your database manually and execute the UPDATE statement and a “COMMIT;” unless you have auto-commit enabled.

LG

I ran the update statement with no issues. My users still cannot login with Spark: Invalid username or password. Changing the password seems to fix it. I do not see any new errors. I prefer not to change all user passwords. Is there a fix to this?

Hi,

that’s a little bit weird as adding this table does not change the passwords.

Do you use passwords with non-ASCII / UTF-8 characters and your MySQL installation does not support these properly? Do the new passwords still work if you restart Openfire?

LG

We don’t do anything weird with passwords. The changed passwords still work after restarting openfire.