prairiedogbeer / fermenator

Fermentation monitoring and management software
0 stars 0 forks source link

urlllib3.exceptions.MaxRetryError not handled #12

Closed prairiedogbeer closed 6 years ago

prairiedogbeer commented 6 years ago
Mar 23 01:27:12 raspberrypi python3[4058]: WARNING  urllib3.connectionpool Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('
Connection aborted.', OSError(113, 'No route to host'))': /config/fermenator/log_level/.json
Mar 23 01:27:52 raspberrypi python3[4058]: WARNING  urllib3.connectionpool Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionEr
ror('<urllib3.connection.VerifiedHTTPSConnection object at 0x7583a7d0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /config/fermenator/log_level/.json
Mar 23 01:28:32 raspberrypi python3[4058]: WARNING  urllib3.connectionpool Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionEr
ror('<urllib3.connection.VerifiedHTTPSConnection object at 0x7584fcf0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /config/fermenator/log_level/.json
Mar 23 01:45:53 raspberrypi python3[4058]: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='brewconsole.firebaseio.com', port=443): Max retries exceeded with url: /config/fermenator/log_
level/.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7584fdd0>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Mar 23 01:45:53 raspberrypi python3[4058]: File "/usr/local/bin/fermenator", line 6, in <module>
Mar 23 01:45:53 raspberrypi python3[4058]: File "/home/gerad/fermenator/bin/fermenator", line 71, in <module>
Mar 23 01:45:53 raspberrypi python3[4058]: File "/home/gerad/fermenator/bin/fermenator", line 66, in main
Mar 23 01:45:53 raspberrypi python3[4058]: File "/home/gerad/fermenator/fermenator/config.py", line 187, in run
Mar 23 01:45:53 raspberrypi python3[4058]: File "/home/gerad/fermenator/fermenator/config.py", line 570, in get_config_log_level
Mar 23 01:45:53 raspberrypi python3[4058]: File "/home/gerad/fermenator/fermenator/datasource/firebase.py", line 66, in get
Mar 23 01:45:53 raspberrypi python3[4058]: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='brewconsole.firebaseio.com', port=443): Max retries exceeded with url: /config/fermenator/l
og_level/.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7584fdd0>: Failed to establish a new connection: [Errno -2] Name or service not known',))

If internet goes down, this happens and crashes threads. Handle the exception using the existing mechanisms.