AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 389711
Accepted
atroon
atroon
Asked: 2012-05-17 08:01:32 +0800 CST2012-05-17 08:01:32 +0800 CST 2012-05-17 08:01:32 +0800 CST

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

  • 772

我有一个 Openfire Intranet XMPP 服务器(好吧,直到今天早上),它已经愉快地运行了 370 天而没有被触及,总共运行了大约 3 年。用户向相邻服务器上的 AD 进行身份验证,并按 OU 分组。所有这些功能都很好[ed|s]。

我的问题是今天早上服务崩溃了,我的助手在尝试使用管理控制台确定问题所在时收到“没有 Java 堆空间”错误(抱歉,没有屏幕截图)。我们转到物理控制台并重新启动服务,它重新启动正常,或者至少没有出现可见错误。

但是现在,尝试进入管理控制台会弹出初始设置页面。我呻吟着,但还是翻出了我的笔记,重新输入了所有的 LDAP 信息和数据库连接信息。我心满意足地点击了“登录管理控制台”按钮,然后等待……只是返回到我刚刚离开的设置屏幕,询问我首选的系统语言是什么。所以:

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

我检查过的事情:

  • 检查 /var/log/messages 没有发现任何异常。
  • MySQL 运行良好,能够从本地主机以及我机器上的 MySQL 工作台获取连接。
  • 我的磁盘已使用 3%。
  • 内存没问题,用了0k swap。
  • 这台机器只运行openfire,没有别的。
  • Netstat 仅显示监听 9090 和 9091(管理端口)的 openfire 进程。
  • 运行 ps 仅显示管理进程。
  • 没有安装更新。
  • 没有更改任何配置。
  • 这台机器不能从互联网上访问,所以黑客攻击似乎不太可能。也没有其他迹象。

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

    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

在那次失败之后,我尝试了各种重新配置和重新启动服务的方法,正如您看到的那样,管理控制台出现了。

java linux mysql xmpp openfire
  • 1 1 个回答
  • 5636 Views

1 个回答

  • Voted
  1. Best Answer
    atroon
    2012-05-17T11:11:58+08:002012-05-17T11:11:58+08:00

    长话短说:看看其他地方的另一个(工作中的)装置。原来有一个名为<setup>驻留在openfire.xml工作安装文件中的值,如下所示:

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

    openfire.xml由于某种原因,我的设置行丢失了。

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

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

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

    • 2

相关问题

  • 多操作系统环境的首选电子邮件客户端

  • 你最喜欢的 Linux 发行版是什么?[关闭]

  • 更改 PHP 的默认配置设置?

  • 保护新的 Ubuntu 服务器 [关闭]

  • (软)Ubuntu 7.10 上的 RAID 6,我应该迁移到 8.10 吗?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve