You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/11/30 16:10:02 UTC

[GitHub] [rocketmq] ltyeamin opened a new issue #1609: RocketMQ 2m2s startup problem

ltyeamin opened a new issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609


   The issue tracker is **ONLY** used for bug report(feature request need to follow [RIP process](https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal)). Keep in mind, please check whether there is an existing same report before your raise a new one.
   
   Alternately (especially if your communication is not a bug report), you can send mail to our [mailing lists](http://rocketmq.apache.org/about/contact/). We welcome any friendly suggestions, bug fixes, collaboration and other improvements.
   
   Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as the following:
   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
     我配置了双主双从同步模式下的master1,默认两个namesrv都已经启动,准备开始启动第一个master broker
   broker-a.properties配置文件如下:
   #所属集群名字
   brokerClusterName=rocketmq-cluster
   #broker名字,注意此处不同的配置文件填写的不一样
   brokerName=broker-a
   #0 表示 Master,>0 表示 Slave
   brokerId=0
   #nameServer地址,分号分割
   namesrvAddr=192.168.5.100:9876;192.168.5.101:9876
   #在发送消息时,自动创建服务器不存在的topic,默认创建的队列数
   defaultTopicQueueNums=4
   #是否允许 Broker 自动创建Topic,建议线下开启,线上关闭
   autoCreateTopicEnable=true
   #是否允许 Broker 自动创建订阅组,建议线下开启,线上关闭
   autoCreateSubscriptionGroup=true
   #Broker 对外服务的监听端口
   listenPort=10911
   #删除文件时间点,默认凌晨 4点
   deleteWhen=04
   #文件保留时间,默认 48 小时
   fileReservedTime=120
   #commitLog每个文件的大小默认1G
   mappedFileSizeCommitLog=1073741824
   #ConsumeQueue每个文件默认存30W条,根据业务情况调整
   #mapedFileSizeConsumeQueue=300000
   mappedFileSizeConsumeQueue=6000000
   destroyMapedFileIntervalForcibly=120000
   #redeleteHangedFileInterval=120000
   #检测物理文件磁盘空间
   diskMaxUsedSpaceRatio=88
   #存储路径
   storePathRootDir=/usr/local/bin/rocketmq-all-4.5.2-bin-release/store
   #commitLog 存储路径
   storePathCommitLog=/usr/local/bin/rocketmq-all-4.5.2-bin-release/store/commitlog
   #消费队列存储路径存储路径
   storePathConsumeQueue=/usr/local/bin/rocketmq-all-4.5.2-bin-release/store/consumequeue
   #消息索引存储路径
   storePathIndex=/usr/local/bin/rocketmq-all-4.5.2-bin-release/store/index
   #checkpoint 文件存储路径
   storeCheckpoint=/usr/local/bin/rocketmq-all-4.5.2-bin-release/store/checkpoint
   #abort 文件存储路径
   abortFile=/usr/local/bin/rocketmq-all-4.5.2-bin-release/store/abort
   #限制的消息大小
   maxMessageSize=65536
   #flushCommitLogLeastPages=4
   #flushConsumeQueueLeastPages=2
   #flushCommitLogThoroughInterval=10000
   #flushConsumeQueueThoroughInterval=60000
   #Broker 的角色
   #- ASYNC_MASTER 异步复制Master
   #- SYNC_MASTER 同步双写Master
   #- SLAVE
   brokerRole=SYNC_MASTER
   #刷盘方式
   #- ASYNC_FLUSH 异步刷盘
   #- SYNC_FLUSH 同步刷盘
   flushDiskType=SYNC_FLUSH
   #checkTransactionMessageEnable=false
   #发消息线程池数量
   #sendMessageThreadPoolNums=128
   #拉消息线程池数量
   #pullMessageThreadPoolNums=128
   
   开始启动:
   nohup sh mqbroker -c /usr/local/bin/rocketmq-all-4.5.2-bin-release/conf/2m-2s-sync/broker-a.properties &
   
   执行上述命令后,无法启动broker-a:
   
   找到日志:
   2019-11-24 01:19:42 INFO main - warmMapedFileEnable=false
   2019-11-24 01:19:42 INFO main - offsetCheckInSlave=false
   2019-11-24 01:19:42 INFO main - debugLockEnable=false
   2019-11-24 01:19:42 INFO main - duplicationEnable=false
   2019-11-24 01:19:42 INFO main - diskFallRecorded=true
   2019-11-24 01:19:42 INFO main - osPageCacheBusyTimeOutMills=1000
   2019-11-24 01:19:42 INFO main - defaultQueryMaxNum=32
   2019-11-24 01:19:42 INFO main - transientStorePoolEnable=false
   2019-11-24 01:19:42 INFO main - transientStorePoolSize=5
   2019-11-24 01:19:42 INFO main - fastFailIfNoBufferInStorePool=false
   2019-11-24 01:19:42 INFO main - enableDLegerCommitLog=false
   2019-11-24 01:19:42 INFO main - dLegerGroup=
   2019-11-24 01:19:42 INFO main - dLegerPeers=
   2019-11-24 01:19:42 INFO main - dLegerSelfId=
   2019-11-24 01:19:42 INFO main - load /usr/local/bin/rocketmq-all-4.5.2-bin-release/store/config/consumerOffset.json OK
   2019-11-24 01:19:42 INFO main - load /usr/local/bin/rocketmq-all-4.5.2-bin-release/store/config/consumerFilter.json OK
   2019-11-24 01:19:42 INFO main - Try to start service thread:AllocateMappedFileService started:false lastThread:null
   2019-11-24 01:19:42 INFO main - Try to shutdown service thread:AllocateMappedFileService started:true lastThread:Thread[AllocateMappedFileService,5,main]
   2019-11-24 01:19:42 INFO main - shutdown thread AllocateMappedFileService interrupt true
   2019-11-24 01:19:42 INFO main - join thread AllocateMappedFileService elapsed time(ms) 1 90000
   2019-11-24 01:19:42 INFO main - Try to shutdown service thread:PullRequestHoldService started:false lastThread:null
   
   
   最后的日志感觉由点问题,找了好多资料,没把这个问题解决掉,请问我是哪里配置不对吗?
   2. Please tell us about your environment:
   
     RocketMQ 4.5.2 Release版 + JDK8
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
   
   **FEATURE REQUEST**
   
   1. Please describe the feature you are requesting.
   
   2. Provide any additional detail on your proposed use case for this feature.
   
   2. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?
   
   4. If there are some sub-tasks using -[] for each subtask and create a corresponding issue to map to the sub task:
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] duhenglucky commented on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
duhenglucky commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-735882404


   @wz2cool ping


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] duhenglucky commented on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
duhenglucky commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-855313794


   > 问题解决了吗 同样的问题,一直找不到原因,一点报错都没提示
   
   你的 store 目录下的 commitlog 大约有多少个?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] wz2cool commented on issue #1609: RokcetMQ双主双从主节点Broker启动失败问题

