rabbitmq出现java.net.SocketException: socket closed

后台出现异常日志:

java.net.SocketException: socket closed
...
c.r.c.impl.ForgivingExceptionHandler An unexpected connection driver error occured

注:

RabbitMQ会开启3个端口,5672、15672、25672,其中5672是提供消息队列服务所用,15672是开启后台http访问所用,
默认情况下15672是未开启的。

1.在服务器上开放5672端口。

开放5672端口:
firewall-cmd --zone=public --add-port=5672/tcp --permanent
重新载入:
firewall-cmd --reload

2.项目中的port修改为5672

spring:
  application:
    name: config-client
  rabbitmq:
    host: localhost
    port: 5672
    username: admin
    password: 123456
    virtual-host: /

3.用户对virtual host是有操作权限的。

rabbitmq出现java.net.SocketException: socket closed_第1张图片

 

 

你可能感兴趣的:(rabbitmq)