Deluge starts but can't connect

General support for problems installing or using Deluge
Post Reply
Wolfeman0101
New User
New User
Posts: 4
Joined: Mon Jul 17, 2017 3:35 am

Deluge starts but can't connect

Post by Wolfeman0101 »

Just installed and moved over old data. On FreeNAS jail.

root@deluge:/config # Unhandled error in Deferred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/local/lib/python3.8/site-packages/deluge/component.py", line 132, in on_start_fail
log.error(result)
File "/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
return _cancellableInlineCallbacks(gen)
File "/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
_inlineCallbacks(None, g, status)
--- <exception caught here> ---
File "/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/usr/local/lib/python3.8/site-packages/deluge/log.py", line 79, in error
yield LoggingLoggerClass.error(self, msg, *args, **kwargs)
File "/usr/local/lib/python3.8/logging/__init__.py", line 1475, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/local/lib/python3.8/logging/__init__.py", line 1577, 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 0x8033c35b0>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py:1097:__init__
/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py:962:__del__
/usr/local/lib/python3.8/site-packages/twisted/logger/_logger.py:190:failure
/usr/local/lib/python3.8/site-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/local/lib/python3.8/site-packages/twisted/logger/_observer.py:131:__call__
/usr/local/lib/python3.8/site-packages/twisted/logger/_legacy.py:93:__call__
/usr/local/lib/python3.8/site-packages/deluge/log.py:204:emit
/usr/local/lib/python3.8/logging/__init__.py:1493:critical
/usr/local/lib/python3.8/logging/__init__.py:1577:_log
]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py", line 1097, in __init__
deferred.addCallbacks(self._cbDeferred, self._cbDeferred,
File "/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py", line 962, in __del__
log.failure(format,
File "/usr/local/lib/python3.8/site-packages/twisted/logger/_logger.py", line 190, in failure
self.emit(level, format, log_failure=failure, **kwargs)
File "/usr/local/lib/python3.8/site-packages/twisted/logger/_logger.py", line 144, in emit
self.observer(event)
--- <exception caught here> ---
File "/usr/local/lib/python3.8/site-packages/twisted/logger/_observer.py", line 131, in __call__
observer(event)
File "/usr/local/lib/python3.8/site-packages/twisted/logger/_legacy.py", line 93, in __call__
self.legacyObserver(event)
File "/usr/local/lib/python3.8/site-packages/deluge/log.py", line 204, in emit
getattr(LoggingLoggerClass, event_dict['log_level'].name)(
File "/usr/local/lib/python3.8/logging/__init__.py", line 1493, in critical
self._log(CRITICAL, msg, args, **kwargs)
File "/usr/local/lib/python3.8/logging/__init__.py", line 1577, 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
mhertz
Moderator
Moderator
Posts: 1288
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge starts but can't connect

Post by mhertz »

Most of that is because using deluge stable, missing a logging-fix from develop branch, though not sure about the very first on_start_fail error, but honestly cannot remember fully.

To weed out all the irrelevant parts, plus also will grow your log like crazy, then you could apply the logging-fix yourself if wanted - You can do it manually, from here: https://git.deluge-torrent.org/deluge/c ... ed0f2c3206

Or, this command-line does the same:

Code: Select all

sudo find /usr -path */deluge/log.py -exec sed -i 's/stack_info=False/*args, **kwargs/' {} \;
* Obligatory wanring about not running command-lines found online, especially ones using 'sudo', unless understanding what's being done specifically.

Though you said you're using freenas jail, which I have no clue about sorry, so will have to find how apply such to that yourself, and ammend the find call if deluge not under /usr/* either.

Other than that, then I can only suggest to see if issue persists when starting with clean profile i.e. rename deluge profile dir with deluged stopped, restart deluged and see if can connect then, and then rename back afterwards, as just meant for testing.

Of-course debug logging for when log-fix applied would be helpfull also.

Good luck.
Wolfeman0101
New User
New User
Posts: 4
Joined: Mon Jul 17, 2017 3:35 am

Re: Deluge starts but can't connect

Post by Wolfeman0101 »

Code: Select all

23:20:08.220 [ERROR   ][deluge.component              :132 ] [Failure instance: Traceback: <class 'KeyError'>: -1
/usr/local/lib/python3.8/site-packages/twisted/internet/base.py:1292:mainLoop
/usr/local/lib/python3.8/site-packages/twisted/internet/base.py:913:runUntilCurrent
/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py:460:callback
/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py:568:_startRunCallbacks
--- <exception caught here> ---
/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py:654:_runCallbacks
/usr/local/lib/python3.8/site-packages/twisted/internet/task.py:866:<lambda>
/usr/local/lib/python3.8/site-packages/deluge-2.0.4.dev61-py3.8.egg/deluge/core/preferencesmanager.py:162:start
/usr/local/lib/python3.8/site-packages/deluge-2.0.4.dev61-py3.8.egg/deluge/core/preferencesmanager.py:176:do_config_set_func
/usr/local/lib/python3.8/site-packages/deluge-2.0.4.dev61-py3.8.egg/deluge/core/preferencesmanager.py:299:_on_set_enc_in_policy
/usr/local/lib/python3.8/site-packages/deluge-2.0.4.dev61-py3.8.egg/deluge/core/preferencesmanager.py:319:_on_set_encryption
]
23:20:08.259 [ERROR   ][deluge.config                 :503 ] Error moving new config file: [Errno 1] Operation not permitted: '/home/deluge/.config/deluge/stats.totals'
23:21:08.264 [ERROR   ][deluge.config                 :503 ] Error moving new config file: [Errno 1] Operation not permitted: '/home/deluge/.config/deluge/stats.totals'
So this is what I'm seeing now.
mhertz
Moderator
Moderator
Posts: 1288
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge starts but can't connect

Post by mhertz »

Disable stats plugin, which is known to cause problems in deluge2(can edit core.conf to disable it etc) Also check you have your deluge profile folder files all owned by deluge user. If haven't already, also try with clean profile if still having issues.

Edit: Sorry I remembered wrong, it was the "show pieces" option, not stats plugin, being problematic. I'm affraid I don't know the reason, googling this shows just that the permission denied exact error often comes when files chowned wrong, hence the reference before to check owner of all files in profile. As said, I'd try clean profile and if works then narrow it down copying over file by file from old to new profile.

Otherwise hopefully others have better ideas than me.
nnleaf
New User
New User
Posts: 2
Joined: Sat Aug 21, 2021 4:01 pm

Re: Deluge starts but can't connect

Post by nnleaf »

Hi, it seems we have a similar situation.
viewtopic.php?f=7&t=56005

Did you end up figuring out what went wrong?
Post Reply