Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> requests.get('http://localhost:123')
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "/usr/lib/python2.7/site-packages/requests/api.py", line 71, in get
- return request('get', url, params=params, **kwargs)
- File "/usr/lib/python2.7/site-packages/requests/api.py", line 57, in request
- return session.request(method=method, url=url, **kwargs)
- File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
- resp = self.send(prep, **send_kwargs)
- File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 585, in send
- r = adapter.send(request, **kwargs)
- File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 467, in send
- raise ConnectionError(e, request=request)
- requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=123): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f08810d8110>: Failed to establish a new connection: [Errno 111] Connection refused',))
- >>> requests.get('http://192.168.201.4:123')
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "/usr/lib/python2.7/site-packages/requests/api.py", line 71, in get
- return request('get', url, params=params, **kwargs)
- File "/usr/lib/python2.7/site-packages/requests/api.py", line 57, in request
- return session.request(method=method, url=url, **kwargs)
- File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
- resp = self.send(prep, **send_kwargs)
- File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 585, in send
- r = adapter.send(request, **kwargs)
- File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 467, in send
- raise ConnectionError(e, request=request)
- requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.201.4', port=123): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f08810d8910>: Failed to establish a new connection: [Errno 113] No route to host',))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement