File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to send socket connection with the server socket

 
Vinod Vijay
Ranch Hand
Posts: 146
Java Tomcat Server Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 146
Java Tomcat Server Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 2500
10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic