• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.net.ConnectException: Connection timed out: connect

 
Bhuvana Raj
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

It is a client server program using applet and socket. We are using applet in the client side & socket for communication to server.

In XP OS SP2 the socket object is not created and throws java.net.ConnectException: Connection timed out: connect.

Is it due to firewall that blocks port?

Thanks,
Bhuvana
[ November 02, 2007: Message edited by: Bhuvana Raj ]
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is XP the server or the client?
I don't think XP's integral firewall blocks outgoing connections like more sophisticated firewalls (ZoneAlarm, for instance) do, so if XP is the client, I wouldn't blame the firewall.
In any case, the XP firewall is easy enough to turn off that you should be able to quickly test if it is the source of your problem.
 
Bhuvana Raj
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for your reply.

Client OS is Windows XP SP2.Server is Windows 2003 Server. For example, Server is running in the port 2000. Client tries to communicate to this port number but fails and throws: java.net.ConnectException: Connection timed out: connect.

It fail at this line: socketObject = new Socket(host,port); Before this line it prints the correct port number 2000 and the host name.

Please help me

Regards,
Bhuvana
[ November 03, 2007: Message edited by: Bhuvana Raj ]
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this problem specific to WinXP clients? Do you have other clients that can connect successfully?
Does your Windows 2003 server have a firewall (the answer to this question had better be "YES")? Is it properly configured?
Is your server in a DMZ or are there firewalls or proxies between your client and server?
 
Bhuvana Raj
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Joe Ess:
Is this problem specific to WinXP clients? Do you have other clients that can connect successfully?
Does your Windows 2003 server have a firewall (the answer to this question had better be "YES")? Is it properly configured?
Is your server in a DMZ or are there firewalls or proxies between your client and server?


Hi Joe,

The problem is solved. The network from which we tried to access the Server has firewall problem that blocks in creating the socket from one network to other.

We tried in stand alone XP systems and found to be working.

Kindly let me know if you have any questions.

Regards,
Bhuvana
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic