1

I recently added a service on server A that needs to be accessed from server B. The service is listening is on port 8182 and is operating normally:

[ec2-user ~]$ sudo netstat -tnlp | grep 8182
tcp        0      0 ::ffff:127.0.0.1:8182       :::*                        LISTEN      6298/java

I added a security group to server A that permits traffic to this port from server B:

Type             Protocol  Port Range  Source
Custom TCP Rule  TCP       8182        SERVER.B.I.P/32

However, attempting to access server A from server B is not working:

-bash-4.2$ curl http://SERVER.A.I.P:8182/
curl: (7) Failed to connect to SERVER.A.I.P port 8182: Connection refused

I am using the private IP of both instances and they are in the same region. However, they are in different availability zones (but that shouldn't matter for private IPs). Any ideas what might I'm doing wrong here?

cscan
  • 111
  • 1

1 Answers1

2

The service is bind to 127.0.0.1; as such, is not reacheable from the other instance; bind the service to the IP of your instance.

Marco Bizzarri
  • 1,358
  • 1
  • 11
  • 11