Page MenuHomePhabricator

PAWS terminal can not connect to the internet
Closed, ResolvedPublic

Description

Steps to reproduce

  1. Open PAWS terminal
  2. Run whatever command needs a connection

Few terminal command outputs:

$ pwb.py login
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/srv/paws/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 "/usr/lib/python3.6/socket.py", line 743, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
conn.connect()
File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
conn = self._new_conn()
File "/srv/paws/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.VerifiedHTTPSConnection object at 0x7fd709ff45f8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='cs.wikipedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fd709ff45f8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1957, in submit
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1458, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 322, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 511, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 398, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 377, in _http_process
verify=not ignore_validation)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='cs.wikipedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fd709ff45f8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
WARNING: Waiting 10 seconds before retrying.
ERROR: Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/srv/paws/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 "/usr/lib/python3.6/socket.py", line 743, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
conn.connect()
File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
conn = self._new_conn()
File "/srv/paws/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.VerifiedHTTPSConnection object at 0x7fd709ff4240>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='cs.wikipedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fd709ff4240>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1957, in submit
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1458, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 322, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 511, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 398, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 377, in _http_process
verify=not ignore_validation)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='cs.wikipedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fd709ff4240>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
WARNING: Waiting 20 seconds before retrying.
^CTraceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/srv/paws/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 "/usr/lib/python3.6/socket.py", line 743, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
conn.connect()
File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
conn = self._new_conn()
File "/srv/paws/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.VerifiedHTTPSConnection object at 0x7fd709ff4240>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='cs.wikipedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fd709ff4240>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pywikibot/data/api.py", line 1957, in submit
body=body, headers=headers)
File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1458, in wrapper
return obj(*__args, **__kw)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 322, in request
r = fetch(baseuri, method, params, body, headers, **kwargs)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 511, in fetch
error_handling_callback(request)
File "/srv/paws/pwb/pywikibot/comms/http.py", line 398, in error_handling_callback
raise request.data
File "/srv/paws/pwb/pywikibot/comms/http.py", line 377, in _http_process
verify=not ignore_validation)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='cs.wikipedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fd709ff4240>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/paws/pwb/pwb.py", line 262, in <module>
if not main():
File "/srv/paws/pwb/pwb.py", line 255, in main
run_python_file(filename, [filename] + args, argvu, file_package)
File "/srv/paws/pwb/pwb.py", line 121, in run_python_file
main_mod.__dict__)
File "/srv/paws/pwb/scripts/login.py", line 190, in <module>
main()
File "/srv/paws/pwb/scripts/login.py", line 173, in main
site.login(sysop)
File "/srv/paws/pwb/pywikibot/site.py", line 2071, in login
self.getuserinfo(force=True)
File "/srv/paws/pwb/pywikibot/site.py", line 2155, in getuserinfo
uidata = uirequest.submit()
File "/srv/paws/pwb/pywikibot/data/api.py", line 1899, in submit
self._add_defaults()
File "/srv/paws/pwb/pywikibot/data/api.py", line 1702, in _add_defaults
MediaWikiVersion(self.site.version()) >= MediaWikiVersion('1.25wmf5')):
File "/srv/paws/pwb/pywikibot/site.py", line 2739, in version
expiry=1).split(' ')[1]
File "/srv/paws/pwb/pywikibot/site.py", line 1681, in get
preloaded = self._get_general(key, expiry)
File "/srv/paws/pwb/pywikibot/site.py", line 1627, in _get_general
default_info = self._get_siteinfo(props, expiry)
File "/srv/paws/pwb/pywikibot/site.py", line 1552, in _get_siteinfo
data = request.submit()
File "/srv/paws/pwb/pywikibot/data/api.py", line 2355, in submit
self._data = super(CachedRequest, self).submit()
File "/srv/paws/pwb/pywikibot/data/api.py", line 1981, in submit
self.wait()
File "/srv/paws/pwb/pywikibot/data/api.py", line 2213, in wait
time.sleep(self.retry_wait)
KeyboardInterrupt
<class 'KeyboardInterrupt'>
CRITICAL: Closing network session.
$ curl www.google.com
curl: (6) Could not resolve host: www.google.com
$ curl http://followers.thcnet.cz/CyberNet/Punk-Rock%20Rebels%20Library/8.%20Fine%20Literacy/eBOOKs/Macha-Maj.pdf
curl: (6) Could not resolve host: followers.thcnet.cz
$ git clone https://github.com/dvorapa/meta-version.git
Cloning into 'meta-version'...
fatal: unable to access 'https://github.com/dvorapa/meta-version.git/': Could not resolve host: github.com

Event Timeline

Dvorapa updated the task description. (Show Details)
Framawiki claimed this task.
Framawiki subscribed.

It was solved during the week

Welcome to PAWS!
Please behave responsibly
Getting Started: https://www.mediawiki.org/wiki/Manual:Pywikibot/PAWS
Questions? Need help? Find us on #pywikibot on IRC on freenode!
File bugs at https://phabricator.wikimedia.org/maniphest/task/create/?projects=PAWS
framawiki@PAWS:~$ curl google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
framawiki@PAWS:~$ pwb.py login
Logged in on wikipedia:test as Framawiki.
framawiki@PAWS:~$ pwb.py shell
pywikibWelcome to the Pywikibot interactive shell!
>>> import pywikibot as pw
>>> pw.Page(pw.Site(), 'test').text
'test\n1234'
>>>