boredazfcuk / docker-icloudpd

An Alpine Linux container for the iCloud Photos Downloader command line utility
1.57k stars 149 forks source link

Connection aborted - RemoteDisconnect #585

Closed PrayerfulDrop closed 1 week ago

PrayerfulDrop commented 1 week ago

Files have been syncing find but now receiving the following error messages:

2024-06-20 09:24:08 INFO Downloaded /iCloud/2017/06/16/IMG_0354.JPG 2024-06-20 09:24:13 ERROR Failed to download new files 22024-06-20 09:24:09 INFO Downloaded /iCloud/2017/06/16/IMG_0354.MOV 024-06-20 09:24:13 ERROR - Can you log into icloud.com without receiving pop-up notifications? 2024-06-20 09:24:13 ERROR Error debugging info: 2024-06-20 09:24:13 ERROR Traceback (most recent call last): File "urllib3/connectionpool.py", line 714, in urlopen File "urllib3/connectionpool.py", line 466, in _make_request File "", line 3, in raise_from File "urllib3/connectionpool.py", line 461, in _make_request File "http/client.py", line 1428, in getresponse File "http/client.py", line 331, in begin File "http/client.py", line 300, in _read_status http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "requests/adapters.py", line 486, in send File "urllib3/connectionpool.py", line 798, in urlopen File "urllib3/util/retry.py", line 550, in increment File "urllib3/packages/six.py", line 769, in reraise File "urllib3/connectionpool.py", line 714, in urlopen File "urllib3/connectionpool.py", line 466, in _make_request File "", line 3, in raise_from File "urllib3/connectionpool.py", line 461, in _make_request File "http/client.py", line 1428, in getresponse File "http/client.py", line 331, in begin File "http/client.py", line 300, in _read_status urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "starters/icloudpd.py", line 6, in File "click/core.py", line 1157, in call File "click/core.py", line 1078, in main File "click/core.py", line 1434, in invoke File "click/core.py", line 783, in invoke File "icloudpd/base.py", line 499, in main File "icloudpd/base.py", line 1103, in core File "pyicloud_ipd/services/photos.py", line 383, in photos File "pyicloud_ipd/services/photos.py", line 363, in photos_request File "requests/sessions.py", line 637, in post File "pyicloud_ipd/session.py", line 66, in request File "requests/sessions.py", line 589, in request File "requests/sessions.py", line 703, in send File "requests/adapters.py", line 501, in send requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) [306] Failed to execute script 'icloudpd' due to unhandled exception! 2024-06-20 09:24:13 ERROR Please set debug_logging=true in your icloudpd.conf file then reproduce the error. 2024-06-20 09:24:13 ERROR Once you have captured this log file, please post it along with a description of your problem, here: https://github.com/boredazfcuk/docker-icloudpd/issues 2024-06-20 09:24:13 INFO Web cookie expires: 2024-08-19 @ 16:09:23 2024-06-20 09:24:13 INFO Multifactor authentication cookie expires: 2024-07-18 @ 22:19:58 2024-06-20 09:24:13 INFO Days remaining until expiration: 28 2024-06-20 09:24:13 INFO Synchronisation ended at 09:24:13 2024-06-20 09:24:13 INFO Total time taken: 00:14:57 2024-06-20 09:24:13 INFO Next synchronisation at 15:09:16

PrayerfulDrop commented 1 week ago

After restarting the container downloads were able to continue. Maybe handle the exception to restart the container?

boredazfcuk commented 1 week ago

It's my understanding that it's not possible to restart a container, from within a container, without mapping in the docker.sock file.

Doing that gives the container complete control over the whole Docker system, which is something that should only be enabled when it's absolutely necessary.

This is why my container has a health check that will set the container to unhealthy if an error occurs. You can then use an autoheal container, which monitors all containers, and restarts them when they turn unhealthy.