org.apache.http.conn.HttpHostConnectException

Connection to http://10.0.2.2:8080 refused

Samebug tips2

The system selects automatically a group owner. The owner is always 192.168.49.1, and maybe it's trying to connect to itself. If you want to select an owner yourself, you can change the value of ownerIntent, more on this here: https://goo.gl/DGEh7K

If you're using Retrofit, check if the page you're trying to access doesn't redirect you somewhere else, as it seems to this exception.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web821

  • via androids.help by Unknown author, 1 year ago
    Connection to http://10.0.2.2:8080 refused
  • Connection to http://10.0.2.2:8080 refused
  • via Stack Overflow by plasmy
    , 1 year ago
    Connection to http://10.0.2.2:8080 refused
  • Stack trace

    • org.apache.http.conn.HttpHostConnectException: Connection to http://10.0.2.2:8080 refused at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:653) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:627) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:616) at com.esri.core.internal.io.handler.h.a(Unknown Source) at com.esri.core.internal.io.handler.h.a(Unknown Source) at com.esri.core.internal.tasks.ags.s.a(Unknown Source) at com.esri.android.map.ags.ArcGISDynamicMapServiceLayer.initLayer(Unknown Source) at com.esri.android.map.ags.ArcGISDynamicMapServiceLayer$1.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) at java.lang.Thread.run(Thread.java:856) Caused by: java.net.ConnectException: failed to connect to /10.0.2.2 (port 8080) after 1200000ms: connect failed: ENETUNREACH (Network is unreachable) at libcore.io.IoBridge.connect(IoBridge.java:114) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:460) at java.net.Socket.connect(Socket.java:832) at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144) ... 18 more Caused by: libcore.io.ErrnoException: connect failed: ENETUNREACH (Network is unreachable) at libcore.io.Posix.connect(Native Method) at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85) at libcore.io.IoBridge.connectErrno(IoBridge.java:144) at libcore.io.IoBridge.connect(IoBridge.java:112) ... 23 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    2 times, 3 months ago
    4 times, 8 months ago
    40 times, 9 months ago
    12 times, 11 months ago
    30 times, 1 year ago
    24 more bugmates