Fixed #20038 -- Better error message for host validation.
Fix contrib.messages tests for discovery.