Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [Errno 101] Network is unreachable #207

Open
scottyhq opened this issue May 8, 2024 · 0 comments
Open

OSError: [Errno 101] Network is unreachable #207

scottyhq opened this issue May 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@scottyhq
Copy link
Contributor

scottyhq commented May 8, 2024

The bug

I noticed what seems like an intermittent network error. Simply waiting and re-running is a workaround, but wanted to report it anyways (hyp3-isce2 v1.0.1)

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='urs.earthdata.nasa.gov', port=443): Max retries exceeded with url: /oauth/authorize?response_type=code&client_id=BO_n7nTIlMljdvU6kRRB3g&redirect_uri=https%3A%2F%2Fauth.asf.alaska.edu%2Flogin (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f59187f18d0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

To Reproduce

As mentioned, it isn't consistently reproduced, I ran the following when I encountered this:

python -m hyp3_isce2 ++process insar_tops_burst \
      S1_292377_IW2_20160314T020058_VV_C91D-BURST \
      S1_292377_IW2_20160407T020058_VV_EB2A-BURST \
      --looks 20x4 \
      --apply-water-mask false 

Additional context

Full Traceback
Traceback (most recent call last):
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/urllib3/connection.py", line 203, in _new_conn
  sock = connection.create_connection(
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection
  raise err
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/urllib3/util/connection.py", line 73, in create_connection
  sock.connect(sa)
OSError: [Errno 101] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/urllib3/connectionpool.py", line 791, in urlopen
  response = self._make_request(
             ^^^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/urllib3/connectionpool.py", line 492, in _make_request
  raise new_e
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/urllib3/connectionpool.py", line 468, in _make_request
  self._validate_conn(conn)
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1097, in _validate_conn
  conn.connect()
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/urllib3/connection.py", line 611, in connect
  self.sock = sock = self._new_conn()
                     ^^^^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/urllib3/connection.py", line 218, in _new_conn
  raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f59187f18d0>: Failed to establish a new connection: [Errno 101] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
  resp = conn.urlopen(
         ^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/urllib3/connectionpool.py", line 845, in urlopen
  retries = retries.increment(
            ^^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/urllib3/util/retry.py", line 515, in increment
  raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='urs.earthdata.nasa.gov', port=443): Max retries exceeded with url: /oauth/authorize?response_type=code&client_id=BO_n7nTIlMljdvU6kRRB3g&redirect_uri=https%3A%2F%2Fauth.asf.alaska.edu%2Flogin (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f59187f18d0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

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/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/hyp3_isce2/__main__.py", line 51, in <module>
  main()
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/hyp3_isce2/__main__.py", line 47, in main
  sys.exit(process_entry_point.load()())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/hyp3_isce2/insar_tops_burst.py", line 530, in main
  insar_tops_burst(
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/hyp3_isce2/insar_tops_burst.py", line 101, in insar_tops_burst
  ref_metadata, sec_metadata = download_bursts([ref_params, sec_params])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/hyp3_isce2/burst.py", line 331, in download_bursts
  with get_asf_session() as asf_session:
       ^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/hyp3_isce2/burst.py", line 309, in get_asf_session
  response = session.get('https://urs.earthdata.nasa.gov/oauth/authorize', params=payload)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
  return self.request("GET", url, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
  resp = self.send(prep, **send_kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
  r = adapter.send(request, **kwargs)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/requests/adapters.py", line 519, in send
  raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='urs.earthdata.nasa.gov', port=443): Max retries exceeded with url: /oauth/authorize?response_type=code&client_id=BO_n7nTIlMljdvU6kRRB3g&redirect_uri=https%3A%2F%2Fauth.asf.alaska.edu%2Flogin (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f59187f18d0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
@scottyhq scottyhq added the bug Something isn't working label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant