Docker Community Forums

Share and learn in the Docker community.

Problem to get through to a container port

Hi everybody,

I have a problem with one of my Docker containers. It provides two web application services, RStudio Server and R Shiny Server. It is started with

docker run -d -p -p -v /var/www/shiny-server/:/srv/shiny-server/ --name rservers --restart always rservers

and a docker ps gives

# docker ps
CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS              PORTS                                                NAMES
1326f5f9eac7        rservers                     "/install/start-serv…"   16 hours ago        Up 16 hours>3838/tcp,>8787/tcp   rservers
136ea0f63229        chockemeyer/rservers:3.5.1   "/install/start-serv…"   19 months ago       Up 2 weeks>3838/tcp,>8787/tcp   rservers-3.5.1

Now I can reach port 3840 without problems but not port 8790. If I telnett to it I receive

# telnet localhost 8790
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

This means the porrt is listened but not (correctly) connected to the service. If I do the same telnet call (to port 8787) within the container, everything works fine.
As you can see from the above docker ps output, I have a second, parallel container running (with just a different R version) where everything works fine.
Host system and container are both Ubuntu 18.04, Docker version 19.03.8, build afacb8b7f0.

I woud be grateful for any ideas as I have run out of them…