This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Connection timed out. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Connection timed out." Watch "Connection timed out." New topic

Connection timed out.

sarath chadrach

Joined: Feb 23, 2011
Posts: 5
Hi All,

I have a issue here,

i.e I'm able to connect to a particular URL from the browser(Ex.Internet Explorer) successfully.

But when I'm using HttpURLConnection to hit the same URL I'm getting the error as Connection timed out. The same code is successfully working in my local system but in the production system i'm getting the above error.

Please let me know what can be the issue for the same. Is there any firewall issue could be there.

Thanking you in advance.

Rob Spoor

Joined: Oct 27, 2005
Posts: 19651

Welcome to the Ranch!

Are you using a proxy in your browser? If so, you must use the URL.openConnection method that takes a instance.

How To Ask Questions How To Answer Questions
It is sorta covered in the JavaRanch Style Guide.
subject: Connection timed out.
Similar Threads
Unable to install PMD plugin in Eclipse
Lookup issue with IPv6 address on Solaris
Getting Connection Timed Out error
IPv6: Lookup error
unable to connect Sybase using real ip