pass the port to resolve_server() and check the return value