RocketMQ 设置 brokerIP1 无效,默认会找到docker 的地址,导致无法连接到broker
配置:
2018-06-20 21\:00\:56 INFO main - namesrvAddr=127.0.0.1:9876
2018-06-20 21\:00\:56 INFO main - brokerIP1=127.0.0.1
2018-06-20 21\:00\:56 INFO main - brokerName=localhost.localdomain
2018-06-20 21\:00\:56 INFO main - brokerClusterName=DefaultCluster
2018-06-20 21\:00\:56 INFO main - brokerId=0
启动:
[Unit]
Description=RocketMQ-Broker
After=namesrv.service
[Service]
ExecStart=/opt/rocketmq/bin/mqbroker -c /opt/rocketmq/conf/broker.p
ExecStop=/opt/rocketmq/bin/mqshutdown broker
[Install]
WantedBy=multi-user.target
日志:
2018-06-20 21:31:41 INFO PullRequestHoldService - PullRequestHoldService service started
2018-06-20 21:31:41 INFO main - The broker[localhost.localdomain, 172.17.0.1:10911] boot success. serializeType=JSON
2018-06-20 21:31:51 INFO BrokerControllerScheduledThread1 - dispatch behind commit log 0 bytes
2018-06-20 21:31:51 INFO BrokerControllerScheduledThread1 - Slave fall behind master: 0 bytes
如果是在docker里使用rocketmq,建议看下官方文档,很详细https://github.com/apache/roc...
提供一个思路吧