You are not logged in.

#1 2019-09-14 10:45:56

moonie
Member
Registered: 2019-06-29
Posts: 1

Can't connect to Docker containers.. but only past the first run

Hello, I've got a problem with docker on my Arch server. (The reason I run Arch on that server is that I need a recent kernel to properly drive the hardware).

Basically, everything works fine, but only on the first run. Here is an example session:

# docker run -d -p 80:80 httpd
5a5334e9c233e26fdafde3520a3f8b3047e47b505b95d79035cdf456477bcdaf
# curl -s localhost
<html><body><h1>It works!</h1></body></html>
# docker kill 5a5334e9c233
5a5334e9c233
# docker run -d -p 80:80 httpd
bdf17feaf2cc304d6e9605cd8ba36634fa4ccce694c5b4fe2ceff3d2f710e16b
# curl -s --connect-timeout 15 localhost
^C
# curl -s -m 15 localhost

Curl --connect-timeout does not timeout, which suggests the initial connection works, but nothing is transmitted afterwards. Just using the -m option (which puts a timeout on the entire request, not just the initial connection) does timeout.

If I restart the docker daemon, things work again:

# docker kill bdf17feaf2cc
bdf17feaf2cc
# systemctl restart docker
# docker run -d -p 80:80 httpd
8443c9dfe1fb383d138b7bd138ff0d0e6b37338f2c0979b99ad2ee1f9f5adff8
# curl -s localhost
<html><body><h1>It works!</h1></body></html>

That is, until I restart a container, of course (at this point, just GOTO the start of this post).

This problem also presents itself on sets of containers created together, for instance via docker-compose: They'll work, but only once, after which the docker daemon must be restarted.


The reason I am posting this on the Archlinux forums is I've never encountered this problem anywhere else, so my best guess is that it's specific to my environment. There is however nothing too special on that server, I don't remember modifying any Docker configuration files, for instance.

Any ideas ? Thanks !

Offline

Board footer

Powered by FluxBB