Http error: EHOSTUNREACH (No route to host)
See original GitHub issue- App build number: 20410000
- Android version: 11
- Device: Realme X2 Pro
- Installation source: F-Droid
Hello, I want to use the Owntracks app in combination with the home automation solution FHEM and the module “livetracking”. The module provides a server endpoint to which the app can connect to. My setup is as follows: I have a nginx reverse proxy installed with certificates from Lets Encrypt for https, the endpoint is secured through basic authentication. The proxy routes the request to the specified endpoint. This works fine when I trigger the endpoint through a normal browser GET-request over the external adress “https://adresspart1.adresspart2.myfritz.net/fhem/osmand”. But when I enter the adress in the http settings in the Owntracks app in the form “https://user:password@adresspart1.adresspart2.myfritz.net/fhem/osmand”, I always get the following error in the log:
2022-09-22 20:06:16.843 E MessageProcessor: Message delivery failed. queueLength: 1, messageId: 1663869974211-6a4ef9 2022-09-22 20:06:16.845 W MessageProcessor: Error sending message. Re-queueing 2022-09-22 20:06:16.859 I MessageProcessor: Waiting for 1 s before retrying 2022-09-22 20:06:20.356 E MessageProcessorEndpointHttp: HTTP Delivery failed java.net.ConnectException: Failed to connect to adresspart1.adresspart2.myfritz.net/IPV6ADRESS:443 at okhttp3.internal.connection.RealConnection.connectSocket(SourceFile:133) at okhttp3.internal.connection.RealConnection.connect(SourceFile:178) at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(SourceFile:643) at okhttp3.internal.connection.ConnectInterceptor.intercept(SourceFile:62) at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:148) at okhttp3.internal.cache.CacheInterceptor.intercept(SourceFile:140) at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:148) at okhttp3.internal.http.BridgeInterceptor.intercept(SourceFile:172) at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:148) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(SourceFile:147) at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:148) at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(SourceFile:97) at okhttp3.internal.connection.RealCall.execute(SourceFile:42) at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:305) at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2) at org.owntracks.android.services.MessageProcessor.$r8$lambda$DontKnowWhatThisIs(Unknown Source:0) at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:254) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: java.net.ConnectException: failed to connect to adresspart1.adresspart2.myfritz.net/IPV6ADRESS (port 443) from /IPV6ADRESS (port 41920) after 30000ms: isConnected failed: EHOSTUNREACH (No route to host) at libcore.io.IoBridge.isConnected(IoBridge.java:287) at libcore.io.IoBridge.connectErrno(IoBridge.java:192) at libcore.io.IoBridge.connect(IoBridge.java:134) at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436) at java.net.Socket.connect(Socket.java:621) at okhttp3.internal.platform.Platform.connectSocket(Unknown Source:5) at okhttp3.internal.connection.RealConnection.connectSocket(SourceFile:74) ... 21 more Caused by: android.system.ErrnoException: isConnected failed: EHOSTUNREACH (No route to host) at libcore.io.IoBridge.isConnected(IoBridge.java:274) ... 31 more
Has someone maybe encountered a similar problem or can say where the problem is located? Thanks for your help.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (1 by maintainers)

Top Related StackOverflow Question
Thank you both very much, you answers pointed in the right direction, it is working now. The problem was that I did not noticed that in the port forwarding settings in the Fritz!Box there was the false IPv6 adress in the “IPv6 Interface-ID” field. I’ve changed it to the adress of my server and it works flawlessly. Thank you very much again!
@slamdown251 if you can convice your Fritz!Box to not publish IPv6 DNS records (
AAAA) the problem will likely solve itself. As that may not be possible, you could experiment with one of the free “dyn” services and (manually) set up a DNS name pointing to your IPv4 endpoint (i.e. publish anAaddress record) and use that name in the Android app.