Deluged unresponsive when thin client connects, fine otherwise. Worked well before.

General support for problems installing or using Deluge
Post Reply
tech
New User
New User
Posts: 4
Joined: Mon Oct 05, 2015 12:27 pm

Deluged unresponsive when thin client connects, fine otherwise. Worked well before.

Post by tech »

Hi, I have Deluge daemon (deluged) running on a RPi 2 using Xbian OS. I connect via Windows thin client to maintain and manually add torrents. I use YaRSS2 for automatically downloading files, accounting for the vast majority of downloads on this system.

The RPi is also working as a samba fileserver, a VPN entry point into my home network via OpenVPN, and as a webserver running my personal owncloud server. This setup has been running very nicely for the past two years. It is my first RPi project and my first time working with Linux command line regularly, so while I have learned a lot in the meantime, every time I do something new I have to google it first.

The first time I ran a systemwide apt-get upgrade, I somehow shot the system an luckily was able to roll it back. I have been holding off upgrading since then, but knowing this is a stupid idea I recently tried again. This time I got everything up and running again, except that the Deluge client (on windows) was reacting pretty sluggish when I interacted with the server. I have had this issue before, so I removed a few hundred (more than half) of the active torrents from the client.
Strangely, this is when the real trouble started. Clearing those torrents actually somehow had an adverse effect (although I don't see how this is possible). At this point, when I start the RPi system, everything is fine.
But when I try to connect from the Windows client, both the deluged process and the Windows client become unresponsive. Meaning: deluged process on RPi starts running at 100% CPU load, and the Windows client most of the time shows a blank screen, but thinks it is connected. Sometimes (I have not yet figured out when it happens) it actually loads the list of torrents after 5-10 minutes, but is completely unresponsive in regard to user input (changing view, pausing/starting torrents). Both the Windows client, as well as the deluged process on the RPi also react slowly or not at all to close/kill commands and that point. When I kill the Windows client, deluged will stay at 100% until the server the deluged service is killed (which takes 1-2 minutes), or the server is rebooted. Then, everything is fine again until I try to connect via thin client again.

What I have tried to fix it:
- Rollback system to Snapshot before I ran apt-upgrade -> problem persists
- Remove all torrents from /root/.config/state to make sure non of the active torrents are causing the problem -> no effect
- Upgrade Windows client from latest python 2.6 version 1.3.12-1 to latest python 2.7 version 1.3.13 (of course I installed python 2.7 first) -> nope
- Upgrade deluged and dependencies from Jessie 1.3.10 stable to 1.3.13 testing -> nothing

So really I changed everything I could, but the problem always stayed with me. As far as I can tell, deluged actually was not upgraded during the system wide apt-get upgrade that seemed to be the start of the problem. So maybe it is a problem with one of the packages that deluged uses, such as libtorrent? Right now I need help as I don't know what to do next.

When I run deluged with log level "info", I get the following output when I try to connect from the thin client:

Code: Select all

[INFO    ] 18:07:54 rpcserver:206 Deluge Client connection made from: 192.168.XXX.XXX:1933
[INFO    ] 18:07:54 rpcserver:226 Deluge client disconnected: Connection to the other side was lost in a non-clean fashion: Connection lost.
[INFO    ] 18:08:51 rpcserver:206 Deluge Client connection made from: 192.168.XXX.XXX:1938
[INFO    ] 18:08:51 rpcserver:226 Deluge client disconnected: Connection to the other side was lost in a non-clean fashion: Connection lost.
[INFO    ] 18:09:09 rpcserver:206 Deluge Client connection made from: 192.168.XXX.XXX:1943
The connection made / connection lost lines actually appear when I hit "refresh" in the thin client. When I try to connect, the log therefore states that the connection has been made. The thin client however shows no torrents and is completely unresponsive from that point. The deluged process is at 100% CPU usage but is actually still functional - it will still download torrents turning up in the RSS feed, but will not go back to normal CPU usage even after hours of waiting. Rebooting again solves that issue.
When I terminate the Windows client, I get another "non clean-fashion" disconnection info in the log.

So basically I have a still functional, but completely headless deluged system running. Everything else on the system is working fine, so I really don't want to have to start from scratch. Any ideas on how to identify where the problem is?

Thanks!
tech
New User
New User
Posts: 4
Joined: Mon Oct 05, 2015 12:27 pm

Re: Deluged unresponsive when thin client connects, fine otherwise. Worked well before.

Post by tech »

Update for future generations: Somehow I fixed it. I think purging and re-installing python did the trick.

By the way, the same problem (100% CPU load) happened when connecting via web client, instead of thin client.

So I ended up purging packages that I knew are used by Deluged. Doing it with libtorrent didn't have any effect. Purging python resulted in a shitload of packages being deinstalled. I reinstalled python and deluged, then ran apt-get upgrade which reinstalled A LOT of packages (don't really understand why).

I also installed aptitude and ran "aptitude install -f deluged", which is supposed to repair broken installations. One of those things fixes it, but I am assuming that it was purging Python.
Post Reply