Skip navigation
5087 Views 3 Replies Latest reply: Nov 25, 2009 6:02 AM by tnserra RSS
Jeffrey Montgomery Bronze 6 posts since
Jul 10, 2008
Currently Being Moderated

Nov 3, 2008 8:12 AM

Problems logging in - database lock file

My openfire stops works after a while and my users can no longer log in.  They get invailid username or password.  I can go to services and restart that service it will work again but I can't be doing this 3 times a day. Thanks for the help.

 

Errors that I found are:

 

Database setup or configuration error: Please verify your database settings and check the logs/error.log file for detailed error messages.
java.lang.IllegalArgumentException: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@f7cf94a6[file =C:\Program Files\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception:  java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\Program Files\Openfire\embedded-db\openfire.lck
    at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:710)
    at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:427)
    at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:161)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:106)
    at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
    at com.exe4j.runtime.WinLauncher.main(Unknown Source)
Caused by: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@f7cf94a6[file =C:\Program Files\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception:  java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\Program Files\Openfire\embedded-db\openfire.lck
    at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:124)
    at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:698)
    ... 16 more
Error starting the server. Please check the log files for more information.
Server halted

 

From the error.log file:

 

2008.11.03 09:52:12 [org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:457)
]
java.lang.IllegalArgumentException: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@f7cf94a6[file =C:\Program Files\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception:  java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\Program Files\Openfire\embedded-db\openfire.lck
    at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:710)
    at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:427)
    at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:161)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:106)
    at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
    at com.exe4j.runtime.WinLauncher.main(Unknown Source)
Caused by: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@f7cf94a6[file =C:\Program Files\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception:  java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\Program Files\Openfire\embedded-db\openfire.lck
    at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:124)
    at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:698)
    ... 16 more

  • sixthring KeyContributor 3,789 posts since
    Apr 2, 2007

    you wouldn't happent to have 2 instances of openfire running?

  • tnserra Bronze 1 posts since
    Nov 25, 2009
    Currently Being Moderated
    Nov 25, 2009 6:02 AM (in response to Jeffrey Montgomery)
    Re: Problems logging in

    Having the same issue (aparently), and I have to restart the openfire service like 5 times a day.

     

    Caused by: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.         
    at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:124)
    at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:698)
    ... 10 more                 
    2009.11.25 11:29:53 [org.jivesoftware.openfire.group.Group.loadProperties(Group.java:605)]
    java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.         
    at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:124)
    at org.jivesoftware.openfire.group.Group.loadProperties(Group.java:585)
    at org.jivesoftware.openfire.group.Group.getProperties(Group.java:274)
    at org.jivesoftware.openfire.roster.RosterManager.hasMutualVisibility(RosterManage r.java:888)
    at org.jivesoftware.openfire.roster.Roster.<init>(Roster.java:146)
    at org.jivesoftware.openfire.roster.RosterManager.getRoster(RosterManager.java:86)
    at org.jivesoftware.openfire.handler.PresenceUpdateHandler.broadcastUpdate(Presenc eUpdateHandler.java:282)
    at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:137)
    at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:112)
    at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:176)
    at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:134)
    at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:70)
    at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:76)
    at org.jivesoftware.openfire.SessionManager$ClientSessionListener.onConnectionClos e(SessionManager.java:1133)
    at org.jivesoftware.openfire.nio.NIOConnection.notifyCloseListeners(NIOConnection. java:202)
    at org.jivesoftware.openfire.nio.NIOConnection.close(NIOConnection.java:185)
    at org.jivesoftware.openfire.session.LocalSession.close(LocalSession.java:303)
    at org.jivesoftware.openfire.handler.IQBindHandler.handleIQ(IQBindHandler.java:126 )
    at org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:49)
    at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:351)
    at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:101)
    at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:68)
    at org.jivesoftware.openfire.net.StanzaHandler.processIQ(StanzaHandler.java:319)
    at org.jivesoftware.openfire.net.ClientStanzaHandler.processIQ(ClientStanzaHandler .java:79)
    at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:284)
    at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:176)
    at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:133)
    at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570)                 
    at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)                 
    at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)                 
    at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)                 
    at org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80)                  
    at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)                 
    at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)                 
    at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)                 
    at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)                 
    at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:185)                 
    at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)                 
    at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)                 
    at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)                 
    at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)                 
    at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)                 
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)                 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)                 
    at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)                  
    at java.lang.Thread.run(Unknown Source)

     

    Don´t know what to do, Could someone help in this issue?

     

    Using SUSE 10 SP2 and PostgreSQL 8.3 with Openfire 3.6.4

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points