tl;dr: Users that have TM and JM in different networks will have their logs full with exceptions even in non-error cases.

I do not pass the exception intentionally!
The method is called `tryToConnect()` and nomen est omen. The method exists to determine if it is possible to connect via a network interface to the JobManager address.
So it is very likely (also in cases without errors) that there will be exceptions in the log.
For example the loopback device on linux systems is certainly not able to connect to the JobManager, so it will throw an exception here. Which is not an exception.

The `tryToConnect()` method is only being used if the JobManager and Taskmanager are in different networks. The usual case is that we use the network interface that is in the same network (shares the ip-prefix with the JobManager). I hope that makes sense for you.