Deluged not correctly starting after reboot

General support for problems installing or using Deluge
SavageButcher
New User
New User
Posts: 8
Joined: Sun Mar 24, 2013 7:27 pm

Deluged not correctly starting after reboot

Post by SavageButcher »

Hey guys, i've got this problem i hope you can help me solve.
I've set up Deluge daemon on my netbook running Ubuntu server, but it has some problems when i start up the system.
The thing is, if i run deluge-console, it gives me back this error:

Code: Select all

Failed to connect to 127.0.0.1:58846 with reason: Password does not match
To make it work, all i have to do is

Code: Select all

sudo pkill deluged
deluged
This is my init file, ive copied from a random tutorial.

Code: Select all

start on (filesystem and networking) or runlevel [2345]
stop on runlevel [016]

env uid=deluge
env gid=deluge
env umask=022

exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d
I've tried using the init found in the official wiki (http://dev.deluge-torrent.org/wiki/User ... t%20Job%29) but it didn't solve the problem, and furthermore it gave back some kind of error when trying to run the "deluged" command.
Oh, and yeah, i'm not even sure the problem is in the init file, i barely know what i'm doing, here.

Please help me guys, this is getting really annoying! :(
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluged not correctly starting after reboot

Post by Cas »

Please use the latest version of upstart script in the guide and paste the error you see.
SavageButcher
New User
New User
Posts: 8
Joined: Sun Mar 24, 2013 7:27 pm

Re: Deluged not correctly starting after reboot

Post by SavageButcher »

Code: Select all

[ERROR   ] 23:35:33 rpcserver:375 Couldn't listen on any:58846: [Errno 98] Address already in use.
I think the error is linked to the 2 "respawn" lines, as deleting those causes no error.
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluged not correctly starting after reboot

Post by Cas »

That is not a problem with the script but with your setup. You probably already have deluged (with webui plugin) or deluge-web already running. Running deluged from the command line is different to running from upstart script (they use different config dirs) and you cannot expect the same outcome.

If you follow the steps in that upstart precisely then it will work. Remove any old scripts and stop any running deluge processes.
SavageButcher
New User
New User
Posts: 8
Joined: Sun Mar 24, 2013 7:27 pm

Re: Deluged not correctly starting after reboot

Post by SavageButcher »

Cas wrote:That is not a problem with the script but with your setup. You probably already have deluged (with webui plugin) or deluge-web already running. Running deluged from the command line is different to running from upstart script (they use different config dirs) and you cannot expect the same outcome.

If you follow the steps in that upstart precisely then it will work. Remove any old scripts and stop any running deluge processes.
Just to be sure, i uninstalled deluge-web as i don't use it. Now there are just deluge, deluge-console and deluge-common left.
[*]group and user: done
[*]init file: just like the wiki one
[*]no init.d scripts left (unless they're hidden somewhere else than init.d folder, but it doesn't make much sense to me)

Still, i cant get deluge to run when i power up the machine, and when i try to run it manually, i get the "address already in use" error.

Could it be deluge-common fault? Cant find any info on this process, could it be a leftover of a previous install?
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluged not correctly starting after reboot

Post by Cas »

deluged is the daemon you absolutely need that if you want it to show up!
SavageButcher
New User
New User
Posts: 8
Joined: Sun Mar 24, 2013 7:27 pm

Re: Deluged not correctly starting after reboot

Post by SavageButcher »

Cas wrote:deluged is the daemon you absolutely need that if you want it to show up!
Yep im sorry, i meant delugeD, deluge-console and deluge-common! My bad!
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluged not correctly starting after reboot

Post by Cas »

So you created the deluge user as per guide then have a file named /etc/init/deluged.conf with relevant contents and started the service with sudo start deluged?

Is deluged location /usr/bin/deluged?
SavageButcher
New User
New User
Posts: 8
Joined: Sun Mar 24, 2013 7:27 pm

Re: Deluged not correctly starting after reboot

Post by SavageButcher »

Cas wrote:So you created the deluge user as per guide then have a file named /etc/init/deluged.conf with relevant contents and started the service with sudo start deluged?

Is deluged location /usr/bin/deluged?
yep, i created the deluge user.
Nope, im feeling kinda dumb atm, but the file was called deluge.conf. Corrected it (thanks!)
After rebooting, the process is running. But, it doesn't seem to work, as i cant connect to the deamon using the windows client, and deluge-console returns the "Password does not match" error.
Same thing if i restart the service (sudo restart deluged)
The only thing to make it work is "sudo pkill deluged" + "deluged".
And yep, the location is correct!
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluged not correctly starting after reboot

Post by Cas »

To connect from another machine you need to follow the thinclient guide.

You need to run deluge-console as the deluge user and point to config location:

Code: Select all

sudo -u deluge deluge-console -c /var/lib/deluge/.config/deluge
Also as I said before running deluged from command line and upstart script are using different configs so are not the same instances. This is quite important to understand.
Post Reply