HttpRunnerManager icon indicating copy to clipboard operation
HttpRunnerManager copied to clipboard

执行用例时报连接问题(Failed to establish a new connection)

Open cairuichun opened this issue 7 years ago • 0 comments

Traceback (most recent call last): File "/work/python3/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn (self.host, self.port), self.timeout, **extra_kw) File "/work/python3/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/work/python3/lib/python3.6/socket.py", line 743, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/work/python3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/work/python3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request conn.request(method, url, **httplib_request_kw) File "/work/python3/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/work/python3/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/work/python3/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/work/python3/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/work/python3/lib/python3.6/http/client.py", line 964, in send self.connect() File "/work/python3/lib/python3.6/site-packages/urllib3/connection.py", line 166, in connect conn = self._new_conn() File "/work/python3/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f173cc51da0>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/work/python3/lib/python3.6/site-packages/requests/adapters.py", line 440, in send timeout=timeout File "/work/python3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/work/python3/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='ad-admin.staging.com', port=80): Max retries exceeded with url: /ad/getMonitorLinks (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f173cc51da0>: Failed to establish a new connection: [Errno -2] Name or service not known',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/work/python3/lib/python3.6/site-packages/httprunner/task.py", line 27, in runTest self.test_runner.run_test(self.testcase_dict) File "/work/python3/lib/python3.6/site-packages/httprunner/runner.py", line 167, in run_test **parsed_request File "/work/python3/lib/python3.6/site-packages/httprunner/client.py", line 147, in request self.meta_data["response"]["ok"] = response.ok File "/work/python3/lib/python3.6/site-packages/requests/models.py", line 697, in ok self.raise_for_status() File "/work/python3/lib/python3.6/site-packages/httprunner/client.py", line 23, in raise_for_status raise self.error File "/work/python3/lib/python3.6/site-packages/httprunner/client.py", line 198, in _send_request_safe_mode return requests.Session.request(self, method, url, **kwargs) File "/work/python3/lib/python3.6/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/work/python3/lib/python3.6/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/work/python3/lib/python3.6/site-packages/requests/adapters.py", line 508, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='ad-admin.staging.com', port=80): Max retries exceeded with url: /ad/getMonitorLinks (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f173cc51da0>: Failed to establish a new connection: [Errno -2] Name or service not known',))

cairuichun avatar Nov 12 '18 12:11 cairuichun