Posted by GitBox <gi...@apache.org>.
wz2cool commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-734622302


   why this issue closed, we meet the same problem. Can anyone help us?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] wz2cool edited a comment on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
wz2cool edited a comment on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-739442421


   > > > @wz2cool ping
   > > 
   > > 
   > > We reinstall it, everything works well...
   > 
   > could you provide more information about your resolve method,maybe more users also faced this issue,and we also want to know more details about this issue, thanks :)
   
   Sadly, we couldn't provide more info because we got same log. Could you log more detail if something is wrong, 
   Cannot find any error detail but find "shutdown service" info.
   ![image](https://user-images.githubusercontent.com/11556152/101269279-701e4f00-37a8-11eb-92e0-d0e2c025123a.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] wuxingwang1997 commented on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
wuxingwang1997 commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-848609679


   问题解决了吗 同样的问题,一直找不到原因,一点报错都没提示


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] wz2cool edited a comment on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
wz2cool edited a comment on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-739442421


   > > > @wz2cool ping
   > > 
   > > 
   > > We reinstall it, everything works well...
   > 
   > could you provide more information about your resolve method,maybe more users also faced this issue,and we also want to know more details about this issue, thanks :)
   
   Sadly, we couldn't provide more info because we got same error log. Could you log more detail if something is wrong, 
   Cannot find any error detail but find "shutdown service" info.
   ![image](https://user-images.githubusercontent.com/11556152/101269279-701e4f00-37a8-11eb-92e0-d0e2c025123a.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] AI39jifeng commented on issue #1609: RokcetMQ双主双从主节点Broker启动失败问题

Posted by GitBox <gi...@apache.org>.
AI39jifeng commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-673200982


   > I found this problem too.And I know how about it. I copy the broker-a.properties from web community.
   > My rocketmq version is 4.7.0.And if I add the custom store dir in broker-a.properties .The broker can't start well.It will have the same problem .
   > So I delete the custom store dir ,It can start well.
   > I will debug how the broker start for knowing the real reason which focus broker start fail.
   
   I also encountered the same problem as you. I use the version 4.7.1(mq) and version 1.8(jdk). After comment the storage path, the whold cluster can be used normally. I will try other mq version.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] huoshenyingmu commented on issue #1609: RokcetMQ双主双从主节点Broker启动失败问题

