Fetching the IP address sometimes fails.
One example traceback:
2023-08-11 18:26:08 urllib3.connectionpool WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8bb0e50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /
2023-08-11 18:26:19 urllib3.connectionpool WARNING Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8bb1650>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /
2023-08-11 18:26:27 urllib3.connectionpool WARNING Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8bb20d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /
2023-08-11 18:26:32 root INFO Got an exception: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8bb2b50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
2023-08-11 18:26:32 root INFO Got exception ConnectionError('Failed to get the IP address')
2023-08-11 18:26:32 root INFO rotator.connector.base_ip='185.143.104.11'
2023-08-11 18:26:32 root INFO rotator.connector.current_ip='154.47.25.139'
2023-08-11 18:26:32 root INFO No openvpn processes found to be killed.
2023-08-11 18:26:47 urllib3.connectionpool WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8b64910>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /
2023-08-11 18:26:54 urllib3.connectionpool WARNING Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8b654d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /
2023-08-11 18:27:01 urllib3.connectionpool WARNING Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8b66110>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /
2023-08-11 18:27:05 root INFO Got an exception: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8b66c90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
Traceback (most recent call last):
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/util/connection.py", line 72, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/socket.py", line 962, 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 "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 403, in _make_request
self._validate_conn(conn)
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1053, in _validate_conn
conn.connect()
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7ff8c8bb2b50>: 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 "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 826, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 826, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 826, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 798, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8bb2b50>: 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 "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/sirup/utils.py", line 24, in get_ip
response = session.get("https://ifconfig.me", timeout=3)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8bb2b50>: 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 "/home/flavio/repositories/websearch-public/src/get_linkedin_data.py", line 138, in <module>
rotator.rotate()
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/sirup/IPRotator.py", line 83, in rotate
self.disconnect()
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/sirup/IPRotator.py", line 77, in disconnect
self.connector.disconnect(self.pwd)
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/sirup/VPNConnector.py", line 83, in disconnect
self.current_ip = get_ip()
^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/sirup/utils.py", line 37, in get_ip
raise requests.ConnectionError("Failed to get the IP address")
requests.exceptions.ConnectionError: Failed to get the IP address
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/util/connection.py", line 72, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/socket.py", line 962, 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 "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 403, in _make_request
self._validate_conn(conn)
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1053, in _validate_conn
conn.connect()
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7ff8c8b66c90>: 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 "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 826, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 826, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 826, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/connectionpool.py", line 798, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8b66c90>: 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 "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/sirup/utils.py", line 24, in get_ip
response = session.get("https://ifconfig.me", timeout=3)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8c8b66c90>: 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 "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/flavio/repositories/websearch-public/src/get_linkedin_data.py", line 145, in <module>
rotator.connect()
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/sirup/IPRotator.py", line 52, in connect
connector = VPNConnector(self.config_queue.pop_append(), self.auth_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/sirup/VPNConnector.py", line 23, in __init__
ip = get_ip()
^^^^^^^^
File "/home/flavio/repositories/websearch-public/env/lib/python3.11/site-packages/sirup/utils.py", line 37, in get_ip
raise requests.ConnectionError("Failed to get the IP address")
requests.exceptions.ConnectionError: Failed to get the IP address