RocketMQ踩坑记录


1. Java客户端远程连接时的三个坑

  1. No route info of this topic
  2. SENDDEFAULTIMPL CALL TIMEOUT
  3. connect to 172.17.42.1:10911 failed

解决:

  1. 配置broker.conf,添加

    brokerIP1=服务器地址
    namesrvAddr =服务器地址:9876
    
  2. broker启动命令使用:

    nohup sh ./mqbroker -n ip地址:9876 -c ../conf/broker.conf autoCreateTopicEnable=true &
    
  3. 关闭Linux防火墙或者开启对应端口:CentOS7

    # 启动防火墙
    systemctl start firewalld 
    # 禁用防火墙
    systemctl stop firewalld
    # 设置开机启动
    systemctl enable firewalld
    # 禁用开机自启动
    sytemctl disable firewalld
    

    端口操作:

    # 添加端口 permanent 永久开放
    firewall-cmd --zone=public --add-port=端口号/tcp --permanent
    # 刷新规则
    firewall-cmd --reload
    # 查看已开放得所有端口
    firewall-cmd --list-ports
    # 关闭端口
    firewall-cmd --zone=public --remove-port=端口号/tcp --permanent
    
  4. 关闭Windows防火墙或者开放对应端口

posted @ 2021-03-11 14:20  菜鸟kenshine  阅读(331)  评论(1编辑  收藏  举报