Deluge server dosn't work

Hi guys, I have a problem that I can’t resolve alone. It’s an old problem that I have since my first attempt in arch. Deluge server, deluged, I really can’t make it work as expected. I had installed deluge, followed the arch wiki but as alwasys, it dosn’t work. I have a remote desktop used as download station, with deluge installed but I can run deluged only if I kill deluged servise, restart as my user with “deluged” and than with deluge-console, add torrents. The problem is that as soon as I log off from ssh connection, the deluged service stop working.
In arch somehow I had managed to make it work but I can’t replicate the method on manjaro. Can someone help me?

I had tired to uninstall deluge, remove all folders and config files, nothing work. I also tried to istall it and run it from root but get same problem

Can you explain why you need to kill deluged?

Why not using the recommended systemd system service? Any reason why you don’t use it?

If you don’t use the service and started the deluged daemon you can’t log out. The process is killed. If you have a good reason not to use the system service and let the deluged process run from the deluge user, you could use a tool like screen or temux to detach from your ssh session without closing it.
But this is a bad workaround, try the services. Do not use the user service, it will only work if you are logged in.

https://wiki.archlinux.org/index.php/Deluge#Daemon

Launching deluged as user was only a test to see it’s a problem of the program or something else. I want to run it as services, but I don’t know how to make it work. After the installation the daemon deluged can be started and it work. The problem happen after that. I don’t know how to connect to it with deluge-console. I don’t understand how to make it work by reading the wiki,because as soon as I try to connect to the daemon with deluge-console I can’t connect it. And Whitout errors. I get inside the CLI of deluge-console, I can see that the server is online but nothing happen if I press enter on the keyboard. If I try to press it a second time I get en error by python.

Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/usr/lib/python3.9/site-packages/deluge/ui/client.py", line 436, in __on_login_fail login_deferred.errback(result) File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 501, in errback self._startRunCallbacks(fail) File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks self._runCallbacks() --- <exception caught here> --- File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/usr/lib/python3.9/site-packages/deluge/ui/client.py", line 408, in __on_connect_fail self.daemon_info_deferred.errback(reason) File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 501, in errback self._startRunCallbacks(fail) File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 561, in _startRunCallbacks raise AlreadyCalledError twisted.internet.defer.AlreadyCalledError:

The deluge-console gui seems unusable, at least it did not worked for me. But the normal commands worked fine.

For example

$ deluge-console -U localclient -P afba add /media/host/test.torrent

or

$ deluge-console -U localclient -P afba status
Total upload: 0.0 KiB/s
Total download: 0.0 KiB/s
DHT Nodes: 364
Total torrents: 1
 Allocating: 0
 Checking: 0
 Downloading: 0
 Seeding: 1
 Paused: 0
 Error: 0
 Queued: 0
 Moving: 0

The default user is in /srv/deluge/.config/deluge/auth . You might want to change it and/or configure deluged to your liking. Also did you tried the web interface. Much more unfriendly.

https://wiki.archlinux.org/index.php/Deluge#Headless_setup

Neither you can’t utilize deluge-console to connect directly? Mmmm. Yeah, deluge-console status is working but I want to use it as cli client, is pretty ok. But I have that python problem. And the strange thing is that I can’t connect with the server if daemon os running. I must stop it, launch deluged as user and not service to make it work. But I’m sure it can work as service

What do you mean? I can use it directly. But keep in mind that you need a username and a password.

What commands do you use.

The only command that don’t work for me is

deluge-console -U localclient -P afba gui

What is the error? Do not use the gui command of deluge-console or start deluge-console without any commands.


There is a similar bug report (from May 2020 - not fixed)
https://bugs.archlinux.org/task/66500?project=1&string=deluge
You probably need to report it upstream to the deluge project.

My problem is that I want deluged to run as service. So I installed deluge, enable the service via “systemctl enable deluged”. If I try to use deluge-console with my user (not root or deluge user) I can’t connect to the server. I’m writing “deluge-console” and then when I see the localserver listen, I’m pressing enter. In a normal situation I will get the CLI of deluge-console, but nothing happen here. If I insist to try to connect with double enter, WHEN I close the application I get

Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/usr/lib/python3.9/site-packages/deluge/ui/client.py", line 436, in __on_login_fail login_deferred.errback(result) File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 501, in errback self._startRunCallbacks(fail) File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks self._runCallbacks() --- <exception caught here> --- File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/usr/lib/python3.9/site-packages/deluge/ui/client.py", line 408, in __on_connect_fail self.daemon_info_deferred.errback(reason) File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 501, in errback self._startRunCallbacks(fail) File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 561, in _startRunCallbacks raise AlreadyCalledError twisted.internet.defer.AlreadyCalledError:

Strange.
If I run “sudo -u deluge deluge-console” forcing to use deluge user, I can login in the server. BUT I can’t save any settings if I need. As soon as I exit the program all the settings will be in default value. If I change the /srv/deluge settings manualy with root user, as soon as I restart de daemon all the files will be reset to default values.

As I wrote above, it doesn’t work without any commands. The deluge-console interactive option seems broken.

You might want to create a bug report at the upstream deluge project.