powered by Jive Software

AD Connection details always need refresh on reboot

Folks,

Not sure if anyone has a definitive fix for this yet, but have been using the workaround for some time. I originally had a standalone Openfire install with the embedded DB, and eventually moved to SQL Server and AD integration using LDAP, using OpenFire as a service. This worked for a few revisions until 3.8.x (not sure which revision it started in), where on a reboot of the machine running OpenFire will lose connectivity to Active Directory and not allow users to sign in, nor admins using the OpenFire Server Admin screen.

The only workaround I know of is to first stop the OpenFire service, navigate to the installation directory’s conf/Openfire.xml, find the true property at the bottom, set it to false, save, restart the service and open the Admin page, which you can then guide through the setup again - once you put in the same setup details as you had before, admin and user logins once again work until the next reboot. The same behavior seems to occur on any update as well to Openfire itself, needing the same workaround.

I’d REALLY love not having to do this anymore - has there been any resolution to this scenario? I have two installations exhibiting the behavior, with basically the same setup. No difference between using Windows Server 2012 or 2012 R2 as the Domain Controller or OpenFire host, nor using SQL erver Express 2008 up through 2014. One installation has been updated since the 3.8.0 days, and the other was brand new as of 3.9.3, same behavior.

Fortunately when I redo the setup workaround as described above, the browser remembers the previous entries, so it’s reasonably simple to put them back in, but I essentially have to do this every reboot of the server. Once setup is redone, there’s no issue at all until the next reboot.

Once a reboot occurs, this failure is repeated in the log:

2014.05.13 17:38:48 org.jivesoftware.database.DbConnectionManager - Unable to get a connection from the database pool (attempt 9 out of 10).

java.sql.SQLException: Cannot open database “openfire” requested by the login. The login failed.

at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)

at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)

at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)

at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:602)

at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:344)

at net.sourceforge.jtds.jdbc.ConnectionJDBC3.(ConnectionJDBC3.java:50)

at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConn ectionBuilder.java:39)

at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159)

at org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:211 )

at org.logicalcobwebs.proxool.ProxoolDriver.connect(ProxoolDriver.java:89)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at org.jivesoftware.database.DefaultConnectionProvider.getConnection(DefaultConnec tionProvider.java:86)

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

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:749)

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

at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:197)

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.newInstance(Unknown Source)

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

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

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$2.run(Unknown Source)

When I run the re-setup workaround, the database connection details are already in place, but the Active Directory details are not (these have to be re-entered, as well as the admin users). And yet, the issue appears above as OpenFire not being able to connect to the SQL Server database. Could this merely be an issue of config files being overwritten as a result of a reboot, rather than a more complex authentication bug?