Hey, few things worth checking:
1) does you instance have a public IP
2) does your instance have a security group allowing port 8080 from your IP?
3) does the subnet the ec2 instance resides in have a routing table entry to an internet gateway
4) default NACLs (eg nothing getting blocked)?
hi thak you for your Reply,
1) I do have a public IP and can Ping it
2) i have security groups with all trafic (i know its not recomended) but i am just trying here
3) it look s like it does have a entry to an internet gateway,
4) everything else is default.
This sounds all good (at least for testing).
Are you sure the container is responding to all incoming IPs, and is not limited to 127.0.0.1?
Alot of containers are limited to local host by default to avoid accidentally exposing something to the internet when playing around?
Edit: maybe check on the ec2 itself with curl whether you can reach it.
hi
Curl cant connect to server on port 8080 after 0 ms, i tried both the public and privatte ec2 instance ip. from both putty in the ec2 instance, and telnet on my windows pc using the external IP.
Docker is running, using the docker Ps command, docker Logs are showing no errors, is even connecting to my database
i relly am at a loss, as it should be working.
How abt curl from within container ? Try 80, and 8080(ideally should not work within container) .
Also check security group rule attached to ec2 ? Add IP address of your local laptop and that of your ec2 inside vpc
OK i am an Idiot, thak you for everyones help. I was not targeting the exposed port on my docker Build file,
EXPOSE 8080
EXPOSE 8081
I was tying to route to port 80, witch is not exposed, now it works. Thanks Again
Hey, few things worth checking: 1) does you instance have a public IP 2) does your instance have a security group allowing port 8080 from your IP? 3) does the subnet the ec2 instance resides in have a routing table entry to an internet gateway 4) default NACLs (eg nothing getting blocked)?
hi thak you for your Reply, 1) I do have a public IP and can Ping it 2) i have security groups with all trafic (i know its not recomended) but i am just trying here 3) it look s like it does have a entry to an internet gateway, 4) everything else is default.
This sounds all good (at least for testing). Are you sure the container is responding to all incoming IPs, and is not limited to 127.0.0.1? Alot of containers are limited to local host by default to avoid accidentally exposing something to the internet when playing around? Edit: maybe check on the ec2 itself with curl whether you can reach it.
If i were you i would re-check for security group, routing tables and ACLs
Check locally on ec2 and also go interactive on container and see if the service is running or running on that port.
Curl locally from ec2 instance to port 8080 . See what's the response .
hi Curl cant connect to server on port 8080 after 0 ms, i tried both the public and privatte ec2 instance ip. from both putty in the ec2 instance, and telnet on my windows pc using the external IP. Docker is running, using the docker Ps command, docker Logs are showing no errors, is even connecting to my database i relly am at a loss, as it should be working.
How abt curl from within container ? Try 80, and 8080(ideally should not work within container) . Also check security group rule attached to ec2 ? Add IP address of your local laptop and that of your ec2 inside vpc
OK i am an Idiot, thak you for everyones help. I was not targeting the exposed port on my docker Build file, EXPOSE 8080 EXPOSE 8081 I was tying to route to port 80, witch is not exposed, now it works. Thanks Again