且构网

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

RabbitMq 在 docker 中运行时拒绝连接

更新时间:2023-12-01 22:33:04

正如我在问题下的评论所暗示的那样,这是因为 web 应用程序部分中定义的本地主机"是它的容器本地主机,而不是 docker 主机..

As my comment under the question suggested, it's because the "localhost" defined in the web application part is it's containers localhost, and not the docker host..

只是需要改变

- "ElasticUrl=http://localhost:9200"
- "RabbitMq/Host=localhost"

- "ElasticUrl=http://elasticsearch:9200"
- "RabbitMq/Host=rabbit"