Exception error on headless raspbian

General support for problems installing or using Deluge
Post Reply
gotcha641
New User
New User
Posts: 4
Joined: Tue Jun 19, 2018 2:18 am

Exception error on headless raspbian

Post by gotcha641 »

I'm not really even sure how to search for what's going wrong, so forgive me if I'm missing something basic. Basically, daemon says its running, but
thin client can't connect and daemon doesn't do anything and deluged gives an error.

Sticky says to list what I'm running:

Code: Select all

deluged -v
deluged: 1.3.10
libtorrent: 0.16.18.0
I've had a perfectly usable deluge installation on a rpi 3 for at least a year. I was editing some shares and cleaning up directories a couple weeks ago, and decided to update and upgrade. Still on jessie, so not sure that's screwed me up.

Last night I went to add a few torrents, and they were not popping up on the thin client. I checked the torrents auto-add folder through Putty, and it hadn't picked them up.

Last time I installed I followed the basic install instructions here:

https://www.howtogeek.com/142044/how-to ... rrent-box/

When I reboot,

Code: Select all

top
says deluged is running.

When I killall or pkill deluged, and run deluged again, I get:

Code: Select all

pi@threesberrypi:~ $ deluged
pi@threesberrypi:~ $ [ERROR   ] 21:44:29 component:118 [Failure instance: Traceback: <type 'exceptions.KeyError'>: -1
/usr/lib/python2.7/dist-packages/deluge/main.py:230:start_daemon
/usr/lib/python2.7/dist-packages/deluge/core/daemon.py:161:__init__
/usr/lib/python2.7/dist-packages/deluge/component.py:296:start
/usr/lib/python2.7/dist-packages/deluge/component.py:124:_component_start
--- <exception caught here> ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:139:maybeDeferred
/usr/lib/python2.7/dist-packages/deluge/core/preferencesmanager.py:177:start
/usr/lib/python2.7/dist-packages/deluge/config.py:312:register_set_function
/usr/lib/python2.7/dist-packages/deluge/core/preferencesmanager.py:353:_on_set_encryption
]
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/main.py", line 230, in start_daemon
    Daemon(options, args)
  File "/usr/lib/python2.7/dist-packages/deluge/core/daemon.py", line 161, in __init__
    component.start("PreferencesManager")
  File "/usr/lib/python2.7/dist-packages/deluge/component.py", line 296, in start
    deferreds.append(self.components[name]._component_start())
  File "/usr/lib/python2.7/dist-packages/deluge/component.py", line 124, in _component_start
    d = maybeDeferred(self.start)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 139, in maybeDeferred
    result = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/deluge/core/preferencesmanager.py", line 177, in start
    self._on_set_encryption)
  File "/usr/lib/python2.7/dist-packages/deluge/config.py", line 312, in register_set_function
    function(key, self.__config[key])
  File "/usr/lib/python2.7/dist-packages/deluge/core/preferencesmanager.py", line 353, in _on_set_encryption
    pe_settings.allowed_enc_level = lt.enc_level(pe_enc_level[self.config["enc_level"]])
exceptions.KeyError: -1
[ERROR   ] 21:44:29 component:118 [Failure instance: Traceback: <type 'exceptions.KeyError'>: -1
/usr/lib/python2.7/dist-packages/deluge/main.py:230:start_daemon
/usr/lib/python2.7/dist-packages/deluge/core/daemon.py:169:__init__
/usr/lib/python2.7/dist-packages/deluge/component.py:296:start
/usr/lib/python2.7/dist-packages/deluge/component.py:124:_component_start
--- <exception caught here> ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:139:maybeDeferred
/usr/lib/python2.7/dist-packages/deluge/core/preferencesmanager.py:177:start
/usr/lib/python2.7/dist-packages/deluge/config.py:312:register_set_function
/usr/lib/python2.7/dist-packages/deluge/core/preferencesmanager.py:353:_on_set_encryption
]
gotcha641
New User
New User
Posts: 4
Joined: Tue Jun 19, 2018 2:18 am

Re: Exception error on headless raspbian

Post by gotcha641 »

Well I've now either made it better or worse -

Code: Select all

pi@threesberrypi:~ $ deluged
pi@threesberrypi:~ $ [ERROR   ] 22:02:11 main:232 There is a deluge daemon running with this config directory!
[ERROR   ] 22:02:11 main:233 You cannot run multiple daemons with the same config directory set.
[ERROR   ] 22:02:11 main:234 If you believe this is an error, you can force a start by deleting /home/pi/.config/deluge/deluged.pid.
I found this post:
viewtopic.php?t=54816

which suggested renaming, so I did

Code: Select all

sudo mv deluge/ delooj
After a reboot, it gives the above.

I'm going to bed before I burn it down.
gotcha641
New User
New User
Posts: 4
Joined: Tue Jun 19, 2018 2:18 am

Re: Exception error on headless raspbian

Post by gotcha641 »

When I find this in another 6 months, twice now I've had no luck and ended up wiping the rpi card and reinstalling.
gotcha641
New User
New User
Posts: 4
Joined: Tue Jun 19, 2018 2:18 am

Re: Exception error on headless raspbian

Post by gotcha641 »

I fixed it following the rename suggestion.

The part I always miss is that the commands in the guide I use

https://www.howtogeek.com/142044/how-to ... rrent-box/

are all jumbled together, so I try to run 2 or 3 at the same time and it (of course) doesn't work. Then I get frustrated and, until now, reinstall.

Running sudo pkill deluged didn't seem to make a difference, but it might have. Rename .config/deluge to delugebak, reboot so it starts and creates new, edit auth with pw:name:10, maybe reboot again, and thinclient connects.
Post Reply