'NoRouteToHostException "Address not available"

In my Android app, I do poll a device (Wallbox) every 5 seconds using the Volley library. For one customer, I get

java.net.NoRouteToHostException: Address not available

after several hours. Usually, using the exactly same type of device and at my place, this polling works for days, but not at (at least) this customer.

The device address is on the local LAN.

I have not found any description about "address not available" that might apply to my case, or at least I did not see the point.

The call is always the same:

http://192.168.160.152/api/status

As this is live data, I set ".setShouldCache(false)" for the request.

Meanwhile, other HTTP requests (in this case, a query to a WWW address, also polled continuously), even using Volley, continue to work:

https://backend.powerfox.energy/api/2.0/my/***********/current

The connection works again after rebooting the device (and at the same original IP address), so I guess it has nothing to do with the wallbox or the router.

And if the wallbox would be not available, I assue I would get "unreachable" error or such.

Is there someone who can help me, what could cause that exception ("address not available"), and what can I do about it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source