Can't start service in Gentoo
Posted: Thu Feb 13, 2025 1:11 pm
Hi! I used Deluge from a long time, but when I started a new pc with it, has been so hard to init! this seems to happens in Gentoo mainly.
There is two main issues:
- Can't enable the logs from systemd
- Deluge is empty (NotAuthorizedError: Auth level too low: 0 < 5)
Lets start with the first one and systemctl configs:
In theory, in Gentoo, you should not touch the systemd files, and instead we need to update the ones in /etc/conf.d, but after testing I noticed they are not working, for example the params to enable logs do not works....
If you try to change: /etc/systemd/system/deluged.service.d/00gentoo.conf and add the params like:
Then systemd returns a very weird error:
So, how to enable logs to depure the next section faces this issue, any ideas?
We can start this process manually (to have logs), but the web-ui is empty.... it ask the password to access, and then everything is empty, if we try to add a torrent happens nothing.
If we check deluge-web logs we can find:
I started this from zero, the empty folder and owned by the user deluge, so it start from default, the password to start is deluge, but still I got that types of messages, I'm uploading deluged and deluge-web logs.
There is a password do not match in the deluge-web logs, but no idea which one and why there is no error on the web-ui about it.
I'm using deluge 2.1.1.
Thx!
There is two main issues:
- Can't enable the logs from systemd
- Deluge is empty (NotAuthorizedError: Auth level too low: 0 < 5)
Lets start with the first one and systemctl configs:
Code: Select all
systemctl cat deluged
# /usr/lib/systemd/system/deluged.service
[Unit]
Description=Deluge BitTorrent client
Documentation=man:deluged
After=network.target local-fs.target
Wants=local-fs.target
[Service]
ExecStart=/usr/bin/deluged -d -c ${DELUGED_HOME} ${DELUGED_OPTS}
[Install]
WantedBy=multi-user.target
# /etc/systemd/system/deluged.service.d/00gentoo.conf
[Service]
User=deluge
Group=deluge
#UMask=0002
Environment="DELUGED_HOME=/var/lib/deluge" "DELUGED_OPTS=-p 58846"
Code: Select all
systemctl status deluge-web
○ deluge-web.service - Deluge WebUI
Loaded: loaded (/usr/lib/systemd/system/deluge-web.service; enabled; preset: disabled)
Drop-In: /etc/systemd/system/deluge-web.service.d
└─00gentoo.conf
Active: inactive (dead) since Thu 2025-02-13 09:20:46 -03; 35min ago
Duration: 9h 55min 10.303s
Invocation: 7acd107ca9db45e6809e374117e3b831
Docs: man:deluge-web
Main PID: 2950 (code=exited, status=0/SUCCESS)
Mem peak: 88.5M
CPU: 6.851s
feb 12 23:25:36 localhost.localdomain systemd[1]: Started Deluge WebUI.
feb 12 23:25:49 localhost.localdomain deluge-web[2950]: 23:25:49 [ERROR ][deluge.ui.web.json_api :1672] Unable to connect to daemon, check host_id "64f7a08fadc84327af076a7789030843" is correct.
feb 12 23:26:11 localhost.localdomain deluge-web[2950]: 23:26:11 [ERROR ][deluge.ui.web.json_api :1672] Unable to connect to daemon, check host_id "64f7a08fadc84327af076a7789030843" is correct.
feb 13 09:20:46 localhost.localdomain systemd[1]: Stopping Deluge WebUI...
feb 13 09:20:46 localhost.localdomain systemd[1]: deluge-web.service: Deactivated successfully.
feb 13 09:20:46 localhost.localdomain systemd[1]: Stopped Deluge WebUI.
feb 13 09:20:46 localhost.localdomain systemd[1]: deluge-web.service: Consumed 6.851s CPU time, 88.5M memory peak.
Code: Select all
localhost /etc/conf.d # cat deluged
# /etc/conf.d/deluged
# Change this to the user you want to run deluged as.
# You may specify a group too, after a colon
DELUGED_USER="deluge:deluge"
# DELUGED_UMASK="0002"
DELUGED_OPTS="-p 58846 -L debug -l /var/lib/deluge/deluge.log"
DELUGED_HOME="/var/lib/deluge"
Code: Select all
localhost /etc/conf.d # cat deluge-web
# /etc/conf.d/deluge-web
# Change this to the user you want to run deluged as.
# You may specify a group too, after a colon
DELUGE_WEB_USER="deluge:pelota"
DELUGE_WEB_HOME="/deluge"
DELUGE_WEB_OPTS="-p 8112 -L debug -l /deluge/deluge-web.log"
If you try to change: /etc/systemd/system/deluged.service.d/00gentoo.conf and add the params like:
Code: Select all
[Service]
User=deluge
Group=deluge
#UMask=0002
Environment="DELUGED_HOME=/var/lib/deluge" "DELUGED_OPTS=-p 58846 -L debug -l /var/lib/deluge/deluge.log"
Code: Select all
× deluged.service - Deluge BitTorrent client
Loaded: loaded (/usr/lib/systemd/system/deluged.service; enabled; preset: disabled)
Drop-In: /etc/systemd/system/deluged.service.d
└─00gentoo.conf
Active: failed (Result: exit-code) since Thu 2025-02-13 09:55:56 -03; 2s ago
Duration: 401ms
Invocation: c9b7638fd543487199f9ced1ee3e3b94
Docs: man:deluged
Process: 143047 ExecStart=/usr/bin/deluged -d -c ${DELUGED_HOME} ${DELUGED_OPTS} (code=exited, status=2)
Main PID: 143047 (code=exited, status=2)
Mem peak: 28M
CPU: 359ms
feb 13 09:55:56 localhost.localdomain systemd[1]: Started Deluge BitTorrent client.
feb 13 09:55:56 localhost.localdomain deluged[143047]: usage: deluged [-h] [-V] [-c <config>] [-l <logfile>] [-L <level>]
feb 13 09:55:56 localhost.localdomain deluged[143047]: [--logrotate [<max-size>]] [-q] [--profile [<profile-file>]] [-u <ip-addr>]
feb 13 09:55:56 localhost.localdomain deluged[143047]: [-p <port>] [-i <ip-addr>] [-o <interface>]
feb 13 09:55:56 localhost.localdomain deluged[143047]: [--read-only-config-keys <comma-separated-keys>] [-P <pidfile>] [-d]
feb 13 09:55:56 localhost.localdomain deluged[143047]: [-U <user>] [-g <group>]
feb 13 09:55:56 localhost.localdomain deluged[143047]: deluged: error: argument -p/--port: invalid int value: ' 58846 -L debug -l /var/lib/deluge/deluge.log'
feb 13 09:55:56 localhost.localdomain systemd[1]: deluged.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
feb 13 09:55:56 localhost.localdomain systemd[1]: deluged.service: Failed with result 'exit-code'.
We can start this process manually (to have logs), but the web-ui is empty.... it ask the password to access, and then everything is empty, if we try to add a torrent happens nothing.
If we check deluge-web logs we can find:
Code: Select all
09:29:51 [DEBUG ][deluge.ui.client :1672] RPCError Message Received!
--------------------------------------------------------------------------------
RPCRequest: core.get_external_ip()
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/deluge/core/rpcserver.py", line 330, in dispatch
raise NotAuthorizedError(auth_level, method_auth_requirement)
deluge.error.NotAuthorizedError: Auth level too low: 0 < 5
NotAuthorizedError: Auth level too low: 0 < 5
There is a password do not match in the deluge-web logs, but no idea which one and why there is no error on the web-ui about it.
I'm using deluge 2.1.1.
Thx!