question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created a year ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
slamdown251commented, Sep 30, 2022

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!

0reactions
jpmenscommented, Sep 29, 2022

@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 an A address record) and use that name in the Android app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix "No Route to Host" Connection Error on Linux
"No route to host" is one common error you might face in Linux. Here are the ways to diagnose and fix the "no...
Read more >
The data connection could not be established
Testing the user with Filezilla gives me the error: The data connection could not be established: EHOSTUNREACH - No route to host.
Read more >
Errno::EHOSTUNREACH: No route to host - connect(2) for ...
i get pretty much errors Errno::EHOSTUNREACH: No route to host ... The SDK will never use HTTP unless you've explicity configured an HTTP ......
Read more >
centos - No route to host : Issue only with ftpes - Server Fault
EHOSTUNREACH means that the connection could not be established at the IP/port combo requested; usually because it is blocked by firewall.
Read more >
"EHOSTUNREACH - No route to host" - FileZilla Forums
Hi there, I am getting the following error while trying to connect in ""EHOSTUNREACH - No route to host"" while trying to connect...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found