java.lang.Exception: Unexpected exception, expected<org.apache.http.conn.HttpHostConnectException> but was<org.apache.http.conn.ConnectTimeoutException>

hc-dev | ant elder | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Re: [VOTE] HttpComponents Client 4.1 release based on RC2

    hc-dev | 6 years ago | ant elder
    java.lang.Exception: Unexpected exception, expected<org.apache.http.conn.HttpHostConnectException> but was<org.apache.http.conn.ConnectTimeoutException>

    Root Cause Analysis

    1. org.apache.http.conn.ConnectTimeoutException

      Connect to www.example.com/www.example.com/192.0.32.10 timed out

      at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket()
    2. Apache HttpClient
      TestRequestRetryHandler.testUseRetryHandlerInConnectionTimeOutWithThreadSafeClientConnManager
      1. org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:122)
      2. org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
      3. org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
      4. org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
      5. org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:562)
      6. org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
      7. org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
      8. org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
      9. org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
      10. org.apache.http.impl.client.TestRequestRetryHandler.assertOnRetry(TestRequestRetryHandler.java:103)
      11. org.apache.http.impl.client.TestRequestRetryHandler.testUseRetryHandlerInConnectionTimeOutWithThreadSafeClientConnManager(TestRequestRetryHandler.java:61)
      11 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. JUnit
      ParentRunner.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      5. org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:21)
      6. org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
      7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
      8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
      9. org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      10. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      11. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      12. org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      13. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      14. org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      14 frames
    5. JUnit4 Provider
      JUnit4TestSet.execute
      1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
      1 frame
    6. SureFire
      Surefire.run
      1. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
      2. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102)
      3. org.apache.maven.surefire.Surefire.run(Surefire.java:180)
      3 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    8. SureFire
      SurefireBooter.main
      1. org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
      2. org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
      2 frames