Niel Niel - 3 months ago 52
Node.js Question

AWS EC2 instance access internal server

In my Amazon EC2 instance I have a Pyramid server as well as a NodeJS server running. The NodeJS server acts as the frontend and I updated my security groups so I can use the public DNS to view the page.

The Pyramid server acts as a backend and the frontend accesses it by
. But when I do an http call to the backend I get a
Failed to load resource: net::ERR_ADDRESS_INVALID
error message.

Do I need to add a rule to the security groups, or update the iptables, or something?


If both of these services are running on the same server, you shouldn't be sending network traffic out of the server and back, so security groups will not be an issue here.

The question is, why are you using here? I think you probably configured the Pyramid server to listen on, which really means "listen on all IP addresses". However you need to be using or http://localhost:8002/ in order to connect to the service from another service running on the same server.