I am trying to bind two processes through a socket connection. One is a python application and the other is a php script.
I created and tested the client / server combination on my home computer and it works correctly. However, when I deploy an EC2 instance (ubuntu 10.10 64bit ami + apache + php), I get the inability to connect to the socket error (111 Connection Refused) from the php script. A python application can bind to a socket and listen for messages, but a PHP script cannot send messages.
I have opened the required ports in the amazon security group, and I can connect to the port from the outside using telnet. However, if I try to connect to telnet from the server, I get the same message as the failure error.
How can I solve this problem?
Edit: both processes are in the same instance
source
share