Springboot连接rabbitmq报错Connection timed out: connect] with root cause

杀马特。学长 韩版系。学妹 提交于 2019-11-28 16:21:22

Springboot连接rabbitmq报错Connection timed out: connect] with root cause

报错:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception

Connection timed out: connect] with root cause

 

检查你的配置对不对,如果连接rabbitmq的配置没问题,检查你的防火墙端口有没有开出来

默认连接端口是5672,看下你连接的端口是啥

 

查看开放的端口:
firewall-cmd --list-ports
开放端口(修改后需要重启防火墙方可生效):
firewall-cmd --zone=public --add-port=5672/tcp --permanent

重启防火墙:
firewall-cmd --reload

 

这个是我遇到的报错情况,希望可以帮到你。

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!