Java.net. SocketTimeoutException: Connection timed out

Source: Internet
Author: User

Java.net. SocketTimeoutException: Connection timed out
At org. apache. harmony. luni. platform. OSNetworkSystem. connect (Native Method)
At dalvik. system. BlockGuard $ WrappedNetworkSystem. connect (BlockGuard. java: 357)
At org.apache.harmony.luni.net. PlainSocketImpl. connect (PlainSocketImpl. java: 204)
At org.apache.harmony.luni.net. PlainSocketImpl. connect (PlainSocketImpl. java: 437)
At java.net. Socket. connect (Socket. java: 983)
At org.apache.harmony.luni.internal.net. www. protocol. http. HttpConnection. <init> (HttpConnection. java: 75)
At org.apache.harmony.luni.internal.net. www. protocol. http. HttpConnection. <init> (HttpConnection. java: 48)
At org.apache.harmony.luni.internal.net. www. protocol. http. HttpConnection $ Address. connect (HttpConnection. java: 322)
At org.apache.harmony.luni.internal.net. www. protocol. http. HttpConnectionPool. get (HttpConnectionPool. java: 89)
At org.apache.harmony.luni.internal.net. www.protocol. http. HttpURLConnectionImpl. getHttpConnection (HttpURLConnectionImpl. java: 285)
At org.apache.harmony.luni.internal.net. www. protocol. http. HttpURLConnectionImpl. makeConnection (HttpURLConnectionImpl. java: 267)
At org.apache.harmony.luni.internal.net. www. protocol. http. HttpURLConnectionImpl. retrieveResponse (HttpURLConnectionImpl. java: 1018)
At org.apache.harmony.luni.internal.net. www. protocol. http. HttpURLConnectionImpl. getResponseCode (HttpURLConnectionImpl. java: 726)
At test. NewsTest. testNetConn (NewsTest. java: 35)
At java. lang. reflect. Method. invokeNative (Native Method)
At android. test. AndroidTestRunner. runTest (AndroidTestRunner. java: 169)
At android. test. AndroidTestRunner. runTest (AndroidTestRunner. java: 154)
At android. test. InstrumentationTestRunner. onStart (InstrumentationTestRunner. java: 529)

At android. app. Instrumentation $ InstrumentationThread. run (Instrumentation. java: 1448)

The cause of the above error message is summarized as follows:

1. At that time, I forgot to enable the virtual wifi of my computer win7;

2. Another reason is that if you write a web application by yourself, check whether the service has been released and started;

3. Check whether your URL is correct;

In a word, the error message is "connection timeout", which is definitely a problem related to the (network) connection. Just find the cause carefully, hope it will help beginners!

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.