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

Ignore intermittent http connection errors to OpenMHz #80

Open
mpuckett159 opened this issue Oct 21, 2021 · 0 comments
Open

Ignore intermittent http connection errors to OpenMHz #80

mpuckett159 opened this issue Oct 21, 2021 · 0 comments

Comments

@mpuckett159
Copy link
Contributor

Just need to ignore this because sometimes OpenMHz fails to respond to a new request or just goes offline, but should ignore because it's fine.

Error message:
BOT FAILURE: HTTPSConnectionPool(host='api.openmhz.com', port=443): Max retries exceeded with url: /kcers1b/calls/newer?filter-type=group&filter-code=5ee350e04983d0002586456f&time=1634780775633 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc8e86d2490>: Failed to establish a new connection: [Errno 111] Connection refused'))
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 353, in connect
conn = self._new_conn()
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fc8e86d2490>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.openmhz.com', port=443): Max retries exceeded with url: /kcers1b/calls/newer?filter-type=group&filter-code=5ee350e04983d0002586456f&time=1634780775633 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc8e86d2490>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/app/signal_scanner_bot/transport.py", line 148, in radio_monitor_alert_transport
if radio_monitor_alert_messages := radio_monitor_alert.check_radio_calls():
File "/app/signal_scanner_bot/radio_monitor_alert.py", line 79, in check_radio_calls
calls = get_openmhz_calls()
File "/app/signal_scanner_bot/radio_monitor_alert.py", line 38, in get_openmhz_calls
response = requests.get(env.OPENMHZ_URL, params={"time": lookback_time})
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.openmhz.com', port=443): Max retries exceeded with url: /kcers1b/calls/newer?filter-type=group&filter-code=5ee350e04983d0002586456f&time=1634780775633 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc8e86d2490>: Failed to establish a new connection: [Errno 111] Connection refused'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant