WearOS: Could not register watch

There are already several such posts, but none of them were helpful for me.

I’m running

  • HA version
    • Core 2023.12.4
    • Frontend 20231208.2
  • Android app
    • Phone: 2023.12.4-full

And here’s the relevant part of the app’s logcat:

Click to see logcat logs
01-03 12:50:55.758 18787 18787 D SettingsWearViewModel: Requesting config from node 8b60ca2c
01-03 12:50:55.769 18787 18787 D SettingsWearViewModel: Request for config sent successfully
01-03 12:50:57.538 18787 18787 D SettingsWearViewModel: onDataChanged 1
01-03 12:51:31.620 18787 18787 D SettingsWearViewModel: Successfully sent auth to wear
01-03 12:51:31.624 18787 18787 D SettingsWearViewModel: onDataChanged 1
01-03 12:51:37.984 18787 18787 D SettingsWearViewModel: onDataChanged 1
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: Watch was unable to register: java.net.ConnectException: Failed to connect to ha.example.com/10.0.0.10:8123
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at java.lang.Thread.run(Thread.java:923)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: Caused by: java.net.ConnectException: failed to connect to ha.example.com/10.0.0.10 (port 8123) from /10.0.0.104 (port 52620) after 10000ms: isConnected failed: ECONNABORTED (Software caused connection abort)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at libcore.io.IoBridge.isConnected(IoBridge.java:287)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at libcore.io.IoBridge.connectErrno(IoBridge.java:192)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at libcore.io.IoBridge.connect(IoBridge.java:134)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at java.net.Socket.connect(Socket.java:621)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	... 18 more
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: Caused by: android.system.ErrnoException: isConnected failed: ECONNABORTED (Software caused connection abort)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	at libcore.io.IoBridge.isConnected(IoBridge.java:274)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: 	... 28 more
01-03 12:51:37.986 18787 18787 D SettingsWearViewModel: onDataChanged 1
01-03 12:51:40.763 18787 18787 D SettingsWearViewModel: Requesting config from node 8b60ca2c
01-03 12:51:40.772 18787 18787 D SettingsWearViewModel: Request for config sent successfully
01-03 12:51:41.582 18787 18787 D SettingsWearViewModel: onDataChanged 1
01-03 12:51:58.987 18787 18787 D SettingsWearViewModel: Successfully sent auth to wear
01-03 12:51:58.990 18787 18787 D SettingsWearViewModel: onDataChanged 1
01-03 12:51:59.322 18787 18787 D SettingsWearViewModel: onDataChanged 1
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: Watch was unable to register: java.net.UnknownHostException: Unable to resolve host "ha.example.com": No address associated with hostname
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:156)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at java.net.InetAddress.getAllByName(InetAddress.java:1152)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.Dns$Companion$DnsSystem.lookup(Dns.kt:49)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.kt:169)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.kt:131)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RouteSelector.next(RouteSelector.kt:73)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:205)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at java.lang.Thread.run(Thread.java:923)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at libcore.io.Linux.android_getaddrinfo(Native Method)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:73)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at libcore.io.BlockGuardOs.android_getaddrinfo(BlockGuardOs.java:202)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:73)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:135)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: 	... 23 more
01-03 12:51:59.371 18787 18787 D SettingsWearViewModel: onDataChanged 1

But it mainly boils down to:

01-03 12:50:55.758 18787 18787 D SettingsWearViewModel: Requesting config from node 8b60ca2c
01-03 12:50:55.769 18787 18787 D SettingsWearViewModel: Request for config sent successfully
01-03 12:51:31.620 18787 18787 D SettingsWearViewModel: Successfully sent auth to wear
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: Watch was unable to register: java.net.ConnectException: Failed to connect to ha.example.com/10.0.0.10:8123
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: Caused by: java.net.ConnectException: failed to connect to ha.example.com/10.0.0.10 (port 8123) from /10.0.0.104 (port 52620) after 10000ms: isConnected failed: ECONNABORTED (Software caused connection abort)
01-03 12:51:37.986 18787 18787 E SettingsWearViewModel: Caused by: android.system.ErrnoException: isConnected failed: ECONNABORTED (Software caused connection abort)
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: Watch was unable to register: java.net.UnknownHostException: Unable to resolve host "ha.example.com": No address associated with hostname
01-03 12:51:59.323 18787 18787 E SettingsWearViewModel: Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)

Is there any hope of resolving this?

My PC (.42) can ping both HA (.10) and my watch (.104), all on my local network (10.0.0.x).

What does ECONNABORTED mean in this context, and how do I proceed in troubleshooting?


Thanks for your time,
Tanja

Looks like a DNS issue, the watch is unable to resolve the host name

Looks like a DNS issue

Turns out there was an IP collision (another device resolving to my gateway IP addres)

I tried again just now, and it all works :woman_shrugging:


Still, thanks for the response;
Really appreciate it :blush::sparkles:

1 Like