Migrating deluge server from 18.04 -> 20.04

General support for problems installing or using Deluge
iconoclasthero
Member
Member
Posts: 19
Joined: Tue Aug 28, 2018 12:39 am

Migrating deluge server from 18.04 -> 20.04

Postby iconoclasthero » Mon Apr 20, 2020 2:33 pm

Legacy/old system:

Code: Select all

$ deluged --version
deluged 2.0.3-2-201906121747-ubuntu18.04.1
libtorrent: 1.1.5.0
Python: 3.6.9
OS: Linux Ubuntu 18.04.4 bionic 5.3.0.46-generic


New system:

Code: Select all

$ deluged --version
deluged 2.0.3
libtorrent: 1.1.13.0
Python: 3.8.2
OS: Linux Ubuntu 20.04 focal
x86_64 Linux 5.4.0-24-generic


I have a perfectly functional deluged install on my legacy system and I need to migrate everything to the new system.
  • All the forrent directories have been migrated to the new system (i.e., my downloading/downloads directories, etc.)
  • I have all of the legacy state and config files.
  • Deluged is a system service (running as user deluge) on the old system.
  • Deluged is the pre-installed version on 20.04

Is there a guide or a FAQ or anything on how to accomplish this migration?

poet_imp
New User
New User
Posts: 2
Joined: Mon Apr 20, 2020 10:50 pm

Re: Migrating deluge server from 18.04 -> 20.04

Postby poet_imp » Mon Apr 20, 2020 10:56 pm

Same problem... more info:

Code: Select all

