Deluge daemon stopping frequently

General support for problems installing or using Deluge
Thailandian
Member
Member
Posts: 21
Joined: Fri Sep 27, 2013 5:21 pm

Re: Deluge daemon stopping frequently

Post by Thailandian »

The daemon was down.

I can't say for sure that I didn't lose internet connectivity, but it seems very reliable; I've only lost connectivity once in the last couple of months - during a massive thunder storm.

fernandog, your connectivity problem looks similar to one I had, which turned out to be a permissions problem. I was starting the daemon as root, so both gtk and web ui couldn't access it. Details here

Meanwhile, I've installed deluge on wine. It's not an ideal work-around, but seems to be working OK for now. If it is still up by tomorrow morning, I'll write up the details in case anyone else is desperate enough to try it.
ernobe
Member
Member
Posts: 11
Joined: Tue Sep 24, 2013 8:23 pm

Re: Deluge daemon stopping frequently

Post by ernobe »

If I were either of you I would not be running deluged as root ( in the boot process ).

fernandog, the process started by root is different from the one started when you hit "start daemon" in webui, because root is a different user than you.

Try having it do everything you need it to without a boot startup script. Run it from the command line like this:

$ deluged -d

and see if your frequent stopping problems go away. That is after all what the official man page itself prescribes, because running webui or gtk as root is a huge security risk, it's like running X as root. The daemon can be run as root having remote connections disabled in deluge-gtk, and webui can be left to the experts, to set up a private network that is not connected to the internet, or to provide a way to connect remotely in case of an emergency.
ernobe
Member
Member
Posts: 11
Joined: Tue Sep 24, 2013 8:23 pm

Re: Deluge daemon stopping frequently

Post by ernobe »

fernandog wrote:I can start in boot as other user. Cant I?
I'm not familiar with how Ubuntu is set-up, but if you can get it to log in automatically to one of the tty consoles, then you can have the following line in your ~/.bashrc file:

if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
deluged -d
fi

Replace the number in /dev/tty1 with the number of the tty console it logs into and it will automatically spawn the deluged process.

At the end of the boot process, Debian is at /dev/tty1 and if X starts automatically it is because it has logged into this tty. So if I were you I would try this line and see if it works, assuming Ubuntu is set-up like Debian.
Thailandian
Member
Member
Posts: 21
Joined: Fri Sep 27, 2013 5:21 pm

Re: Deluge daemon stopping frequently

Post by Thailandian »

Just to be clear, I am also no longer running Deluge as root. In fact, when I was, I couldn't get deluge-gtk to work, except in "classic mode".

My problems with constant crashing started some time after that, and seem to be connected to the libcrypto bug as Cas suggests.

@fernandog, have you tried using the task manager? On my KDE task manager, I can check if tasks are still running, and which user they belong to. At least, you should be able to see if you have two daemons running at the same time.
ernobe
Member
Member
Posts: 11
Joined: Tue Sep 24, 2013 8:23 pm

Re: Deluge daemon stopping frequently

Post by ernobe »

You are supposed to be able to start, stop or restart it from the command line, like this:

$ /etc/init.d/deluge-daemon start

or

$ /etc/init.d/deluge-daemon restart

or

$ /etc/init.d/deluge-daemon stop

If it says you don't have permission then change the user of the file:

# chown fernandog:fernandog /etc/init.d/deluge-daemon

And put this:

if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
/etc/init.d/deluge-daemon start
fi

in your ~/.bashrc file
Thailandian
Member
Member
Posts: 21
Joined: Fri Sep 27, 2013 5:21 pm

Re: Deluge daemon stopping frequently

Post by Thailandian »

Well my wine experiment didn't turn out as successful as I first thought.

I got up this morning and the daemon was still running, but the thin-client was in a zombie state and the daemon was using half of the cpu!

I'm reluctantly moving to transmission, but will keep an eye on this forum to see if the problem is eventually resolved.

Good luck to all.
Thailandian
Member
Member
Posts: 21
Joined: Fri Sep 27, 2013 5:21 pm

Re: Deluge daemon stopping frequently

Post by Thailandian »

fernandog wrote:Did you disabled encryption?
Yes I did and stability seemed to improve. Whereas before, deluged was crashing every few minutes, it didn't crash all eventing, but was down again next morning.
I've been wondering if it only crashes when there is no activity.

Anyway, I haven't changed over yet, so I'll see if it's still running tomorrow morning.

I'd like an easy way to know when it goes down. Any ideas?
Thailandian
Member
Member
Posts: 21
Joined: Fri Sep 27, 2013 5:21 pm

Re: Deluge daemon stopping frequently

Post by Thailandian »

I just had another kludgey idea. Haven't had time to try it yet, but will do so tomorrow and let you know results.

My idea is to use crontab to restart the daemon if it goes down. I've checked and if I enter "deluged" at a terminal when the daemon is still running ... nothing happens :o

So if I set a crontab script to run deluged, say, every five minutes, then if the daemon has crashed, the script will bring it back up again. If it hasn't crashed - no problem, nothing happens.

I haven't used crontab for years so will have to do a bit of research tomorrow, but I'm fairly confident this will work. I'll let you know.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge daemon stopping frequently

Post by Cas »

If you are using upstart scripts then deluged will be restarted.
Thailandian
Member
Member
Posts: 21
Joined: Fri Sep 27, 2013 5:21 pm

Re: Deluge daemon stopping frequently

Post by Thailandian »

Cas wrote:If you are using upstart scripts then deluged will be restarted.
Just checking - do you mean that the upstart script will cause deluge to restart if it crashes?
Post Reply