Exception in thread “main” java.net.NoRouteToHostException: No route to host

The exception typically indicates a network routing problem of some kind. This may be the result of a problem with the network configuration in you LAN or WAN, or it may be a result of a network link or switch outage. It can even be cause by failure of the host that you are trying to talk to.

IMO, it is unlikely to be a network firewall issue, though that is also possible. (Normally a firewall will simply discard packets to block traffic, and that is most likely to result in connection timeouts. However, a firewall could respond with an Destination Unreachable packet that would result in this exception.)

Leave a Comment