[Bug]: Network failures when sending to frigate+ lose the snapshot #13156
-
Describe the problem you are havingMy local DNS was having a bad day at about the same time I was trying to upload a snapshot to frigate+. When I clicked the "send to frigate plus" button, the snapshot disappeared from the UI (expected), but never made it to frigate+:
This issue is to track the error handling. Namely in the face of such an error situation I would have expected:
Steps to reproduceClick "send to frigate plus" from a snapshot whilst suffering from network instability. Version0.14.0-da913d8 Frigate config fileN/A Relevant log output2024-08-18 01:07:58.021307227 [INFO] Preparing Frigate...
2024-08-18 01:07:58.044272219 [INFO] Starting Frigate...
2024-08-18 01:07:59.135638318 [2024-08-18 01:07:59] frigate.app INFO : Starting Frigate (0.14.0-da913d8)
2024-08-18 01:07:59.182137592 [2024-08-18 01:07:59] frigate.util.config INFO : Checking if frigate config needs migration...
2024-08-18 01:07:59.223947942 [2024-08-18 01:07:59] frigate.util.config INFO : frigate config does not need migration...
2024-08-18 01:08:15.132398644 [2024-08-18 01:08:15] peewee_migrate.logs INFO : Starting migrations
2024-08-18 01:08:15.132609946 [2024-08-18 01:08:15] peewee_migrate.logs INFO : There is nothing to migrate
2024-08-18 01:08:15.417106690 [2024-08-18 01:08:15] frigate.app INFO : Recording process started: 469
2024-08-18 01:08:15.417127408 [2024-08-18 01:08:15] frigate.app INFO : Recording process started: 470
2024-08-18 01:08:15.418563520 [2024-08-18 01:08:15] frigate.app INFO : go2rtc process pid: 97
2024-08-18 01:08:15.459701047 [2024-08-18 01:08:15] detector.coral1 INFO : Starting detection process: 498
2024-08-18 01:08:18.881437198 [2024-08-18 01:08:15] detector.coral2 INFO : Starting detection process: 500
2024-08-18 01:08:18.881572916 [2024-08-18 01:08:15] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb:0
2024-08-18 01:08:18.888270994 [2024-08-18 01:08:15] frigate.app INFO : Output process started: 509
2024-08-18 01:08:19.586988865 [2024-08-18 01:08:15] detector.coral3 INFO : Starting detection process: 502
2024-08-18 01:08:19.594044816 [2024-08-18 01:08:15] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb:2
2024-08-18 01:08:19.594257743 [2024-08-18 01:08:18] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2024-08-18 01:08:19.594347894 [2024-08-18 01:08:19] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2024-08-18 01:08:19.594473910 [2024-08-18 01:08:15] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb:1
2024-08-18 01:08:19.594524191 [2024-08-18 01:08:15] frigate.app INFO : Camera processor started for foo_left: 545
2024-08-18 01:08:19.594569759 [2024-08-18 01:08:18] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2024-08-18 01:08:19.594618190 [2024-08-18 01:08:15] frigate.app INFO : Camera processor started for foo_right: 546
2024-08-18 01:08:19.594656383 [2024-08-18 01:08:15] frigate.app INFO : Camera processor started for bar_left: 556
2024-08-18 01:08:19.594717653 [2024-08-18 01:08:15] frigate.app INFO : Capture process started for foo_left: 563
2024-08-18 01:08:19.594756572 [2024-08-18 01:08:15] frigate.app INFO : Capture process started for foo_right: 570
2024-08-18 01:08:19.594777685 [2024-08-18 01:08:15] frigate.app INFO : Capture process started for bar_left: 581
2024-08-18 01:08:19.594820131 [2024-08-18 01:08:15] frigate.app INFO : Audio process started: 590
2024-08-18 01:08:35.518644582 [2024-08-18 01:08:35] frigate.ptz.onvif WARNING : Unable to get presets from camera: bar_left: Unknown error: PTZ is not supported
2024-08-18 01:12:36.646088822 [2024-08-18 01:12:36] frigate.api.event ERROR : HTTPSConnectionPool(host='s3.us-east-2.amazonaws.com', port=443): Max retries exceeded with url: /frigate-images (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7d2cc7a1f370>: Failed to resolve 's3.us-east-2.amazonaws.com' ([Errno -5] No address associated with hostname)"))
2024-08-18 01:12:36.646099189 Traceback (most recent call last):
2024-08-18 01:12:36.646105565 File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 196, in _new_conn
2024-08-18 01:12:36.646142895 sock = connection.create_connection(
2024-08-18 01:12:36.646168296 File "/usr/local/lib/python3.9/dist-packages/urllib3/util/connection.py", line 60, in create_connection
2024-08-18 01:12:36.646172284 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
2024-08-18 01:12:36.646175090 File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
2024-08-18 01:12:36.646224454 for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
2024-08-18 01:12:36.646227783 socket.gaierror: [Errno -5] No address associated with hostname
2024-08-18 01:13:23.624916 2024-08-18 01:12:36.646290998
2024-08-18 01:12:36.646294399 The above exception was the direct cause of the following exception:
2024-08-18 01:13:23.624946 2024-08-18 01:12:36.646295842
2024-08-18 01:12:36.646298589 Traceback (most recent call last):
2024-08-18 01:12:36.646300128 File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 789, in urlopen
2024-08-18 01:12:36.646301766 response = self._make_request(
2024-08-18 01:12:36.646303345 File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 490, in _make_request
2024-08-18 01:12:36.646304768 raise new_e
2024-08-18 01:12:36.646335980 File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 466, in _make_request
2024-08-18 01:12:36.646337450 self._validate_conn(conn)
2024-08-18 01:12:36.646338982 File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 1095, in _validate_conn
2024-08-18 01:12:36.646340254 conn.connect()
2024-08-18 01:12:36.646341590 File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 615, in connect
2024-08-18 01:12:36.646343090 self.sock = sock = self._new_conn()
2024-08-18 01:12:36.646344559 File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 203, in _new_conn
2024-08-18 01:12:36.646362144 raise NameResolutionError(self.host, self, e) from e
2024-08-18 01:12:36.646363911 urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7d2cc7a1f370>: Failed to resolve 's3.us-east-2.amazonaws.com' ([Errno -5] No address associated with hostname)
2024-08-18 01:13:10.503081 2024-08-18 01:12:36.646364997
2024-08-18 01:12:36.646366633 The above exception was the direct cause of the following exception:
2024-08-18 01:13:10.503085 2024-08-18 01:12:36.646367728
2024-08-18 01:12:36.646369025 Traceback (most recent call last):
2024-08-18 01:12:36.646370491 File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 667, in send
2024-08-18 01:12:36.646371733 resp = conn.urlopen(
2024-08-18 01:12:36.646373279 File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 843, in urlopen
2024-08-18 01:12:36.646374502 retries = retries.increment(
2024-08-18 01:12:36.646376029 File "/usr/local/lib/python3.9/dist-packages/urllib3/util/retry.py", line 519, in increment
2024-08-18 01:12:36.646377480 raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
2024-08-18 01:12:36.646396561 urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='s3.us-east-2.amazonaws.com', port=443): Max retries exceeded with url: /frigate-images (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7d2cc7a1f370>: Failed to resolve 's3.us-east-2.amazonaws.com' ([Errno -5] No address associated with hostname)"))
2024-08-18 01:13:10.503092 2024-08-18 01:12:36.646397663
2024-08-18 01:12:36.646399034 During handling of the above exception, another exception occurred:
2024-08-18 01:13:10.503097 2024-08-18 01:12:36.646400336
2024-08-18 01:12:36.646401542 Traceback (most recent call last):
2024-08-18 01:12:36.646402871 File "/opt/frigate/frigate/api/event.py", line 388, in send_to_plus
2024-08-18 01:12:36.646404329 plus_id = current_app.plus_api.upload_image(image, event.camera)
2024-08-18 01:12:36.646405678 File "/opt/frigate/frigate/plus.py", line 114, in upload_image
2024-08-18 01:12:36.646407081 r = requests.post(presigned_urls["original"]["url"], files=files, data=data)
2024-08-18 01:12:36.646408477 File "/usr/local/lib/python3.9/dist-packages/requests/api.py", line 115, in post
2024-08-18 01:12:36.646411803 return request("post", url, data=data, json=json, **kwargs)
2024-08-18 01:12:36.646413175 File "/usr/local/lib/python3.9/dist-packages/requests/api.py", line 59, in request
2024-08-18 01:12:36.646414628 return session.request(method=method, url=url, **kwargs)
2024-08-18 01:12:36.646415956 File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 589, in request
2024-08-18 01:12:36.646417251 resp = self.send(prep, **send_kwargs)
2024-08-18 01:12:36.646418688 File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 703, in send
2024-08-18 01:12:36.646439591 r = adapter.send(request, **kwargs)
2024-08-18 01:12:36.646441105 File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 700, in send
2024-08-18 01:12:36.646442466 raise ConnectionError(e, request=request)
2024-08-18 01:12:36.646444684 requests.exceptions.ConnectionError: HTTPSConnectionPool(host='s3.us-east-2.amazonaws.com', port=443): Max retries exceeded with url: /frigate-images (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7d2cc7a1f370>: Failed to resolve 's3.us-east-2.amazonaws.com' ([Errno -5] No address associated with hostname)")) Operating systemOther Linux Install methodDocker Compose Network connectionWired Camera make and modelDahua Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Answered by
NickM-27
Aug 18, 2024
Replies: 1 comment
-
fixed in #13158 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
NickM-27
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fixed in #13158