RocketMQ集群启动报错:java.lang.RuntimeException: Lock failed,MQ already started
生活随笔
收集整理的這篇文章主要介紹了
RocketMQ集群启动报错:java.lang.RuntimeException: Lock failed,MQ already started
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
啟動RocketMQ集群后報錯:
java.lang.RuntimeException: Lock failed,MQ already startedat org.apache.rocketmq.store.DefaultMessageStore.start(DefaultMessageStore.java:214)at org.apache.rocketmq.broker.BrokerController.start(BrokerController.java:827)at org.apache.rocketmq.broker.BrokerStartup.start(BrokerStartup.java:64)at org.apache.rocketmq.broker.BrokerStartup.main(BrokerStartup.java:58)原因:
學習階段,我們將Master和Slave共同部署在一臺機器上,同時配置的storePath又相同,沒有進行區(qū)分。
解決:
為從節(jié)點創(chuàng)建存儲文件
mkdir /usr/local/rocketmq/store-s mkdir /usr/local/rocketmq/store-s/commitlog mkdir /usr/local/rocketmq/store-s/consumequeue mkdir /usr/local/rocketmq/store-s/indexstore-s與Master節(jié)點用的目錄store區(qū)分開。
對Slave配置文件進行修改:
#===================storePath主從節(jié)點必須分開==================== #存儲路徑 storePathRootDir=/usr/local/rocketmq/store-s #commitLog 存儲路徑 storePathCommitLog=/usr/local/rocketmq/store-s/commitlog #消費隊列存儲路徑存儲路徑 storePathConsumeQueue=/usr/local/rocketmq/store-s/consumequeue #消息索引存儲路徑 storePathIndex=/usr/local/rocketmq/store-s/index #checkpoint 文件存儲路徑 storeCheckpoint=/usr/local/rocketmq/store-s/checkpoint #abort 文件存儲路徑 abortFile=/usr/local/rocketmq/store-s/abort #===================storePath主從節(jié)點必須分開====================以上問題解決。
本文僅供個人學習使用,如有不足或錯誤歡迎指正!
總結
以上是生活随笔為你收集整理的RocketMQ集群启动报错:java.lang.RuntimeException: Lock failed,MQ already started的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 解决ZooKeeper集群搭建 [myi
- 下一篇: RocketMQ:NameServer架