paul@samson:~$ systemctl status deluged
● deluged.service - Deluge Bittorrent Client Daemon
     Loaded: loaded (/etc/systemd/system/deluged.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2020-04-20 14:35:10 MST; 1h 7min ago
       Docs: man:deluged
    Process: 1903 ExecStart=/usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning (code=exited, status=1/FAILURE)
   Main PID: 1903 (code=exited, status=1/FAILURE)

Apr 20 14:35:10 samson systemd[1]: deluged.service: Failed with result 'exit-code'.
Apr 20 14:35:10 samson systemd[1]: deluged.service: Scheduled restart job, restart counter is at 6.
Apr 20 14:35:10 samson systemd[1]: Stopped Deluge Bittorrent Client Daemon.
Apr 20 14:35:10 samson systemd[1]: deluged.service: Start request repeated too quickly.
Apr 20 14:35:10 samson systemd[1]: deluged.service: Failed with result 'exit-code'.
Apr 20 14:35:10 samson systemd[1]: Failed to start Deluge Bittorrent Client Daemon.
paul@samson:~$ sudo su -
root@samson:~# less /var/log/deluge/daemon.log
root@samson:~# /usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning
Unhandled error in Deferred:
Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f0c1f1ae970>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: _findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py:115:_parse_version_parts
/usr/lib/python3/dist-packages/twisted/internet/defer.py:953:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:270:critical
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3/dist-packages/deluge/log.py:208:emit
/usr/lib/python3/dist-packages/twisted/python/log.py:595:emit
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:154:publishToNewObserver
/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py:115:__call__
/usr/lib/python3.8/logging/__init__.py:1500:log
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 115, in _parse_version_parts
    for part in _legacy_version_component_re.split(s):
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 953, in __del__
    log.critical("Unhandled error in Deferred:",
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 270, in critical
    self.emit(LogLevel.critical, format, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 144, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 131, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 93, in __call__
    self.legacyObserver(event)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 208, in emit
    PythonLoggingObserver.emit(self, event_dict)
  File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 595, in emit
    _publishNew(self._newObserver, eventDict, textFromEventDict)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 154, in publishToNewObserver
    observer(eventDict)
  File "/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py", line 115, in __call__
    self.logger.log(
  File "/usr/lib/python3.8/logging/__init__.py", line 1500, in log
    self._log(level, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: _findCaller() takes from 1 to 2 positional arguments but 3 were given


Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 134, in __init__
    self._load_session_state()
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 337, in _load_session_state
    log.warning('Unable to load %s: %s', _filepath, ex)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
    _inlineCallbacks(None, g, status)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 73, in warning
    yield LoggingLoggerClass.warning(self, msg, *args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1446, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given

Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f0c1f1ae970>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py:115:_parse_version_parts
/usr/lib/python3/dist-packages/twisted/internet/defer.py:962:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:190:failure
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3/dist-packages/deluge/log.py:204:emit
/usr/lib/python3.8/logging/__init__.py:1481:critical
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 115, in _parse_version_parts
    for part in _legacy_version_component_re.split(s):
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 962, in __del__
    log.failure(format,
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 190, in failure
    self.emit(level, format, log_failure=failure, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 144, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 131, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 93, in __call__
    self.legacyObserver(event)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 204, in emit
    getattr(LoggingLoggerClass, event_dict['log_level'].name)(
  File "/usr/lib/python3.8/logging/__init__.py", line 1481, in critical
    self._log(CRITICAL, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given

Unhandled error in Deferred:
Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f0c1f1ae970>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: _findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py:115:_parse_version_parts
/usr/lib/python3/dist-packages/twisted/internet/defer.py:953:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:270:critical
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3/dist-packages/deluge/log.py:208:emit
/usr/lib/python3/dist-packages/twisted/python/log.py:595:emit
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:154:publishToNewObserver
/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py:115:__call__
/usr/lib/python3.8/logging/__init__.py:1500:log
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 115, in _parse_version_parts
    for part in _legacy_version_component_re.split(s):
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 953, in __del__
    log.critical("Unhandled error in Deferred:",
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 270, in critical
    self.emit(LogLevel.critical, format, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 144, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 131, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 93, in __call__
    self.legacyObserver(event)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 208, in emit
    PythonLoggingObserver.emit(self, event_dict)
  File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 595, in emit
    _publishNew(self._newObserver, eventDict, textFromEventDict)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 154, in publishToNewObserver
    observer(eventDict)
  File "/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py", line 115, in __call__
    self.logger.log(
  File "/usr/lib/python3.8/logging/__init__.py", line 1500, in log
    self._log(level, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: _findCaller() takes from 1 to 2 positional arguments but 3 were given


Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 134, in __init__
    self._load_session_state()
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 337, in _load_session_state
    log.warning('Unable to load %s: %s', _filepath, ex)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
    _inlineCallbacks(None, g, status)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 73, in warning
    yield LoggingLoggerClass.warning(self, msg, *args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1446, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given

Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f0c1f1ae970>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py:115:_parse_version_parts
/usr/lib/python3/dist-packages/twisted/internet/defer.py:962:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:190:failure
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3/dist-packages/deluge/log.py:204:emit
/usr/lib/python3.8/logging/__init__.py:1481:critical
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 115, in _parse_version_parts
    for part in _legacy_version_component_re.split(s):
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 962, in __del__
    log.failure(format,
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 190, in failure
    self.emit(level, format, log_failure=failure, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 144, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 131, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 93, in __call__
    self.legacyObserver(event)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 204, in emit
    getattr(LoggingLoggerClass, event_dict['log_level'].name)(
  File "/usr/lib/python3.8/logging/__init__.py", line 1481, in critical
    self._log(CRITICAL, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given

iconoclasthero
Member
Member
Posts: 19
Joined: Tue Aug 28, 2018 12:39 am

Re: Migrating deluge server from 18.04 -> 20.04

Postby iconoclasthero » Tue Apr 21, 2020 2:04 am

poet_imp wrote:Same problem... more info:

Code: Select all

paul@samson:~$ systemctl status deluged
● deluged.service - Deluge Bittorrent Client Daemon
     Loaded: loaded (/etc/systemd/system/deluged.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2020-04-20 14:35:10 MST; 1h 7min ago
       Docs: man:deluged
    Process: 1903 ExecStart=/usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning (code=exited, status=1/FAILURE)
   Main PID: 1903 (code=exited, status=1/FAILURE)

Apr 20 14:35:10 samson systemd[1]: deluged.service: Failed with result 'exit-code'.
Apr 20 14:35:10 samson systemd[1]: deluged.service: Scheduled restart job, restart counter is at 6.
Apr 20 14:35:10 samson systemd[1]: Stopped Deluge Bittorrent Client Daemon.
Apr 20 14:35:10 samson systemd[1]: deluged.service: Start request repeated too quickly.
Apr 20 14:35:10 samson systemd[1]: deluged.service: Failed with result 'exit-code'.
Apr 20 14:35:10 samson systemd[1]: Failed to start Deluge Bittorrent Client Daemon.
paul@samson:~$ sudo su -
root@samson:~# less /var/log/deluge/daemon.log
root@samson:~# /usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning
Unhandled error in Deferred:
Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f0c1f1ae970>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: _findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py:115:_parse_version_parts
/usr/lib/python3/dist-packages/twisted/internet/defer.py:953:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:270:critical
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3/dist-packages/deluge/log.py:208:emit
/usr/lib/python3/dist-packages/twisted/python/log.py:595:emit
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:154:publishToNewObserver
/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py:115:__call__
/usr/lib/python3.8/logging/__init__.py:1500:log
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 115, in _parse_version_parts
    for part in _legacy_version_component_re.split(s):
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 953, in __del__
    log.critical("Unhandled error in Deferred:",
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 270, in critical
    self.emit(LogLevel.critical, format, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 144, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 131, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 93, in __call__
    self.legacyObserver(event)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 208, in emit
    PythonLoggingObserver.emit(self, event_dict)
  File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 595, in emit
    _publishNew(self._newObserver, eventDict, textFromEventDict)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 154, in publishToNewObserver
    observer(eventDict)
  File "/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py", line 115, in __call__
    self.logger.log(
  File "/usr/lib/python3.8/logging/__init__.py", line 1500, in log
    self._log(level, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: _findCaller() takes from 1 to 2 positional arguments but 3 were given


Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 134, in __init__
    self._load_session_state()
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 337, in _load_session_state
    log.warning('Unable to load %s: %s', _filepath, ex)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
    _inlineCallbacks(None, g, status)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 73, in warning
    yield LoggingLoggerClass.warning(self, msg, *args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1446, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given

Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f0c1f1ae970>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py:115:_parse_version_parts
/usr/lib/python3/dist-packages/twisted/internet/defer.py:962:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:190:failure
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3/dist-packages/deluge/log.py:204:emit
/usr/lib/python3.8/logging/__init__.py:1481:critical
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 115, in _parse_version_parts
    for part in _legacy_version_component_re.split(s):
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 962, in __del__
    log.failure(format,
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 190, in failure
    self.emit(level, format, log_failure=failure, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 144, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 131, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 93, in __call__
    self.legacyObserver(event)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 204, in emit
    getattr(LoggingLoggerClass, event_dict['log_level'].name)(
  File "/usr/lib/python3.8/logging/__init__.py", line 1481, in critical
    self._log(CRITICAL, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given

Unhandled error in Deferred:
Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f0c1f1ae970>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: _findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py:115:_parse_version_parts
/usr/lib/python3/dist-packages/twisted/internet/defer.py:953:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:270:critical
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3/dist-packages/deluge/log.py:208:emit
/usr/lib/python3/dist-packages/twisted/python/log.py:595:emit
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:154:publishToNewObserver
/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py:115:__call__
/usr/lib/python3.8/logging/__init__.py:1500:log
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 115, in _parse_version_parts
    for part in _legacy_version_component_re.split(s):
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 953, in __del__
    log.critical("Unhandled error in Deferred:",
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 270, in critical
    self.emit(LogLevel.critical, format, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 144, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 131, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 93, in __call__
    self.legacyObserver(event)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 208, in emit
    PythonLoggingObserver.emit(self, event_dict)
  File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 595, in emit
    _publishNew(self._newObserver, eventDict, textFromEventDict)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 154, in publishToNewObserver
    observer(eventDict)
  File "/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py", line 115, in __call__
    self.logger.log(
  File "/usr/lib/python3.8/logging/__init__.py", line 1500, in log
    self._log(level, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: _findCaller() takes from 1 to 2 positional arguments but 3 were given


Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 134, in __init__
    self._load_session_state()
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 337, in _load_session_state
    log.warning('Unable to load %s: %s', _filepath, ex)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
    _inlineCallbacks(None, g, status)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 73, in warning
    yield LoggingLoggerClass.warning(self, msg, *args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1446, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given

Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f0c1f1ae970>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py:115:_parse_version_parts
/usr/lib/python3/dist-packages/twisted/internet/defer.py:962:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:190:failure
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3/dist-packages/deluge/log.py:204:emit
/usr/lib/python3.8/logging/__init__.py:1481:critical
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 115, in _parse_version_parts
    for part in _legacy_version_component_re.split(s):
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 962, in __del__
    log.failure(format,
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 190, in failure
    self.emit(level, format, log_failure=failure, **kwargs)
  File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 144, in emit
    self.observer(event)
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 131, in __call__
    observer(event)
  File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 93, in __call__
    self.legacyObserver(event)
  File "/usr/lib/python3/dist-packages/deluge/log.py", line 204, in emit
    getattr(LoggingLoggerClass, event_dict['log_level'].name)(
  File "/usr/lib/python3.8/logging/__init__.py", line 1481, in critical
    self._log(CRITICAL, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given



I can get the stock installation of deluged to run just fine so this is not related to what I'm trying to do I don't believe. That said, you can go into the /etc/systemd/system/deluged.service file and increase the logging level to -L error (or whichever the docs say is the most verbose) and then check the logs at /var/log/deluge/daemon.log. Maybe that's more useful than the python errors?

mhertz
Compulsive Poster
Compulsive Poster
Posts: 865
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Migrating deluge server from 18.04 -> 20.04

Postby mhertz » Tue Apr 21, 2020 3:11 am

iconoclasthero, does simply copying over your profile folder of deluge over to new system not work for you, I mean if paths and users and such are same, or maybe I'm misunderstanding you. Isn't pre-installed deluge on new system also running systemd and starts deluged that way, like legacy system.

poet_imp, I believe you're on py38 because of your twisted logging error. You then need latest twisted 20.3.0. If not using deluge dev version, then also need this commit from develop branch backported to deluge stable: https://git.deluge-torrent.org/deluge/c ... ed0f2c3206 Alternatively downgrade python if possible.

iconoclasthero
Member
Member
Posts: 19
Joined: Tue Aug 28, 2018 12:39 am

Re: Migrating deluge server from 18.04 -> 20.04

Postby iconoclasthero » Tue Apr 21, 2020 3:15 pm

mhertz: For starters, my 18.04 directory structure is confusing so I'm having a hard time figuring out where things are supposed to go.
Second, if I look in /etc/systemd/system, there's no deluged there, it's being called by init.d:

Code: Select all

$ sudo find ./etc -iname "*deluge*"
[sudo] password for bvargo:
Sorry, try again.
[sudo] password for bvargo:
./etc/rc3.d/S01deluged
./etc/rc2.d/S01deluged
./etc/init.d/deluged
./etc/rc4.d/S01deluged
./etc/rc6.d/K01deluged
./etc/rc5.d/S01deluged
./etc/rc0.d/K01deluged
./etc/default/deluged
./etc/rc1.d/K01deluged
./etc/logrotate.d/deluged


And that init.d script is:

Code: Select all

#!/bin/sh
### BEGIN INIT INFO
# Provides:          deluged
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Should-Start:      $network
# Should-Stop:       $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start or stop the Deluge BitTorrent daemon.
# Description:       Start or stop the Deluge BitTorrent daemon.
### END INIT INFO

# Authors: Tanguy Ortolo <tanguy+debian@ortolo.eu>,
# Cristian Greco <cristian@regolo.cc>

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Deluge BitTorrent Daemon"
NAME="deluged"
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="-d -c /var/lib/deluged/config -l /var/log/deluged/daemon.log -L info"
USER=debian-deluged
MASK=0027
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

ENABLE_DELUGED=1

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

# Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions

#
# Function that starts the daemon/service
#
do_start()
{
  if [ $ENABLE_DELUGED != 1 ]; then
    log_progress_msg "Not starting ${DESC} ${NAME}, disabled in /etc/default/${NAME}"
  else
    # Return
    #   0 if daemon has been started
    #   1 if daemon was already running
    #   2 if daemon could not be started
    start-stop-daemon --start --background --quiet --pidfile $PIDFILE --exec $DAEMON \
      --chuid $USER --umask $MASK --test > /dev/null \
      || return 1

    start-stop-daemon --start --background --quiet --pidfile $PIDFILE --make-pidfile --exec $DAEMON \
      --chuid $USER --umask $MASK -- $DAEMON_ARGS \
      || return 2
  fi
}

#
# Function that stops the daemon/service
#
do_stop()
{
  # Return
  #   0 if daemon has been stopped
  #   1 if daemon was already stopped
  #   2 if daemon could not be stopped
  #   other if a failure occurred

  start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
  RETVAL="$?"
  [ "$RETVAL" = "2" ] && return 2

  rm -f $PIDFILE
  return "$RETVAL"
}

case "$1" in
  start)
    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
    do_start
    case "$?" in
      0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
      2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    esac
    ;;
  stop)
    [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
    do_stop
    case "$?" in
      0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
      2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    esac
    ;;
  status)
    status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
    ;;
  restart|force-reload)
    log_daemon_msg "Restarting $DESC" "$NAME"
    do_stop
    case "$?" in
      0|1)
        do_start
        case "$?" in
          0) log_end_msg 0 ;;
          1) log_end_msg 1 ;; # Old process is still running
          *) log_end_msg 1 ;; # Failed to start
        esac
        ;;
      *)
        # Failed to stop
        log_end_msg 1
        ;;
    esac
    ;;
  *)
    echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
    exit 3
    ;;
esac

:


Now, looking further, I know that 18.04 was running deluged as user deluge:media. In 20.04 (as in 18.04) the default install user is debian-deluge (which i didn't want to use on the old install and don't want to use on the new one either, why use all the extra letters)... so there's that problem.

Additionally, my 20.04 /var/lib/deluged folder looks like this with all of the files copied over from the 18.04 install...and no, it isn't picking up even the existing auth file so I can't even log into it. I think that I can take all the system-saved torrents in that directory and re-populate my new deluged server with them, then root through them to figure out what's completed, etc., unless someone can give me an easier way. I'd really like not to have to re-do the yarss2 stuff though!

iconoclasthero
Member
Member
Posts: 19
Joined: Tue Aug 28, 2018 12:39 am

Re: Migrating deluge server from 18.04 -> 20.04

Postby iconoclasthero » Tue Apr 21, 2020 3:18 pm

FWIW, from my old install:
/etc/systemd/system/deluged:

Code: Select all

$ cat deluged.service
[Unit]
Description=Deluge Bittorrent Client Daemon
After=network-online.target

[Service]
Type=simple
User=deluge
Group=media
UMask=002

ExecStart=/usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning

Restart=on-failure

# Configures the time to wait before service is stopped forcefully.
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target


and the old /etc/init.d/deluged

Code: Select all

$ cat deluged
#!/bin/sh
### BEGIN INIT INFO
# Provides:          deluged
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Should-Start:      $network
# Should-Stop:       $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start or stop the Deluge BitTorrent daemon.
# Description:       Start or stop the Deluge BitTorrent daemon.
### END INIT INFO

# Authors: Tanguy Ortolo <tanguy+debian@ortolo.eu>,
# Cristian Greco <cristian@regolo.cc>

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Deluge BitTorrent Daemon"
NAME="deluged"
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="-d -c /var/lib/deluged/config -l /var/log/deluged/daemon.log -L info"
USER=debian-deluged
MASK=0027
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

ENABLE_DELUGED=1

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

# Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions

#
# Function that starts the daemon/service
#
do_start()
{
  if [ $ENABLE_DELUGED != 1 ]; then
    log_progress_msg "Not starting ${DESC} ${NAME}, disabled in /etc/default/${NAME}"
  else
    # Return
    #   0 if daemon has been started
    #   1 if daemon was already running
    #   2 if daemon could not be started
    start-stop-daemon --start --background --quiet --pidfile $PIDFILE --exec $DAEMON \
      --chuid $USER --umask $MASK --test > /dev/null \
      || return 1

    start-stop-daemon --start --background --quiet --pidfile $PIDFILE --make-pidfile --exec $DAEMON \
      --chuid $USER --umask $MASK -- $DAEMON_ARGS \
      || return 2
  fi
}

#
# Function that stops the daemon/service
#
do_stop()
{
  # Return
  #   0 if daemon has been stopped
  #   1 if daemon was already stopped
  #   2 if daemon could not be stopped
  #   other if a failure occurred

  start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
  RETVAL="$?"
  [ "$RETVAL" = "2" ] && return 2

  rm -f $PIDFILE
  return "$RETVAL"
}

case "$1" in
  start)
    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
    do_start
    case "$?" in
      0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
      2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    esac
    ;;
  stop)
    [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
    do_stop
    case "$?" in
      0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
      2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    esac
    ;;
  status)
    status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
    ;;
  restart|force-reload)
    log_daemon_msg "Restarting $DESC" "$NAME"
    do_stop
    case "$?" in
      0|1)
        do_start
        case "$?" in
          0) log_end_msg 0 ;;
          1) log_end_msg 1 ;; # Old process is still running
          *) log_end_msg 1 ;; # Failed to start
        esac
        ;;
      *)
        # Failed to stop
        log_end_msg 1
        ;;
    esac
    ;;
  *)
    echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
    exit 3
    ;;
esac

:

poet_imp
New User
New User
Posts: 2
Joined: Mon Apr 20, 2020 10:50 pm

Re: Migrating deluge server from 18.04 -> 20.04

Postby poet_imp » Tue Apr 21, 2020 4:17 pm

I have it working. Thank you for the points in the right direction. Here is what I did:

Code: Select all

sudo pip3 install --upgrade twisted


I then updated the log.py file based on the patch at:

https://git.deluge-torrent.org/deluge/commit/?h=develop&id=351664ec071daa04161577c6a1c949ed0f2c3206

It still failed to start and further research showed that I had some very old ssl keys. I deleted them

Code: Select all

cd /var/lib/deluge/.config/deluge/ssl
ls -lh
total 8.0K
-rw------- 1 deluge deluge 623 Oct 25  2017 daemon.cert
-rw------- 1 deluge deluge 916 Oct 25  2017 daemon.pkey
rm *


Started the daemon and it stayed up:

Code: Select all

systemctl start deluged
systemctl status deluged
● deluged.service - Deluge Bittorrent Client Daemon
     Loaded: loaded (/etc/systemd/system/deluged.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2020-04-21 09:08:42 MST; 5s ago
       Docs: man:deluged
   Main PID: 112816 (deluged)
      Tasks: 7 (limit: 28512)
     Memory: 156.6M
     CGroup: /system.slice/deluged.service
             └─112816 /usr/bin/python3 /usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning

iconoclasthero
Member
Member
Posts: 19
Joined: Tue Aug 28, 2018 12:39 am

Re: Migrating deluge server from 18.04 -> 20.04

Postby iconoclasthero » Wed Apr 22, 2020 2:22 am

Huh, twisted was causing the same problem I guess...and i went through and after doing each step, I can manually start deluged, thanks for that!

I have all my files transferred over just fine and everything seems like it's reporting correctly in terms of what's there, etc.

Unfortunately, I can't seem to get deluged to start from systemctl and have it actually accept incoming connections. If I launch it from the command line (as me)

Code: Select all

deluged -d -c /var/lib/deluge/config -l /var/log/deluged/daemon.log -L debug
, it works, I can connect to it, etc., however when I launch it via systemctl it is ostensibly working but I cannot connect to it and it doesn't show up in

Code: Select all

sudo ps -A
:

Code: Select all

edt 10.09 pm  pwd: /etc/init.d  FOCAL
$ cat deluged |more
#!/bin/sh
### BEGIN INIT INFO
# Provides:          deluged
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Should-Start:      $network
# Should-Stop:       $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start or stop the Deluge BitTorrent daemon.
# Description:       Start or stop the Deluge BitTorrent daemon.
### END INIT INFO

# Authors: Tanguy Ortolo <tanguy+debian@ortolo.eu>,
# Cristian Greco <cristian@regolo.cc>

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Deluge BitTorrent Daemon"
NAME="deluged"
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="-d -c /var/lib/deluge/config -l /var/log/deluge/daemon.log -L debug"

#DAEMON_ARGS "-d -c /var/lib/deluged/config-root -l /var/log/deluged/daemon.log -L error"


USER=deluge
MASK=0027
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
^C

edt 10.09 pm  pwd: /etc/init.d  FOCAL
$ sudo systemctl status deluged
● deluged.service - LSB: Start or stop the Deluge BitTorrent daemon.
     Loaded: loaded (/etc/init.d/deluged; generated)
     Active: inactive (dead) since Tue 2020-04-21 22:09:59 EDT; 1s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 13914 ExecStart=/etc/init.d/deluged start (code=exited, status=0/SUCCESS)
    Process: 14096 ExecStop=/etc/init.d/deluged stop (code=exited, status=0/SUCCESS)

Apr 21 22:03:58 gigabyte systemd[1]: Starting LSB: Start or stop the Deluge BitTorrent daemon....
Apr 21 22:03:58 gigabyte deluged[13914]:  * Starting Deluge BitTorrent Daemon deluged
Apr 21 22:03:58 gigabyte deluged[13914]:    ...done.
Apr 21 22:03:58 gigabyte systemd[1]: Started LSB: Start or stop the Deluge BitTorrent daemon..
Apr 21 22:09:59 gigabyte systemd[1]: Stopping LSB: Start or stop the Deluge BitTorrent daemon....
Apr 21 22:09:59 gigabyte deluged[14096]:  * Stopping Deluge BitTorrent Daemon deluged
Apr 21 22:09:59 gigabyte deluged[14096]:    ...done.
Apr 21 22:09:59 gigabyte systemd[1]: deluged.service: Succeeded.
Apr 21 22:09:59 gigabyte systemd[1]: Stopped LSB: Start or stop the Deluge BitTorrent daemon..

edt 10.10 pm  pwd: /etc/init.d  FOCAL
$ sudo systemctl start deluged

edt 10.10 pm  pwd: /etc/init.d  FOCAL
$ sudo ps -A |grep deluged

edt 10.10 pm  pwd: /etc/init.d  FOCAL
$ sudo systemctl status deluged
● deluged.service - LSB: Start or stop the Deluge BitTorrent daemon.
     Loaded: loaded (/etc/init.d/deluged; generated)
     Active: active (exited) since Tue 2020-04-21 22:10:09 EDT; 28s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 14135 ExecStart=/etc/init.d/deluged start (code=exited, status=0/SUCCESS)

Apr 21 22:10:09 gigabyte systemd[1]: Starting LSB: Start or stop the Deluge BitTorrent daemon....
Apr 21 22:10:09 gigabyte deluged[14135]:  * Starting Deluge BitTorrent Daemon deluged
Apr 21 22:10:09 gigabyte deluged[14135]:    ...done.
Apr 21 22:10:09 gigabyte systemd[1]: Started LSB: Start or stop the Deluge BitTorrent daemon..

edt 10.10 pm  pwd: /etc/init.d  FOCAL
$ sudo ps 14135
    PID TTY      STAT   TIME COMMAND

edt 10.11 pm  pwd: /etc/init.d  FOCAL
$ deluged -d -c /var/lib/deluge/config -l /var/log/deluged/daemon.log -L debug
^Z
[1]+  Stopped                 deluged -d -c /var/lib/deluged/config -l /var/log/deluge/daemon.log -L debug

edt 10.11 pm  pwd: /etc/init.d  FOCAL
$ bg
[1]+ deluged -d -c /var/lib/deluge/config -l /var/log/deluged/daemon.log -L debug &

edt 10.11 pm  pwd: /etc/init.d  FOCAL
$ sudo ps -A |grep deluged
  14203 pts/8    00:00:02 deluged

edt 10.11 pm  pwd: /etc/init.d  FOCAL
$ ps 14203
    PID TTY      STAT   TIME COMMAND
  14203 pts/8    Sl     0:03 /usr/bin/python3 /usr/bin/deluged -d -c /var/lib/deluged/config -l /var/log/deluge/daemon.log -L debug
   
 edt 10.11 pm  pwd: /etc/init.d  FOCAL
$ ll /var/log/deluge
total 8
drwxrwxr-x  2 deluge media  4096 Apr 21 22:19 ./
drwxrwxr-x 19 root   syslog 4096 Apr 21 21:57 ../

edt 10.11 pm  pwd: /etc/init.d  FOCAL
$ ll /var/log/deluged
total 2744
drwxr-s---  2 deluge media     4096 Apr 19 09:28 ./
drwxrwxr-x 19 root   syslog    4096 Apr 21 21:57 ../
-rw-rw-r--  1 deluge media  2797575 Apr 21 22:19 daemon.log



Of note is that the systemctl-launched version of deluged isn't logging anything while the one launched from the command line is...
I appreciate any insights.

poet_imp wrote:I have it working. Thank you for the points in the right direction. Here is what I did:

Code: Select all

sudo pip3 install --upgrade twisted


I then updated the log.py file based on the patch at:

https://git.deluge-torrent.org/deluge/commit/?h=develop&id=351664ec071daa04161577c6a1c949ed0f2c3206

It still failed to start and further research showed that I had some very old ssl keys. I deleted them

Code: Select all

cd /var/lib/deluge/.config/deluge/ssl
ls -lh
total 8.0K
-rw------- 1 deluge deluge 623 Oct 25  2017 daemon.cert
-rw------- 1 deluge deluge 916 Oct 25  2017 daemon.pkey
rm *


Started the daemon and it stayed up:

Code: Select all

systemctl start deluged
systemctl status deluged
● deluged.service - Deluge Bittorrent Client Daemon
     Loaded: loaded (/etc/systemd/system/deluged.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2020-04-21 09:08:42 MST; 5s ago
       Docs: man:deluged
   Main PID: 112816 (deluged)
      Tasks: 7 (limit: 28512)
     Memory: 156.6M
     CGroup: /system.slice/deluged.service
             └─112816 /usr/bin/python3 /usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning

shamael
Compulsive Poster
Compulsive Poster
Posts: 604
Joined: Sat Oct 08, 2016 9:28 am

Re: Migrating deluge server from 18.04 -> 20.04

Postby shamael » Wed Apr 22, 2020 6:27 am

Hi,

You've to drop the initd and use the systemd method https://deluge.readthedocs.io/en/latest ... rvice.html
You can find systemd example to start Deluged and Deluge-web if needed, the logging option, and an additional condition (mount) I advise you to avoid Deluged starting prior the disk initialization.
The example gives a secured way to do it with dedicated user (not able to logon), but you you can use any user you want. Just be sure this user has the .config\deluge folder containing the Deluge setting in its profile

iconoclasthero
Member
Member
Posts: 19
Joined: Tue Aug 28, 2018 12:39 am

Re: Migrating deluge server from 18.04 -> 20.04

Postby iconoclasthero » Wed Apr 22, 2020 2:02 pm

shamael wrote:Hi,

You've to drop the initd and use the systemd method https://deluge.readthedocs.io/en/latest ... rvice.html
You can find systemd example to start Deluged and Deluge-web if needed, the logging option, and an additional condition (mount) I advise you to avoid Deluged starting prior the disk initialization.
The example gives a secured way to do it with dedicated user (not able to logon), but you you can use any user you want. Just be sure this user has the .config\deluge folder containing the Deluge setting in its profile


Thanks, given that my 18.04 install had it as a systemd service and not init.d, that probably explains why. I'm going to assume that I'll be able to push this through to the end.

One last question is over plugins. Ubuntu 20.04 ships with Python 3.8.2 and unless users decide en masse to downgrade the Ubuntu Python install, this is going to come up again: I rely on YaRSS2 but the eggs built for download are either 3.6 or 3.7. I compiled the egg with 3.8 but deluge won't recognize it. Do eggs have to be compiled with 3.7?


Return to “Support”

Who is online

Users browsing this forum: No registered users and 8 guests