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 Java in General and the fly likes java.net.ConnectException: Connection timed out:check service is available or not 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 » Java in General
Bookmark "java.net.ConnectException: Connection timed out:check service is available or not " Watch "java.net.ConnectException: Connection timed out:check service is available or not " New topic
Author

java.net.ConnectException: Connection timed out:check service is available or not

Komari raj
Ranch Hand

Joined: Dec 12, 2008
Posts: 43
Hi all

I am getting Exception when i hit the yahoo.com.


It is taking so much time for displaying console...finally i got following exception...


java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:352)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:214)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:201)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:377)
at java.net.Socket.connect(Socket.java:530)
at java.net.Socket.connect(Socket.java:480)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:406)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:541)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:245)
at sun.net.www.http.HttpClient.New(HttpClient.java:318)
at sun.net.www.http.HttpClient.New(HttpClient.java:335)



Why it is taking so much time ....and not even display response is true or not

Please help on this if you know about this..


regards
Raju

Saptarshi Chakraborty
Greenhorn

Joined: Jul 26, 2007
Posts: 23
I am having exactly the same problem on this similar code .
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.net.ConnectException: Connection timed out:check service is available or not
 
Similar Threads
HttpURLConnection timed out
Tomcat cant recognize "error-page" tag in web.xml
SocketException in WSAD
Access to website using Java Code
about HTTPS connection