Docker container on EC2 instance not accessible on specified port

I'm trying to run an application in Docker on an EC2 instance. It is two separate processes. I'm able to access the ports for process 1, but not process 2.

Process 1 listens on the following ports:



Process two listens on the these ports:



The security rules allow for all traffic to all ports from all origins:

Netstat shows both ports on process 2 are listening

netstat -an | grep 2021
tcp6       0      0 :::2021                 :::*                    LISTEN   

netstat -an | grep 8084
tcp6       0      0 :::8084                 :::*                    LISTEN       

The docker command opens all of the above ports:

docker run -ti --privileged=true  -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 8080:8080 -p 2008:2008 -p 8084:8084 -p 2021:2021 myname/image_name /usr/sbin/init

There is no firewall process running.

Yet, a zenmap scan shows only ports 2008 and 8080 of the above four are listening - 2021 and 8084 don't show up.

Any ideas why this would be? I can't think of what else to look for.

Read more here:

Content Attribution

This content was originally published by Jack BeNimble at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: