windows下docker访问nacos失败[error] 25#25: *1 connect() failed (111: Connection refused) while connecting

[error] 25#25: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: localhost, request: “GET /nacos HTTP/1.1”, upstream: “http://127.0.0.1:8848/nacos”, host: “localhost”

问题解决

问题所在和我发布的https://blog.csdn.net/qq_45995427/article/details/120161400?spm=1001.2014.3001.5501文章类似,还是关于主机ip和docker虚拟环境ip问题
我们只需将conf配置文件中

upstream cluster{
    server 127.0.0.1:8846;
    server 127.0.0.1:8847;
    server 127.0.0.1:8848;
}

127.0.0.1的ip地址改成我们的主机ip地址就可以了,win+r调出cmd窗口输入IPCONFIG回车找到IPv4,其指向的ip就是主机的ip

nginx实现动态路由nacos集群

我这里的问题是出现在我docker配置nacos集群所遇到的,所以我在这讲一下我的配置过程
相关文章在我发布相关文章中,连接在下面:
https://blog.csdn.net/qq_45995427/article/details/120173937?spm=1001.2014.3001.5501

上一篇:联系tomcat时不小心遇到的问题Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (defaul


下一篇:转:解决 nginx: [alert] kill(189, 1) failed (3: No such process)