Posted by GitBox <gi...@apache.org>.
huoshenyingmu commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-666250144


   > I found this problem too.And I know how about it. I copy the broker-a.properties from web community.
   > My rocketmq version is 4.7.0.And if I add the custom store dir in broker-a.properties .The broker can't start well.It will have the same problem .
   > So I delete the custom store dir ,It can start well.
   > I will debug how the broker start for knowing the real reason which focus broker start fail.
   
   I also encountered the same problem as you. After deleting the storage path, the whole cluster can be used normally, but this is not what I want. After adding the storage directory, do you have any good ways


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] wz2cool edited a comment on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
wz2cool edited a comment on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-739442421


   > > > @wz2cool ping
   > > 
   > > 
   > > We reinstall it, everything works well...
   > 
   > could you provide more information about your resolve method,maybe more users also faced this issue,and we also want to know more details about this issue, thanks :)
   
   Sadly, we couldn't provide more info because we got same error log. Could you add more detail error log if something is wrong, 
   Cannot find any error detail but find "shutdown service" info.
   ![image](https://user-images.githubusercontent.com/11556152/101269279-701e4f00-37a8-11eb-92e0-d0e2c025123a.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] Kimihrio commented on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
Kimihrio commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-939421409


   按照楼上的提示我的问题已经解决了  主要原因是创建了abort、checkpoint这两个文件夹  将这两个文件夹删掉就行了
   ![image](https://user-images.githubusercontent.com/37408924/136686471-3bc1dd8f-7bed-46af-a4fb-ba92c76d4915.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] duhenglucky commented on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
duhenglucky commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-738484666


   > > @wz2cool ping
   > 
   > We reinstall it, everything works well...
   
   could you provide more information about your resolve method,maybe more users also faced this issue,and we also want to know more details about this issue, thanks :)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] caoyaxing221 commented on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
caoyaxing221 commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-872074793


   首先看下是不是内存配置过大了,其次有可能 abort、checkpoint是文件来的,但创建成了目录,导致一直启动失败,这2个文件系统会自动创建。
   
   commitlog、consumequeue、index是目录,config是目录,但config自动创建的


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] eoc2015 commented on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
eoc2015 commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-783877821


   一模一样的问题。4.8.0也是。主要是上次关闭broker时无法正常关闭导致的。
   可以查看store.log日志,大概率是启动时加载日志文件异常了。目前也没找到解决办法,除非删除这个问题。哎。。。
   
   `2021-02-23 12:48:53 ERROR AllocateMappedFileService - Failed to map file /app/rocketmq/store/commitlog-am/00000000001073741824
   java.io.IOException: Map failed
   	at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:940) ~[na:1.8.0_162]
   	at org.apache.rocketmq.store.MappedFile.init(MappedFile.java:162) [rocketmq-store-4.8.0.jar:4.8.0]
   	at org.apache.rocketmq.store.MappedFile.<init>(MappedFile.java:72) [rocketmq-store-4.8.0.jar:4.8.0]
   	at org.apache.rocketmq.store.AllocateMappedFileService.mmapOperation(AllocateMappedFileService.java:176) [rocketmq-store-4.8.0.jar:4.8.0]
   	at org.apache.rocketmq.store.AllocateMappedFileService.run(AllocateMappedFileService.java:137) [rocketmq-store-4.8.0.jar:4.8.0]
   	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_162]
   Caused by: java.lang.OutOfMemoryError: Map failed
   	at sun.nio.ch.FileChannelImpl.map0(Native Method) ~[na:1.8.0_162]
   	at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:937) ~[na:1.8.0_162]
   	... 5 common frames omitted`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] duhenglucky commented on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
duhenglucky commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-855313623


   > 一模一样的问题。4.8.0也是。主要是上次关闭broker时无法正常关闭导致的。
   > 可以查看store.log日志,大概率是启动时加载日志文件异常了。目前也没找到解决办法,除非删除这个问题。哎。。。
   > 
   > `2021-02-23 12:48:53 ERROR AllocateMappedFileService - Failed to map file /app/rocketmq/store/commitlog-am/00000000001073741824 java.io.IOException: Map failed at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:940) ~[na:1.8.0_162] at org.apache.rocketmq.store.MappedFile.init(MappedFile.java:162) [rocketmq-store-4.8.0.jar:4.8.0] at org.apache.rocketmq.store.MappedFile.<init>(MappedFile.java:72) [rocketmq-store-4.8.0.jar:4.8.0] at org.apache.rocketmq.store.AllocateMappedFileService.mmapOperation(AllocateMappedFileService.java:176) [rocketmq-store-4.8.0.jar:4.8.0] at org.apache.rocketmq.store.AllocateMappedFileService.run(AllocateMappedFileService.java:137) [rocketmq-store-4.8.0.jar:4.8.0] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_162] Caused by: java.lang.OutOfMemoryError: Map failed at sun.nio.ch.FileChannelImpl.map0(Native Method) ~[na:1.8.0_162] at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:937) ~[na:1.8.0_162] ... 5 common frames omitted`
   
   先执行下bin 下面的os.sh 文件,然后重新加载试下,启动的时候在日志里面搜一下abnormal 启动还是nornal 启动,另外看下ulimit -v 的设置


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] wz2cool commented on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
wz2cool commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-736227078


   > @wz2cool ping
   
   We reinstall it, everything works well... 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] wz2cool commented on issue #1609: RocketMQ 2m2s startup problem

Posted by GitBox <gi...@apache.org>.
wz2cool commented on issue #1609:
URL: https://github.com/apache/rocketmq/issues/1609#issuecomment-739442421


   > > > @wz2cool ping
   > > 
   > > 
   > > We reinstall it, everything works well...
   > 
   > could you provide more information about your resolve method,maybe more users also faced this issue,and we also want to know more details about this issue, thanks :)
   
   Sadly, we couldn't provide more info because we got same error log. Could you add more detail error log if something is wrong, 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org