Hi @bjorn_massoels,
I think that when there is a replica set connection type the drivers/shell are getting the values based on rs.conf and build the monitor threads.
You can check by just using ip:port connection it will work.
If this is the case you need to have resolvable dns names in the replica config from yoyr client side. Files like etc/hosts might help.
Best
Pavel