Deluge Python Error

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
bookedirl
Posts: 25
Joined: Sat Oct 24, 2015 7:15 am

Deluge Python Error

Post by bookedirl »

Any reason why I would get the following errors when running "deluged" ?

I've uninstalled and reinstalled deluge and get the same out come running deluged.

Code: Select all

root@DietPi:~# deluged
root@DietPi:~# [ERROR   ] 16:32:15 component:118 [Failure instance: Traceback: <type 'exceptions.RuntimeError'>: Address family not supported by protocol
/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:160:start
/usr/lib/python2.7/dist-packages/deluge/config.py:312:register_set_function
/usr/lib/python2.7/dist-packages/deluge/core/preferencesmanager.py:254:_on_set_listen_ports
]
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 160, in start
    self._on_set_listen_ports)
  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 254, in _on_set_listen_ports
    self.session.listen_on(value[0], value[1], str(self.config["listen_interface"]).strip())
exceptions.RuntimeError: Address family not supported by protocol
[ERROR   ] 16:32:15 component:118 [Failure instance: Traceback: <type 'exceptions.RuntimeError'>: Address family not supported by protocol
/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:160:start
/usr/lib/python2.7/dist-packages/deluge/config.py:312:register_set_function
/usr/lib/python2.7/dist-packages/deluge/core/preferencesmanager.py:254:_on_set_listen_ports
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Deluge Python Error

Post by Fourdee »

I'll need to check your system settings. Please can you send a bug report:

Code: Select all

dietpi-bugreport
No need to fill out the text document, I just need your Reference CODE:.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
bookedirl
Posts: 25
Joined: Sat Oct 24, 2015 7:15 am

Re: Deluge Python Error

Post by bookedirl »

Thanks for taking a look at it!

Reference CODE: b827eba506ac-0
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Deluge Python Error

Post by Fourdee »

bookedirl wrote:Thanks for taking a look at it!

Reference CODE: b827eba506ac-0
Got the bug report thanks.

I replicated your installation for testing. I was unable to obtain the errors you received.

Code: Select all

[ERROR   ] 16:32:15 component:118 [Failure instance: Traceback: <type 'exceptions.RuntimeError'>: Address family not supported by protocol
This sounds like an network / IPv6 issue of some kind.

When you run deluged and deluge-web, regardless of the errors are you able to access the web interface?

Have you tried doing a fresh install of the DietPi image and only installing deluge?

Failing that, I can only recommend you contact deluge's support/forum for assistance. Maybe they can assist with debugging the python sourcecode.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
bookedirl
Posts: 25
Joined: Sat Oct 24, 2015 7:15 am

Re: Deluge Python Error

Post by bookedirl »

I'm not sure whats causing this error then. I posted the same question in Deluge forums http://forum.deluge-torrent.org/viewtop ... 81#p222281
The ports are valid integers and listen_interface is an empty string. I cannot replicate the error myself. However I suspect it is due to IPv6 being disabled on RPi Raspbian. I don't ever recall seeing this issue from users running 0.16.
So as you suspected it looks like something to do with IPv6. They also said this issue was fixed with Libtorrent 1.07 which apparently is a long process to install and is not part of the standard apt-get packages. Wondering why it's not.. but the issue is fixed with Libtorrent 1.07.

What I don't understand is what is causing this problem. I'm curious if OpenVpn is causing the issue but as you said you replicated my installation so I'm not sure?

The only things I have installed is Deluge, OpenVPN & VNC after a fresh install. I guess I could try a fresh install less the openvpn install to see if I still get this issue.
bookedirl
Posts: 25
Joined: Sat Oct 24, 2015 7:15 am

Re: Deluge Python Error

Post by bookedirl »

So I did a fresh install and only installed VNC and Deluge..

This was the first thing I did after a reboot and I get the same error. So I'm stumped as to why this happens.

Code: Select all

root@DietPi:~# pkill deluged
root@DietPi:~# deluged
root@DietPi:~# [ERROR   ] 14:56:17 component:118 [Failure instance: Traceback: <type 'exceptions.RuntimeError'>: Address family not supported by protocol
/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:160:start
/usr/lib/python2.7/dist-packages/deluge/config.py:312:register_set_function
/usr/lib/python2.7/dist-packages/deluge/core/preferencesmanager.py:254:_on_set_listen_ports
]
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 160, in start
    self._on_set_listen_ports)
  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 254, in _on_set_listen_ports
    self.session.listen_on(value[0], value[1], str(self.config["listen_interface"]).strip())
exceptions.RuntimeError: Address family not supported by protocol
[ERROR   ] 14:56:17 component:118 [Failure instance: Traceback: <type 'exceptions.RuntimeError'>: Address family not supported by protocol
/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:160:start
/usr/lib/python2.7/dist-packages/deluge/config.py:312:register_set_function
/usr/lib/python2.7/dist-packages/deluge/core/preferencesmanager.py:254:_on_set_listen_ports
]
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Deluge Python Error

Post by Fourdee »

bookedirl wrote:So I did a fresh install and only installed VNC and Deluge..

This was the first thing I did after a reboot and I get the same error. So I'm stumped as to why this happens.
Yep its strange. Works fine my end.

If it is a network / ipv6 issue as you mentioned, try setting a static IP for your device in dietpi-config.

Also, for testing purposes, try disabling IPv6 on your network router.
If that fails, try enabling IPv6: https://github.com/Fourdee/DietPi/issue ... -143582088. I dont have a IPv6 capable network, so i'am unable to test my end.

Its gonna be one of those "trial and error" scenarios, at least until Libtorrent 1.07 is available in the repo or compiled :)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply