Unable to run pingfederate docker container on EC2 – Failed to connect to 127.0.0.1 port 9999 after 0 ms: Couldn’t connect to server

  Kiến thức lập trình

I want to run a the pingfederate docker container on EC2. I have launched an Amazon Linux instance.
I installed docker and also copied my evaluation license on to the running instance.

The container loads the license and starts successfully using the –volume flag to mount it on the container.

I have created inbound rules to expose ports 9999 and 9031

Inbound rules:
- Type: Custom TCP Rule
- Protocol: TCP
- Port Range: 9999
- Source: 0.0.0.0/0

- Type: Custom TCP Rule
- Protocol: TCP
- Port Range: 9999
- Source: 0.0.0.0/0

I have checked port binding on the container with this:

sudo docker exec -it pingfederate netstat -tuln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 0.0.0.0:9999            0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:9031            0.0.0.0:*               LISTEN 

However the server fails to start. Here’s a short snippet of the error log. I have the full log on github gist here:

Tailing log files (/opt/out/instance/log/server.log)

Starting server in foreground: (/opt/out/instance/bin/run.sh )
----- Starting hook: /opt/staging/hooks/80-post-start.sh
INFO: waiting for healthy admin before post-start..
curl: (7) Failed to connect to 127.0.0.1 port 9999 after 0 ms: Couldn't connect to server
VM settings:
    Max. Heap Size (Estimated): 2.80G
    Using VM: OpenJDK 64-Bit Server VM

curl: (7) Failed to connect to 127.0.0.1 port 9999 after 0 ms: Couldn't connect to server
/opt/out/instance/log/server.log:  2024-07-11 16:28:21,780  INFO  [com.pingidentity.appserver.jetty.PingFederateInit] Current Directory: /opt/.
/opt/out/instance/log/server.log:  2024-07-11 16:28:21,795  INFO  [com.pingidentity.appserver.jetty.PingFederateInit] =========================================================================

Why does it fail to connect? I am able to run the container on Mac.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT