ipsingh06 / seedsync

Sync your seedbox. Fast. And more.
https://ipsingh06.github.io/seedsync/
Apache License 2.0
307 stars 43 forks source link

Error parsing lftp job status (Previous Error parsing lftp job status #55) #121

Open CasaPas opened 2 years ago

CasaPas commented 2 years ago

I have docker 0.8.6 and hitting the same error. Restarting resolves the app for a random period of time (could be minutes, could be hours)

CasaPas commented 2 years ago

Log Dump:

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/python/common/job.py", line 44, in run self.execute() File "/app/python/controller/controller_job.py", line 29, in execute self.controller.process() File "/app/python/controller/controller.py", line 202, in process self.update_model() File "/app/python/controller/controller.py", line 295, in update_model lftp_statuses = self.lftp.status() File "/app/python/lftp/lftp.py", line 322, in status statuses = self.job_status_parser.parse(out) File "/app/python/lftp/job_status_parser.py", line 94, in parse raise LftpJobStatusParserError("Error parsing lftp job status") lftp.job_status_parser.LftpJobStatusParserError: Error parsing lftp job status 2022-06-04 12:59:42,020 - ERROR - seedsync (MainProcess/MainThread) - Caught exception Traceback (most recent call last): File "/app/python/lftp/job_status_parser.py", line 89, in parse statuses += self.parse_queue(lines) File "/app/python/lftp/job_status_parser.py", line 482, in __parse_queue raise ValueError("Unrecognized line '{}'".format(lines[0])) ValueError: Unrecognized line '/downloads/AudioBook/1984 (George Orwell) - Audio Book/Audio Books - George Orwell - 1984 - 6 of 14.mp3.lftp 7813120-11719680 34.4 KiB/s'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/python/seedsync.py", line 164, in run controller_job.propagate_exception() File "/app/python/common/job.py", line 77, in propagate_exception raise exc_info[1].with_traceback(exc_info[2]) File "/app/python/common/job.py", line 44, in run self.execute() File "/app/python/controller/controller_job.py", line 29, in execute self.controller.process() File "/app/python/controller/controller.py", line 202, in process self.update_model() File "/app/python/controller/controller.py", line 295, in update_model lftp_statuses = self.lftp.status() File "/app/python/lftp/lftp.py", line 322, in status statuses = self.job_status_parser.parse(out) File "/app/python/lftp/job_status_parser.py", line 94, in parse raise LftpJobStatusParserError("Error parsing lftp job status") lftp.job_status_parser.LftpJobStatusParserError: Error parsing lftp job status 2022-06-04 12:59:45,037 - ERROR - seedsync.Controller.Lftp (MainProcess/ControllerJob) - Lftp timeout exception Traceback (most recent call last): File "/app/python/lftp/lftp.py", line 128, in run_command self.process.expect(self.expect_pattern, timeout=self.timeout) File "/usr/local/lib/python3.8/site-packages/pexpect/spawnbase.py", line 343, in expect return self.expect_list(compiled_pattern_list, File "/usr/local/lib/python3.8/site-packages/pexpect/spawnbase.py", line 372, in expect_list return exp.expect_loop(timeout) File "/usr/local/lib/python3.8/site-packages/pexpect/expect.py", line 181, in expect_loop return self.timeout(e) File "/usr/local/lib/python3.8/site-packages/pexpect/expect.py", line 144, in timeout raise exc pexpect.exceptions.TIMEOUT: Timeout exceeded. <pexpect.pty_spawn.spawn object at 0x14b62a98ca90> command: /usr/bin/lftp args: ['/usr/bin/lftp', '-p', '22', '-u', ‘XXX,XXX’, 'sftp://XXX’] buffer (last 100 chars): b'll) - Audio Book/Audio Books - George Orwell - 1984 - 6 of 14.mp3.lftp 7813120-11719680 34.4 KiB/s\r\n' before (last 100 chars): b'll) - Audio Book/Audio Books - George Orwell - 1984 - 6 of 14.mp3.lftp 7813120-11719680 34.4 KiB/s\r\n' after: <class 'pexpect.exceptions.TIMEOUT'> match: None match_index: None exitstatus: None flag_eof: False pid: 714 child_fd: 68 closed: False timeout: 30 delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1 searcher: searcher_re: 0: re.compile(b'lftp XXX@XXXX:.>’) 2022-06-04 12:59:48,092 - ERROR - seedsync.Controller.Lftp (MainProcess/ControllerJob) - Lftp timeout exception Traceback (most recent call last): File "/app/python/lftp/lftp.py", line 128, in __run_command self.process.expect(self.__expect_pattern, timeout=self.__timeout) File "/usr/local/lib/python3.8/site-packages/pexpect/spawnbase.py", line 343, in expect return self.expect_list(compiled_pattern_list, File "/usr/local/lib/python3.8/site-packages/pexpect/spawnbase.py", line 372, in expect_list return exp.expect_loop(timeout) File "/usr/local/lib/python3.8/site-packages/pexpect/expect.py", line 181, in expect_loop return self.timeout(e) File "/usr/local/lib/python3.8/site-packages/pexpect/expect.py", line 144, in timeout raise exc pexpect.exceptions.TIMEOUT: Timeout exceeded. <pexpect.pty_spawn.spawn object at 0x14b62a98ca90> command: /usr/bin/lftp args: ['/usr/bin/lftp', '-p', '22', '-u', ‘XXX,XXX’, 'sftp://XXX’] buffer (last 100 chars): b'll) - Audio Book/Audio Books - George Orwell - 1984 - 6 of 14.mp3.lftp 7813120-11719680 34.4 KiB/s\r\n' before (last 100 chars): b'll) - Audio Book/Audio Books - George Orwell - 1984 - 6 of 14.mp3.lftp 7813120-11719680 34.4 KiB/s\r\n' after: <class 'pexpect.exceptions.TIMEOUT'> match: None match_index: None exitstatus: None flag_eof: False pid: 714 child_fd: 68 closed: False timeout: 30 delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1 searcher: searcher_re: 0: re.compile(b'lftp XXXX@XXXX:.>’) Exception in thread ControllerJob: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/pexpect/pty_spawn.py", line 23, in _wrap_ptyprocess_err yield File "/usr/local/lib/python3.8/site-packages/pexpect/pty_spawn.py", line 328, in close self.ptyproc.close(force=force) File "/usr/local/lib/python3.8/site-packages/ptyprocess/ptyprocess.py", line 400, in close raise PtyProcessError('Could not terminate the child.') ptyprocess.util.PtyProcessError: Could not terminate the child.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/app/python/common/job.py", line 56, in run self.cleanup() File "/app/python/controller/controller_job.py", line 34, in cleanup self.controller.exit() File "/app/python/controller/controller.py", line 207, in exit self.lftp.exit() File "/app/python/lftp/lftp.py", line 404, in exit self.__process.close(force=True) File "/usr/local/lib/python3.8/site-packages/pexpect/pty_spawn.py", line 328, in close self.ptyproc.close(force=force) File "/usr/local/lib/python3.8/contextlib.py", line 131, in exit self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.8/site-packages/pexpect/pty_spawn.py", line 25, in _wrap_ptyprocess_err raise ExceptionPexpect(*e.args) pexpect.exceptions.ExceptionPexpect: Could not terminate the child.

ndmartin2015 commented 2 years ago

I'm having this issue on a Debian install as well. I'm also getting timeout exception, and connection reset by peer.