如果文本文件中有多个主机名,我会收到这个错误消息"gaierror: Errno8nodename or servname provided,or not known“ import socketais: print ('{0} ip address is {1}'.format(website,ip)) gaierror: [Errno8<
urllib3.connection.VerifiedHTTPSConnection object at 0x10ee72310>: Failed to establish a new connection: [Errno8] nodename nor servname provided, or not known',))) caused by: ConnectionError(HTTPSConnectionPool(urllib3.connection.VerifiedHTTPSConnection ob
in _families_and_addresses socket.gaierror: [Errno8] nodename nor servname provided, or not known
好的,我发现了gai=getaddrinfo,还有getaddrbyname等等。我还试图连接到"localhost“或"127.0.0.1”
复制集配置包含服务器的内部ips或主机名。我得到了以下错误:
pymongo.errors.ServerSelectionTimeoutError: mongodbdriver20151129-arbiter-1:27017: [Errno8] nodename nor servname provided, or not known,mongodbdriver20151129-instance-1:27017: [Errno8] nodenamen