执行接口的时候出现如下错误:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.110.201', port=443): Max retries exceeded with url: /api/get.htm (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x211f990>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
找到linux系统的dns解析设置文件:/etc/resolv.conf
文件,将原来的nameserver 8.8.8.8
改成国内比较稳定的dns解析ip,这里小猪推荐使用腾讯的:
nameserver 119.29.29.29
nameserver 182.254.116.116
上述两个IP中,第一个为主要使用,第二个为备用。