You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 22.04下RabbitMQ启动停滞(Startup in progress)故障求助

问题分析与解决

这不是Ubuntu 22.04的兼容性问题,核心故障是日志里的epmd error for host phdfocus-server-2: timeout——epmd是Erlang生态的端口映射器服务,RabbitMQ依赖它完成节点通信,超时说明epmd无法正常解析主机名或自身未正常运行。

解决步骤

  • 检查epmd服务状态
    执行命令查看epmd是否运行:

    epmd -names
    

    如果无输出或报错,启动并设置开机自启:

    systemctl start epmd
    systemctl enable epmd
    
  • 修复主机名解析
    确保主机名phdfocus-server-2能正确解析到本地IP,编辑/etc/hosts文件:

    nano /etc/hosts
    

    添加或修改对应条目(替换为你的服务器实际IP):

    127.0.0.1   phdfocus-server-2 localhost
    # 或内网IP:192.168.x.x   phdfocus-server-2
    

    保存后重启epmd和RabbitMQ服务:

    systemctl restart epmd
    systemctl restart rabbitmq-server
    
  • 检查防火墙端口
    epmd默认使用4369 TCP端口,确保未被UFW拦截:

    ufw status
    

    若未允许该端口,添加规则并重载防火墙:

    ufw allow 4369/tcp
    ufw reload
    
  • 重置RabbitMQ状态(以上步骤无效时)
    停止服务并清除状态数据:

    systemctl stop rabbitmq-server
    rm -rf /var/lib/rabbitmq/mnesia
    systemctl start rabbitmq-server
    

内容的提问来源于stack exchange,提问作者Chandragupta Borkotoky

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.06 11:31:14