Can access to server

Minimal install of centos, last version of rancher server (image id 20e6faae95c5), with this command

docker run -d -v /db/rancher:/var/lib/mysql --restart=always -p 8080:8080 rancher/server

gives me connection refused on port 8080 .

How i can debug the issue?

Launching this command inside the container, gives me this error:

./usr/bin/s6-svscan

s6-supervise opt: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise boot: warning: unable to spawn ./run - waiting 10 seconds

Hey,

What are you using to attempt the connection?

What output do you get from this command: sudo iptables -L DOCKER -n

seems nothing

Chain DOCKER (1 references)
target     prot opt source               destination

Not good. Do you perhaps need to use sudo? Or perhaps an SELinux issue? Apologies for clutching at straws but this is one of those things that has never broken on me.

how can I do for understand the issue?

for reproduce just take a server from digital ocean and install docker, docker-compose and run this docker run rancher command

still there? I want to solve this problem but I have got no idea of this

Hey.

Are you sure your container is actually running? Can you post the output of the ‘docker ps’ command please?

Based on this, it doesn’t look like there is anything Digital Ocean specific to do: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-centos-7

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
50af08639d5f rancher/server “/usr/bin/s6-svscan /” About a minute ago Up About a minute 3306/tcp, 0.0.0.0:80->8080/tcp backstabbing_lumiere

This is the command which i’ve run:

docker run -d -v /db/rancher:/var/lib/mysql --restart=always -p 80:8080 rancher/server

sudo iptables -L DOCKER -n

Chain DOCKER (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  0.0.0.0/0            172.17.0.2           tcp dpt:8080

OK, so that looks much better. Still no luck connecting?

No, but at first launch (with fresh centos 7.2) runs.

If i remove docker container, and execute again the

docker run -d -v /db/rancher:/var/lib/mysql --restart=always -p 80:8080 rancher/server

it will give me the issue.

OK, just so I’m clear, it works first time, but not after that?

Sorry to be repetitive but is it shown by docker ps that second time?

docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
de3951b3e3d2 rancher/server “/usr/bin/s6-svscan /” 17 seconds ago Up 16 seconds 3306/tcp, 0.0.0.0:80->8080/tcp nauseous_galileo

But no IP tables output and no connectivity?

Found the issue.

With 512mb and 1 cpu, the docker machine interface appears only after 3 minutes.

Maybe inside the container something it’s still building?

You need 1GB of RAM. With 512 the server container is going to run out of memory and randomly die.

Cool, glad you found it. Cheers

Nice Vincent, thank you :slightly_smiling: