且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Docker链接时拒绝与RabbitMQ的连接

更新时间:2023-12-01 22:45:58

有两个问题需要解决:

  1. 这两个服务不属于同一网络,因此您需要将rabbitmq服务添加到webnet网络或为这两个服务创建新的网络

  1. the two services do not belong to the same network so you need to add the rabbitmq service to the webnet network or create a new network for the two services

rabbitmq可能需要一些时间才能完全可用(即监听5672端口),因此您需要使service1服务等待rabbitmq服务;有关此问题,请参见此问题.

rabbitmq may take some time to become fully available (i.e. to listen to the 5672 port) so you need to make the service1 service to wait for the rabbitmq service; see this question about this issue.