Version 2.0.3 Initial install - deluge-web Not working from systemd

General support for problems installing or using Deluge
Post Reply
jiml
New User
New User
Posts: 3
Joined: Sat Jun 15, 2019 5:10 pm

Version 2.0.3 Initial install - deluge-web Not working from systemd

Post by jiml »

I have set up version 2.0.3 on ubuntu as per wiki (including setting up "deluge" user) but it isn't working correctly. I got the following deluge-web error and now nothing happens at all;

Code: Select all

16:31:56 [ERROR   ][deluge.ui.web.json_api     :185 ] [Failure instance: Traceback: <class 'TypeError'>: Object of type Failure is not JSON serializable
/usr/lib/python3/dist-packages/twisted/internet/defer.py:654:_runCallbacks
/usr/lib/python3/dist-packages/twisted/internet/defer.py:1116:_cbDeferred
/usr/lib/python3/dist-packages/twisted/internet/defer.py:460:callback
/usr/lib/python3/dist-packages/twisted/internet/defer.py:568:_startRunCallbacks
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/internet/defer.py:654:_runCallbacks
/usr/lib/python3/dist-packages/deluge/ui/web/json_api.py:179:_on_rpc_request_finished
/usr/lib/python3/dist-packages/deluge/ui/web/json_api.py:232:_send_response
/usr/lib/python3.7/json/__init__.py:231:dumps
/usr/lib/python3.7/json/encoder.py:199:encode
/usr/lib/python3.7/json/encoder.py:257:iterencode
/usr/lib/python3.7/json/encoder.py:179:default
]
16:31:56 [CRITICAL][twisted                    :154 ] Unhandled error in Deferred:
16:31:56 [CRITICAL][deluge.log                 :93  ] twisted.internet.defer 
[Failure instance: Traceback: <class 'TypeError'>: Object of type Failure is not JSON serializable
/usr/lib/python3/dist-packages/twisted/internet/defer.py:654:_runCallbacks
/usr/lib/python3/dist-packages/twisted/internet/defer.py:1116:_cbDeferred
/usr/lib/python3/dist-packages/twisted/internet/defer.py:460:callback
/usr/lib/python3/dist-packages/twisted/internet/defer.py:568:_startRunCallbacks
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/internet/defer.py:654:_runCallbacks
/usr/lib/python3/dist-packages/deluge/ui/web/json_api.py:190:_on_rpc_request_failed
/usr/lib/python3/dist-packages/deluge/ui/web/json_api.py:232:_send_response
/usr/lib/python3.7/json/__init__.py:231:dumps
/usr/lib/python3.7/json/encoder.py:199:encode
/usr/lib/python3.7/json/encoder.py:257:iterencode
/usr/lib/python3.7/json/encoder.py:179:default
]
16:31:56 [CRITICAL][twisted                    :154 ] Unhandled error in Deferred:
16:31:56 [CRITICAL][deluge.log                 :93  ] twisted.internet.defer 
[Failure instance: Traceback (failure with no frames): <class 'deluge.error.NotAuthorizedError'>: Auth level too low: 0 < 5
]
As the first line mentioned JSON I thought it might have been a screwed up the config file so I removed the config files and re-ran the service files but the same thing happens, I also get no more new log output.

Here is the status output;

Code: Select all

