deluge-daemon script not working in karmic

General support for problems installing or using Deluge
melat0nin
Member
Member
Posts: 16
Joined: Tue Apr 08, 2008 10:27 am

Re: deluge-daemon script not working in karmic

Post by melat0nin »

Cas wrote:You have to start deluged before running web, console or gtk, not seen that error though.

The faq can help you with settings locations:

http://dev.deluge-torrent.org/wiki/Faq# ... tssettings

fyi: For 1.2 you should be using deluge-web as deluge -u web is depreciated. This is more for reference as I doubt this is part of the actual problems you are having.
Thanks for this. I've managed to get 1.2.0 working, by deleting the config folder then starting again with a fresh installation. I can start deluge-web manually, as well as the daemon, or I can run the daemon from inside the web UI. However, the initscript doesn't work. When I try to run it, nothing appears to happen, and the processes aren't started (although they did start once, then they closed very quickly after that). Do I need to reboot before I can test an initscript?

Almost there...
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: deluge-daemon script not working in karmic

Post by Cas »

melat0nin wrote: However, the initscript doesn't work. When I try to run it, nothing appears to happen, and the processes aren't started (although they did start once, then they closed very quickly after that). Do I need to reboot before I can test an initscript?
There is no need to reboot, once the init files are in place you can start and stop through init.d. There is no feedback when you start it so you can check it using ps.

Code: Select all

/etc/init.d/deluge-daemon start
ps -aux | grep deluge
If it has failed to start check the logs: /var/log/deluged.log & /var/log/deluge-web.log
melat0nin
Member
Member
Posts: 16
Joined: Tue Apr 08, 2008 10:27 am

Re: deluge-daemon script not working in karmic

Post by melat0nin »

Cas wrote:
melat0nin wrote: However, the initscript doesn't work. When I try to run it, nothing appears to happen, and the processes aren't started (although they did start once, then they closed very quickly after that). Do I need to reboot before I can test an initscript?
There is no need to reboot, once the init files are in place you can start and stop through init.d. There is no feedback when you start it so you can check it using ps.

Code: Select all

/etc/init.d/deluge-daemon start
ps -aux | grep deluge
If it has failed to start check the logs: /var/log/deluged.log & /var/log/deluge-web.log
Thanks. The logs aren't being created. I noticed that if I execute /etc/init.d/deluge-daemon without sudo, I get this:

Code: Select all

media@media-server:/var/log$ /etc/init.d/deluge-daemon start
start-stop-daemon: Unable to open pidfile `/var/run/deluged.pid' for writing: Permission denied (Permission denied)
start-stop-daemon: Unable to open pidfile `/var/run/deluge-web.pid' for writing: Permission denied (Permission denied)
and with sudo, I get no feedback. Either way, neither the daemon nor the web ui seem to execute. I made sure the permissions were correct on /etc/init.d/deluge-daemon (sudo chmod 755 /etc/init.d/deluge-daemon) but that didn't help.

Any thoughts?
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: deluge-daemon script not working in karmic

Post by Cas »

you have to be root (or sudo) to be able to stop and start init scripts.

I am running out of ideas to help you but here are some pointers that could help.

Verify the location of deluged and deluge-web match those in the script

Code: Select all

DAEMON1=/usr/bin/deluged
DAEMON2=/usr/bin/deluge-web
Did you setup the deluge user and group for the script as per wiki

I noticed that the init script is set to warning level so maybe setting to debug may help:

Code: Select all

DAEMON1_ARGS="-d -c /var/lib/deluge -l /var/log/deluged.log -L warning"
DAEMON2_ARGS="-c /var/lib/deluge -l /var/log/deluge-web.log -L warning"

change to:

DAEMON1_ARGS="-d -c /var/lib/deluge -l /var/log/deluged.log -L debug"
DAEMON2_ARGS="-c /var/lib/deluge -l /var/log/deluge-web.log -L debug"
melat0nin
Member
Member
Posts: 16
Joined: Tue Apr 08, 2008 10:27 am

Re: deluge-daemon script not working in karmic

Post by melat0nin »

Cas wrote:you have to be root (or sudo) to be able to stop and start init scripts.

I am running out of ideas to help you but here are some pointers that could help.

Verify the location of deluged and deluge-web match those in the script

Code: Select all

DAEMON1=/usr/bin/deluged
DAEMON2=/usr/bin/deluge-web
Did you setup the deluge user and group for the script as per wiki

I noticed that the init script is set to warning level so maybe setting to debug may help:

Code: Select all

DAEMON1_ARGS="-d -c /var/lib/deluge -l /var/log/deluged.log -L warning"
DAEMON2_ARGS="-c /var/lib/deluge -l /var/log/deluge-web.log -L warning"

change to:

DAEMON1_ARGS="-d -c /var/lib/deluge -l /var/log/deluged.log -L debug"
DAEMON2_ARGS="-c /var/lib/deluge -l /var/log/deluge-web.log -L debug"

Thanks for your help! I think I have it working now. I followed the wiki to create the deluge user (I didn't want to do this initially, but in the end I just told deluge to download to my main account's Download folder, and chmodded it to 777, so the end-result is the same), then created the initscripts as detailed in the wiki, and it appears to run fine, including after reboot. Am very happy with the result, and the Ajax web UI in 1.2.0 looks amazing!
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: deluge-daemon script not working in karmic

Post by Cas »

melat0nin wrote:Thanks for your help! I think I have it working now. I followed the wiki to create the deluge user (I didn't want to do this initially, but in the end I just told deluge to download to my main account's Download folder, and chmodded it to 777, so the end-result is the same), then created the initscripts as detailed in the wiki, and it appears to run fine, including after reboot. Am very happy with the result, and the Ajax web UI in 1.2.0 looks amazing!
Glad you finally got it working :D

It is best practice, for security, to create a sandbox user for startup daemon processes. The drawback with deluge, as I found out too, is the resulting file permissions issue.
melat0nin
Member
Member
Posts: 16
Joined: Tue Apr 08, 2008 10:27 am

Re: deluge-daemon script not working in karmic

Post by melat0nin »

Cas wrote:
melat0nin wrote:Thanks for your help! I think I have it working now. I followed the wiki to create the deluge user (I didn't want to do this initially, but in the end I just told deluge to download to my main account's Download folder, and chmodded it to 777, so the end-result is the same), then created the initscripts as detailed in the wiki, and it appears to run fine, including after reboot. Am very happy with the result, and the Ajax web UI in 1.2.0 looks amazing!
Glad you finally got it working :D

It is best practice, for security, to create a sandbox user for startup daemon processes. The drawback with deluge, as I found out too, is the resulting file permissions issue.
I've just discovered that very problem (permissions). Is it solved by adding umask arguments to the DEAMON1_ARGS and DAEMON2_ARGS lines?
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: deluge-daemon script not working in karmic

Post by johnnyg »

The init script has been updated, just change the umask from 22 to 0.
Post Reply