Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

java.net.ConnectException: Connection timed out: connect

 
Ranch Hand
Posts: 74
  • 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 ]
 
Bartender
Posts: 9612
16
Mac OS X Linux Windows
  • 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
  • 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: 9612
16
Mac OS X Linux Windows
  • 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
  • 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
 
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!