Deluge keeps failing on Raspberry Pi - permissions/multiple versions?

General support for problems installing or using Deluge
Post Reply
itsagift
New User
New User
Posts: 4
Joined: Mon Mar 04, 2024 9:41 pm

Deluge keeps failing on Raspberry Pi - permissions/multiple versions?

Post by itsagift »

Hi, I am embarassingly new to Linux and I don't even know how to explain the errors I'm receiving.

I followed this tutorial:https://deluge.readthedocs.io/en/latest ... rvice.html and this tutorial: https://josh.fail/2019/deluge-and-openv ... erry-pi-4/ (basically the same information, but with other service tutorials added). Originally, I was getting access to the Deluge Web Service but my torrents kept going to 0 with various error codes, but now I'm unable to even start the web service.

So the first issue is that there seem to be multiple deluged instances running.

In the log, I receive these errors:
[ERROR ][deluge.core.daemon_entry :124 ] Cannot start deluged, listen port in use.
Check for other running daemons or services using this port: localhost:58846


When I check the port I see this:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
deluged 710 deluge 12u IPv4 16797 0t0 TCP localhost:58846 (LISTEN)


I can't seem to kill one instance and not the other? I suspect that once I fix this I will have other issues but I need to fix this first and can't find anyone with the exact same issue
mhertz
Moderator
Moderator
Posts: 2216
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge keeps failing on Raspberry Pi - permissions/multiple versions?

Post by mhertz »

No worries :)

Just in case, run 'sudo systemctl stop deluged' and 'sudo pkill deluged', and forget 'sudo' from these if already root or not having it(don't know anything about pi's/raspbian etc).

Follow your first link for services, as the latter misses a '-d' switch for 'deluge-web.service', as outdated guide.

If editing service files manually, then afterwards run 'sudo systemctl daemon-reload'.

Then if cannot download is probably a permission issue most likely.
shinger
Leecher
Leecher
Posts: 90
Joined: Sat Jun 05, 2010 1:02 pm

Re: Deluge keeps failing on Raspberry Pi - permissions/multiple versions?

Post by shinger »

Hello itsagift,

You are more than welcome in the Linux world. We will do our best to help you fix your issues and teach you how things work :D . You will not regret using Linux. Just stay calm and observe. My experience in the 16 years that i work with Linux, 9 times out of 10 it is your fault if something does not work and that 1 time it is often a bug.

If you do a ps faux | grep deluge you will see all the running deluge processes.

To see if you need or do not need to use the the command sudo, type whoami, the output will show you what user you currently are. If it is root, then you do not need to use the command sudo, if you are another user, then you have to use the command sudo

You could put the output of both deluged and deluge-web systemd service. Use the command sudo systemctl cat <name of the service>. You will get a output and you can put the output in a message. Use the button </> in the mark-up window to make it more clear like this. This is how my deluged.service looks like as an example.

Code: Select all

<USER>@<SYSTEM>:~# systemctl cat deluged.service 
# /etc/systemd/system/deluged.service
[Unit]
Description=Deluge Bittorrent Client Daemon
Documentation=man:deluged
After=network-online.target

[Service]
Type=simple
User=deluge
Group=sambashare
UMask=007

#ExecStart=/usr/bin/deluged -d -L info -l /var/log/deluge/deluged.log
ExecStart=/usr/bin/deluged -d -L debug -l /var/log/deluge/deluged.log

Restart=on-failure

# Configures the time to wait before service is stopped forcefully.
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target
Extra information what the command does, but not necessary to read.

The "faux" options of the command ps will give you the ability to see all the processes, which user is running them, how much memory it is using, how much cpu it is using, do the next thing and also which is the parent process and which is the child process. The ps faux command is super essential.

This | sign is called pipe. It is is like taking the output of the first command and giving it to the second command. So if you use only ps faux, you would get a whole list of all the processes. With pipe you take this output and further narrow it down with the grep command. This is also another essential commando in Linux and is very flexible. You grab a certain word or characters from the whole list. In this case you are saying, grab all the deluge you see there. You do need full user abilities to see also which application a process is. Either executing it with the root user or with sudo.
===============================================================
Server: Rock 5B 8 Cores (ARM), 16 GB RAM, 2 TB 970 Evo +
OS: Linux Ubuntu 22.04 LTS
Deluge: v2.1.1
Plugins: Blocklist, LabelPlus, ItConfig, MyScheduler, Stats, Notifications, YaRSS2
itsagift
New User
New User
Posts: 4
Joined: Mon Mar 04, 2024 9:41 pm

Re: Deluge keeps failing on Raspberry Pi - permissions/multiple versions?

Post by itsagift »

This was because my systemd service file pointed to the same location for both deluge-web and deluged. Fixed it and got it working for a few days, but now there's issues again. I'll make a new post because they're distinct
Post Reply