libnetwork icon indicating copy to clipboard operation
libnetwork copied to clipboard

Containers still running, but not available through localhost port

Open TheFox opened this issue 7 years ago • 6 comments

Please see this comment.

TheFox avatar Jun 12 '18 15:06 TheFox

@TheFox, did you try to force the use of IPv4 with curl -4 <url>

fcrisciani avatar Jun 18 '18 17:06 fcrisciani

I didn't try curl -4 127.0.0.1:32000 but telnet 127.0.0.1 32000. But I'll try. Do you guess this is an issue with IPv6?

TheFox avatar Jun 18 '18 17:06 TheFox

@TheFox sometimes depending on the OS config, ipv6 is prioritized on ipv4 so curl tries ipv6 but timeout. just an idea to avoid chasing ghosts :)

fcrisciani avatar Jun 18 '18 18:06 fcrisciani

@fcrisciani I'm sure that IPv4 is used. Since I use the IP address 127.0.0.1 in the Apache reverse proxy no IPv6 will be used.

TheFox avatar Jun 20 '18 09:06 TheFox

@TheFox does the container ever restart and the failure is maybe happening after that?

fcrisciani avatar Jun 28 '18 23:06 fcrisciani

@fcrisciani Nope. The container does not restart ever. But when I manually restart the container it works fine again. Restarting the container or even the Docker daemon is no acceptable solution.

I commented to after ±20 hours: containers still running, but not available through port in the first place because the description is very similar to my problem. The container is running fine, after ~2 to 3 days (or so, I don't know exactly) the container isn't accessable via the --publish port but through the internal Docker Network ip address (from docker inspect -f '{{ .NetworkSettings.IPAddress }}' CONTAINER_ID).

What's even the main purpose (or advantage) to have an internal IP address and a public when I can use the internal anytime anyway?

TheFox avatar Jun 29 '18 08:06 TheFox