我怎样才能让Openfire 3.7.1“记住”它的configuration?

我已经(直到今天早上)已经连续370天没有被感动的Openfire内联网XMPP服务器,并且总共运行了大约3年。 用户在相邻服务器上对AD进行身份validation,并按OU分组。 所有这些function都很好用。

我的问题是,今天早上服务崩溃了,当我试图使用pipe理控制台来确定问题是什么时,我的助手得到了一个“没有Java堆空间”的错误(没有屏幕截图,对不起)。 我们去了物理控制台,重新启动服务,并重新启动,至less没有可见的错误。

但是现在,试图进入pipe理控制台会出现初始设置页面。 我呻吟了一下,却挖出笔记,重新input了所有的LDAP信息和数据库连接信息。 有些满意之后,我点击“loginpipe理控制台”button,然后等待……只是返回到我刚刚离开的设置屏幕,询问我的首选系统语言是什么。 所以:

MySQL服务器正在运行,并且/opt/openfire/conf/openfire.xml文件中的连接信息是正确的。 我通过使用该文件中的凭据来testing连接来查看ofProperty表。 检查ofProperty表的内容显示设置保存在那里,包括所有的LDAP信息,名称和其他字段,组定义,一切。 但Openfire拒绝从数据库中加载这些文件。

我已经检查的东西:

  • 检查/ var / log / messages不会显示任何exception情况。
  • MySQL运行良好,能够从本地主机以及我的机器上的MySQL工作台连接。
  • 我的磁盘使用了3%。
  • 内存不是问题,使用0k交换。
  • 这台机器只运行openfire,没有别的。
  • Netstat只显示在9090和9091pipe理端口上侦听的openfire进程。
  • 运行ps只显示pipe理进程。
  • 没有更新已经安装。
  • 没有configuration已经改变。
  • 这台机器不能从互联网上访问,所以黑客似乎不太可能。 也没有其他的迹象。

编辑:日志剪报显示连接被拒绝,但显然只发生在早些时候:

2012.05.16 09:27:47 org.jivesoftware.database.DbConnectionManager - Unable to get a connection from the database pool (attempt 10 out of 10). com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771) at com.mysql.jdbc.Connection.<init>(Connection.java:1555) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConnectionBuilder.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(DefaultConnectionProvider.java:86) at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager.java:124) at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:754) at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:480) at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:212) 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:113) at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:58) ** END NESTED EXCEPTION ** Last packet sent to the server was 1 ms ago. at com.mysql.jdbc.Connection.createNewIO(Connection.java:2847) at com.mysql.jdbc.Connection.<init>(Connection.java:1555) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConnectionBuilder.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(DefaultConnectionProvider.java:86) at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager.java:124) at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:754) at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:480) at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:212) 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:113) at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:58) 2012.05.16 09:27:48 org.jivesoftware.openfire.XMPPServer - Server halted 2012.05.16 09:36:34 org.jivesoftware.openfire.pubsub.PubSubModule - Publish-Subscribe domain: pubsub.cc.server.local 2012.05.16 09:36:36 org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl - Multi User Chat domain: conference.cc.server.local 2012.05.16 09:37:48 org.jivesoftware.openfire.XMPPServer - Openfire 3.7.1 [May 16, 2012 9:37:48 AM] 2012.05.16 09:38:01 org.jivesoftware.openfire.container.AdminConsolePlugin - Admin console listening at: http://127.0.0.1:9090 https://127.0.0.1:9091 2012.05.16 09:54:21 org.jivesoftware.openfire.XMPPServer - Server halted 2012.05.16 09:54:33 org.jivesoftware.openfire.XMPPServer - Openfire 3.7.1 [May 16, 2012 9:54:33 AM] 2012.05.16 09:54:46 org.jivesoftware.openfire.container.AdminConsolePlugin - Admin console listening at: http://127.0.0.1:9090 https://127.0.0.1:9091 2012.05.16 10:07:24 org.jivesoftware.openfire.XMPPServer - Server halted 2012.05.16 10:07:37 org.jivesoftware.openfire.XMPPServer - Openfire 3.7.1 [May 16, 2012 10:07:37 AM] 2012.05.16 10:07:49 org.jivesoftware.openfire.container.AdminConsolePlugin - Admin console listening at: http://127.0.0.1:9090 https://127.0.0.1:9091 2012.05.16 10:26:39 org.jivesoftware.openfire.XMPPServer - Server halted 2012.05.16 10:28:54 org.jivesoftware.openfire.XMPPServer - Openfire 3.7.1 [May 16, 2012 10:28:54 AM] 2012.05.16 10:29:10 org.jivesoftware.openfire.container.AdminConsolePlugin - Admin console listening at: http://127.0.0.1:9090 https://127.0.0.1:9091 2012.05.16 10:33:25 org.jivesoftware.openfire.XMPPServer - Server halted 2012.05.16 10:33:38 org.jivesoftware.openfire.XMPPServer - Openfire 3.7.1 [May 16, 2012 10:33:38 AM] 2012.05.16 10:33:51 org.jivesoftware.openfire.container.AdminConsolePlugin - Admin console listening at: http://127.0.0.1:9090 https://127.0.0.1:9091 2012.05.16 10:51:38 org.jivesoftware.openfire.XMPPServer - Server halted 2012.05.16 10:51:51 org.jivesoftware.openfire.XMPPServer - Openfire 3.7.1 [May 16, 2012 10:51:51 AM] 2012.05.16 10:52:04 org.jivesoftware.openfire.container.AdminConsolePlugin - Admin console listening at: http://127.0.0.1:9090 https://127.0.0.1:9091 2012.05.16 10:53:01 org.jivesoftware.openfire.XMPPServer - Server halted 2012.05.16 10:53:35 org.jivesoftware.openfire.XMPPServer - Openfire 3.7.1 [May 16, 2012 10:53:35 AM] 2012.05.16 10:53:49 org.jivesoftware.openfire.container.AdminConsolePlugin - Admin console listening at: http://127.0.0.1:9090 https://127.0.0.1:9091 

之后,一次失败,我试图各种重新configuration和重新启动服务,你可以看到pipe理控制台出现。

长话短说:看看其他(工作)安装在别处。 原来有一个名为<setup>的值位于工作安装的openfire.xml文件中,如下所示:

 ...(XML snipped) <minConnections>5</minConnections> <maxConnections>25</maxConnections> <connectionTimeout>1.0</connectionTimeout> </defaultProvider> </database> <setup>true</setup> </jive> 

由于某种原因,我的openfire.xml中缺less安装行。

有趣的是,这个文件是拥有的,只能由root用户写,所以当安装过程运行时,某些特权进程删除了这个行(不知何故???),而显然只留下连接参数。 但是,由于该文件只能被root用户写入,因此JRE运行的安装脚本无法写入文件。 另外,我是一个白痴,在Java例外中错过了这一行:

java.io.IOException: XML properties file must be writable: openfire.xml

显然它可以写入设置过程的某些部分,但不是其他人? 我不知道。 但如果有其他人有这个问题,希望他们能在这里find答案。 我可以通过将<setup>值添加到openfire.xml中来纠正问题,并立即加载Openfire。