Page 1 of 1

systemd Scripts

Posted: Sat Oct 15, 2016 5:55 pm
by VirtuaWin
Hi,

I've just installed deluged and deluge-web on Ubuntu 16.04.1 LTS and everything was working fine.
After that, I followed the tutorial about the systemd Scripts (http://dev.deluge-torrent.org/wiki/User ... ce/systemd) to run the Deluge Daemon and the WebUI as a service. Everything went fine and when I check the status of the services it says it is active:

Code: Select all

systemctl status deluged
● deluged.service - Deluge Bittorrent Client Daemon
   Loaded: loaded (/etc/systemd/system/deluged.service; enabled; vendor preset: enabled)
   Active: active (running) since Sáb 2016-10-15 18:18:49 WEST; 30min ago
 Main PID: 4589 (deluged)
   CGroup: /system.slice/deluged.service
           └─4589 /usr/bin/python /usr/bin/deluged -d

Out 15 18:18:49 flyingtaco-Satellite-A300 systemd[1]: Started Deluge Bittorrent Client Daemon.

Code: Select all

systemctl status deluge-web.service    
● deluge-web.service - Deluge Bittorrent Client Web Interface
   Loaded: loaded (/etc/systemd/system/deluge-web.service; enabled; vendor preset: enabled)
   Active: active (running) since Sáb 2016-10-15 18:49:59 WEST; 6s ago
 Main PID: 4958 (deluge-web)
   CGroup: /system.slice/deluge-web.service
           └─4958 deluge-web                         

Out 15 18:49:59 flyingtaco-Satellite-A300 systemd[1]: Started Deluge Bittorrent Client Web Interface.
But, despite everything showing OK the daemon and the WebUI aren't working. By that mean I can't connect to the daemon through the client on my PC, neither connect to the WebUI with my browser. (The error with the WebUI is connection refused, not a timeout)
The strangest thing is, if I stop the services and just run the commands "deluged" and "deluge-web" directly on the terminal everything works fine!

So, my question is: What the hell?? What am I missing?? :-/

Re: systemd Scripts

Posted: Tue Oct 18, 2016 10:27 am
by shamael
Hi VirtuaWin

I cannot pinpoint your exact problem with the information you gave but I've followed the same procedure and maybe the workaround I found may help:

1/ Deluge-console
Are you able to connect on the deluge-console directly from the server (SSH connection) to confirm the service Deluged is accessible? I wasn't and it's normal if you have followed the mentioned procedure, only the user deluge can. To proceed just type:

Code: Select all

 sudo -u deluge deluge-console 
Check also with netstat and "ps aux|grep delug" that both deluged and deluge-web are well running under the deluge user

2/ Webui
Due to the same tutorial you need to change a file to be able to connect through the web ui.

a) first grab your local client key from the auth file

Code: Select all

 sudo cat /var/lib/deluge/.config/deluge/auth 

(copy the localservice key on first line)

b) edit hostlist

Code: Select all

sudo nano /var/lib/deluge/.config/deluge/hostlist.conf.1.2
it should contain the following, replace "$PUT_THE_KEY_FROM_AUTH" with the value found in a)

Code: Select all

{
  "file": 1,
  "format": 1
}{
  "hosts": [
    [
      "$PUT_THE_KEY_FROM_AUTH",
      "127.0.0.1",
      58846,
      "",
      ""
    ]
  ]
}

Re: systemd Scripts

Posted: Tue Oct 18, 2016 8:46 pm
by Cas
Have the old init service files been removed?

Re: systemd Scripts

Posted: Wed Oct 19, 2016 10:45 am
by shamael
I guess it should still work, it was part of my first install (debian repo). The procedure we have both followed removes it and add systemd script following so the move of almost all distributions.

BTW I suppose initd/systemd has nothing to do with http://forum.deluge-torrent.org/viewtop ... =7&t=48629 ?
Silly question maybe but...