Necessary conditions to trigger hang:
- You are connecting to a name that resolves to 3 or more underlying network addresses.
- The first 2 addresses refuse the connection (there is no daemon listening on the appropriate port at that address).
In this case the client will attempt to connect to the third resolved address, but will hang forever waiting.
If you look at a server log that is listening on the third address then you will eventually see:
... error Connection ... No protocol received closing
because the server has received the connection and made the initial reply but has not heard back in the alloted time.