Activemq的61616端口自己挂掉,然后就卡死

发布于 2022-09-07 23:05:11 字数 3386 浏览 19 评论 0

各位大虾好!

小虾遇到一个问题,公司某项目的activemq是单台运行的,activemq.xml里写的三台zk:
    <persistenceAdapter>
    <replicatedLevelDB
      directory="${activemq.data}/leveldb"
      replicas="1"
      bind="tcp://0.0.0.0:0"
      zkAddress="172.1.1.24:2181,172.1.1.25:2181,172.1.1.28:2181"    #三个zk
      hostname="172.1.1.28"    #MQ跟其中一个zk装在一个服务器上
      sync="local_disk"
      zkPath="/activemq/leveldb-stores"
      />
</persistenceAdapter>

今早发现mq的61616端口挂了,查看activemq.log,日志如下:

2018-09-21 11:39:11,174 | INFO  | Opening socket connection to server 172.1.1.28/172.1.1.28:2181 | org.apache.zookeeper.ClientCnxn | main-SendThread(172.1.1.28:2181)
2018-09-21 11:39:11,174 | WARN  | unprocessed event state: AuthFailed | org.apache.activemq.leveldb.replicated.groups.ZKClient | main-EventThread
2018-09-21 11:39:11,180 | INFO  | Socket connection established to 172.1.1.28/172.1.1.28:2181, initiating session | org.apache.zookeeper.ClientCnxn | main-SendThread(172.1.1.28:2181)
2018-09-21 11:39:11,193 | INFO  | Session establishment complete on server 172.1.1.28/172.1.1.28:2181, sessionid = 0x365f7dbb9800034, negotiated timeout = 4000 | org.apache.zookeeper.ClientCnxn | main-SendThread(172.1.1.28:2181)
2018-09-21 11:39:11,518 | INFO  | Using the pure java LevelDB implementation. | org.apache.activemq.leveldb.LevelDBClient | ActiveMQ BrokerService[test-leveldb] Task-1
2018-09-21 11:39:11,529 | INFO  | Attaching to master: tcp://172.1.1.28:46816 | org.apache.activemq.leveldb.replicated.SlaveLevelDBStore | ActiveMQ BrokerService[test-leveldb] Task-1
2018-09-21 11:39:11,537 | INFO  | Slave started | org.apache.activemq.leveldb.replicated.MasterElector | ActiveMQ BrokerService[test-leveldb] Task-1
2018-09-21 11:39:11,545 | WARN  | Unexpected session error: java.net.ConnectException: Connection refused | org.apache.activemq.leveldb.replicated.SlaveLevelDBStore | hawtdispatch-DEFAULT-1
2018-09-21 11:39:12,553 | INFO  | Using the pure java LevelDB implementation. | org.apache.activemq.leveldb.LevelDBClient | hawtdispatch-DEFAULT-1
2018-09-21 11:39:12,555 | INFO  | Attaching to master: tcp://172.1.1.28:46816 | org.apache.activemq.leveldb.replicated.SlaveLevelDBStore | hawtdispatch-DEFAULT-1
2018-09-21 11:39:12,556 | WARN  | Unexpected session error: java.net.ConnectException: Connection refused | org.apache.activemq.leveldb.replicated.SlaveLevelDBStore | hawtdispatch-DEFAULT-1

无限的卡在Connection refused这里,172.1.1.28(也就是mq所在的那一台)也根本没有46816端口,我查过防火墙都是好的。

检查了一下zk,发现有一个follower死了,内有大量的重连现象:

2018-09-21 11:43:00,047 [myid:2] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@357] - caught end of stream exception
EndOfStreamException: Unable to read additional data from client sessionid 0x265fa2c442e0003, likely client has closed socket
        at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228)
        at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208)
        at java.lang.Thread.run(Thread.java:748)
2018-09-21 11:43:00,047 [myid:2] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - Closed socket connection for client /172.1.1.28:54869 which had sessionid 0x265fa2c442e0003

于是就重启了这个zk,状态重新是follower,但是activemq重启还是卡在Attaching to master然后又Connection refused的阶段,请问应该怎么办?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文