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

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

 

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

 


版权声明:本文为Lin_xiaofeng原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。