aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Unable to send socket connection with the server socket Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Unable to send socket connection with the server socket" Watch "Unable to send socket connection with the server socket" New topic
Author

Unable to send socket connection with the server socket

Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 119

Hi, I have written server side socket and client side sockets. I have executed my server socket first and trying to run and connect with server by running client now. I can easily connect with my server on same machine but not through different machine on same office LAN.
I'm getting following error message:-
My client:-


My Server:-


Please suggest.


Vinod Vijay Nair
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Are you sure the remote machine is accepting connections on that port? Your java server running there might say "listening at x.x.x.x:x" but that is only java listening. It does not mean the Operating System will allow connections on that port.
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 119

Tim McGuire wrote:Are you sure the remote machine is accepting connections on that port? Your java server running there might say "listening at x.x.x.x:x" but that is only java listening. It does not mean the Operating System will allow connections on that port.


How can I know that my OS is allowing connection on this specific port? Please tell me the steps. I would be really happy if I run my program successfully as I'm newbie in socket programming.

Thanks in advance.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
That's something you should talk about with the network admin; for example, there could be a firewall between the two machines.
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Vinod Vijay wrote:

How can I know that my OS is allowing connection on this specific port? Please tell me the steps. I would be really happy if I run my program successfully as I'm newbie in socket programming.



I guess I would start by trying to ping that remote machine. Do you know the Ping command? We can't know your environment or if that remote machine allows pinging, but it is easy to try. If you have admin rights to the remote machine ( and like Tim Moores said you should talk with the network admin if you have one ) you should be able to change the firewall settings.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to send socket connection with the server socket
 
Similar Threads
Multithread-call center support
Client/Server Communication Problem
UnknownHostException when trying to connect to localhost
Threaded Application won't run.
Doubt in Sockets!!