I try to run DockerUI through Rancher. Configure the Port Map: 9000 9000 and everything works good, I have access to DockerUi at “hostname.com: 9000”. After you restart a container with DockerUi starts and runs, but the address “hostname.com: 9000” is unavailable. Tell me, please, how can I fix it?
How are you restarting the container? With docker restart
? Or are you removing it and then a docker run
?
I rebooted the entire server: sudo reboot
Is the container running? Did you set the restart policy so that it starts up again automatically?
The default for services (in the Applications tab) is restart=always
, but the default for containers (in the Infrastructure tab) is restart=never
.
Yes, the container starts automatically, I see that it is running through a docker ps
, but access to the port of 9000 to it is not.
I have not been able to reproduce. When I reboot my server (machine that is running rancher/server), it comes back up, my host and service is connected and I am still able to view the dockerUI on the host.
Are you running rancher server and the rancher agent on the same machine? I have mine running on 2 different machines.
On the host that has the running container, can you do a iptables-save
to see if the exposed port is available for the container that is running the dockerUI image?
It should look something like this:
-A CATTLE_PREROUTING -p tcp -m addrtype --dst-type LOCAL -m tcp --dport 9000 -j DNAT --to-destination 10.42.165.206:9000
Note: 10.42.165.206
is the IP given to my container running DockerUI in my Rancher setup.