● deluged.service - Deluge Bittorrent Client Daemon
   Loaded: loaded (/home/jiml/scripts/systemd/system/deluged.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-06-15 18:17:45 BST; 42ms ago
     Docs: man:deluged
 Main PID: 18403 (deluged)
    Tasks: 1 (limit: 9830)
   Memory: 2.7M
   CGroup: /system.slice/deluged.service
           └─18403 /usr/bin/python3 /usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning

Jun 15 18:17:45 plex-server systemd[1]: Started Deluge Bittorrent Client Daemon.
● deluge-web.service - Deluge Bittorrent Client Web Interface
   Loaded: loaded (/home/jiml/scripts/systemd/system/deluge-web.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2019-06-15 16:32:42 BST; 1h 45min ago
     Docs: man:deluge-web
 Main PID: 58650 (code=exited, status=0/SUCCESS)

Jun 15 16:31:56 plex-server deluge-web[58650]:     return _iterencode(o, 0)
Jun 15 16:31:56 plex-server deluge-web[58650]:   File "/usr/lib/python3.7/json/encoder.py", line 179, in default
Jun 15 16:31:56 plex-server deluge-web[58650]:     raise TypeError(f'Object of type {o.__class__.__name__} '
Jun 15 16:31:56 plex-server deluge-web[58650]: builtins.TypeError: Object of type Failure is not JSON serializable
Jun 15 16:31:56 plex-server deluge-web[58650]: Unhandled error in Deferred:
Jun 15 16:31:56 plex-server deluge-web[58650]: Traceback (most recent call last):
Jun 15 16:31:56 plex-server deluge-web[58650]: Failure: deluge.error.NotAuthorizedError: Auth level too low: 0 < 5
Jun 15 16:32:42 plex-server systemd[1]: Stopping Deluge Bittorrent Client Web Interface...
Jun 15 16:32:42 plex-server systemd[1]: deluge-web.service: Succeeded.
Jun 15 16:32:42 plex-server systemd[1]: Stopped Deluge Bittorrent Client Web Interface.
Details of setup;

Code: Select all

deluged 2.0.3-2-201906121747-ubuntu19.04.1
deluge-web 2.0.3-2-201906121747-ubuntu19.04.1
libtorrent: 1.1.11.0
Python: 3.7.3
OS: Linux Ubuntu 19.04 Disco Dingo
deluged.service

Code: Select all

[Unit]
Description=Deluge Bittorrent Client Daemon
Documentation=man:deluged
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=000
ExecStart=/usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning
Restart=on-failure
# Time to wait before forcefully stopped.
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target
deluge-web.service

Code: Select all

[Unit]
Description=Deluge Bittorrent Client Web Interface
Documentation=man:deluge-web
After=network-online.target deluged.service
Wants=deluged.service
[Service]
Type=simple
User=deluge
Group=deluge
UMask=027
# This 5 second delay is necessary on some systems
# to ensure deluged has been fully started
ExecStartPre=/bin/sleep 5
ExecStart=/usr/bin/deluge-web -l /var/log/deluge/web.log -L debug
Restart=on-failure
[Install]
WantedBy=multi-user.target
jiml
New User
New User
Posts: 3
Joined: Sat Jun 15, 2019 5:10 pm

Re: Version 2.0.3 Initial install - deluge-web Not working from systemd

Post by jiml »

Just re-booted machine. deluge-web it is now is showing as running but I cannot access the web gui. The log is empty

Code: Select all

● deluged.service - Deluge Bittorrent Client Daemon
   Loaded: loaded (/home/jiml/scripts/systemd/system/deluged.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-06-15 18:44:08 BST; 5min ago
     Docs: man:deluged
 Main PID: 994 (deluged)
    Tasks: 8 (limit: 9830)
   Memory: 55.6M
   CGroup: /system.slice/deluged.service
           └─994 /usr/bin/python3 /usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning

Jun 15 18:44:08 plex-server systemd[1]: Started Deluge Bittorrent Client Daemon.
● deluge-web.service - Deluge Bittorrent Client Web Interface
   Loaded: loaded (/home/jiml/scripts/systemd/system/deluge-web.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2019-06-15 18:44:15 BST; 5min ago
     Docs: man:deluge-web
  Process: 995 ExecStartPre=/bin/sleep 5 (code=exited, status=0/SUCCESS)
  Process: 1642 ExecStart=/usr/bin/deluge-web -l /var/log/deluge/web.log -L debug (code=exited, status=0/SUCCESS)
 Main PID: 1642 (code=exited, status=0/SUCCESS)

Jun 15 18:44:08 plex-server systemd[1]: Starting Deluge Bittorrent Client Web Interface...
Jun 15 18:44:13 plex-server systemd[1]: Started Deluge Bittorrent Client Web Interface.
Jun 15 18:44:15 plex-server systemd[1]: deluge-web.service: Succeeded.
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Version 2.0.3 Initial install - deluge-web Not working from systemd

Post by Cas »

jiml
New User
New User
Posts: 3
Joined: Sat Jun 15, 2019 5:10 pm

Re: Version 2.0.3 Initial install - deluge-web Not working from systemd

Post by jiml »

Thank you. Simple when you know how :-)

Might be useful if someone could update the wiki page at; https://dev.deluge-torrent.org/wiki/Use ... ce/systemd
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Version 2.0.3 Initial install - deluge-web Not working from systemd

Post by Cas »

Post Reply