Results 1 to 3 of 3

Thread: problem with socket

Hybrid View

  1. #1
    Join Date
    Mar 2012

    problem with socket

    Hi everyone!

    I am working with EC2 Amazon and I have a socket server in PHP listening on port 5006.

    The problem is that socket clients can not connect, the error message is:

    Could not connect: [51] Network is unreachable
    I have open the port in the EC2 management console.

    Also, the IP that the server connects to is the internal IP “”, not the public IP.

    Could you help me please??

    Thank you very much!!
    Last edited by jessPHP; 02-18-2014 at 04:19 AM. Reason: wrong info

  2. #2
    Join Date
    Mar 2012
    I solved the problem disabling the firewall with this command

    /etc/init.d/iptables stop
    Is it good to disable the Firewall??

    Thank you very much

  3. #3
    Join Date
    Sep 2014
    The snippets of code below show's their socket creation.

    //Create a socket to listen on port 3002
    ServerSocket ss = new ServerSocket(3002);

    //create input streams, read data etc...

    //Create a socket connection to the physical host 'doug-pc'
    Socket sClient = new Socket("doug-PC", 3002);

    //create output streams, write data etc...

    Can anyone identify the problem?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center