Fix selection of a server when a DNS entry resolves to more than one.
Fix null insertion of hostname in error message when open fails.
Update notes on the selection and message fix.