nginx 502 springboot project docker deployment environment

error.log日志中:connect() failed (111: Connection refused) while connecting to upstream

Pit, ah, ah sinkhole, giant pit ah tm

First of all my nginx configuration does not change, but I do not know why suddenly can not access the project, I request all to be 502, but what's the tip of the file can be normal in the past, then in my Linux directly inside curl 172.17.0.4: 8080 (this was before the mirror ip address and port projects), direct access to I refuse tips, I wonder that strange, and I ran up the project, java has started to provide services, and Why the hell I refused, I mirror port 8080 is, ah, I refused to accept ah,

Finally, tossing most of the day, well, look at the mirror ip address docker

docker inspect -f='{{.Name}} {{.NetworkSettings.IPAddress}} {{.HostConfig.PortBindings}}' $(docker ps -aq)

I go, he changed, changed, changed, re-made after remove the mirror, he ip changed! ! ! ! ! ! changed! ! ! ! ! ! changed! ! ! ! ! ! changed! ! ! ! ! !

Then nginx inside the back-end access address has changed after the change on the line, grief, despair, I gave gas laugh

Guess you like

Origin blog.csdn.net/wu__peng/article/details/88711177