[SOLVED] Thin client mode makes me manually connect WebUI to running daemon

General support for problems installing or using Deluge
Post Reply
rickmacd
New User
New User
Posts: 9
Joined: Mon Mar 30, 2020 9:55 pm

[SOLVED] Thin client mode makes me manually connect WebUI to running daemon

Post by rickmacd »

I've been running deluge successfully for years, but after upgrading Debian stretch to buster (which upgraded me from Deluge 1.3.13 to 1.3.15) I have one small problem. It seems like it used to work fine until after these upgrades.

I'm running the thin client mode, with the webui plugin enabled. When I start Deluge, it starts the daemon and downloading always works fine. However, I can't connect to the webui remotely until I first connect to it using the web interface at 192.168.1.2:8812. That seems to complete or somehow initialize the connection of the webui to the daemon, thus enabling remote connections. Shouldn't deluge make that final connection between webui and the running daemon at startup time?

Here are the details:

After freshly starting Deluge and seeing that downloads are continuing, if I try to connect with Transdrone from my Android phone, I get the message "Web interface not connected to a running daemon". Yet, when I look at the daemon DEBUG log, I see this:

Code: Select all

[INFO    ] 00:11:58 server:679 Serving on 192.168.1.2:8112 view at http://192.168.1.2:8112
...
[DEBUG   ] 00:26:15 json_api:270 json-request: {"method":"blocklist.get_status","params":[],"id":819}
[DEBUG   ] 00:26:17 json_api:270 json-request: {"method":"auth.login","params":["XxXxXxXxX"],"id":1}
[DEBUG   ] 00:26:17 auth:199 Received a password via the 1.2 auth method
[INFO    ] 00:26:17 auth:327 Login success (ClientIP 192.168.1.1)
[DEBUG   ] 00:26:17 auth:146 Creating session for admin
It seems like Transdone does login successfully. The IP of 192.168.1.1 is the wireless router that the phone is connected to, which makes sense.

Using the browser on my server running Deluge, I go to 192.168.1.2:8812 and login with my webui password. These messages appear in the daemon log (same as the Transdone attempt caused):

Code: Select all

[DEBUG   ] 00:29:30 json_api:270 json-request: {"method":"blocklist.get_status","params":[],"id":916}
[DEBUG   ] 00:29:31 json_api:270 json-request: {"method":"auth.login","params":["XxXxXxXxX"],"id":1}
[DEBUG   ] 00:29:31 auth:199 Received a password via the 1.2 auth method
[INFO    ] 00:29:31 auth:327 Login success (ClientIP 192.168.1.2)
[DEBUG   ] 00:29:31 auth:146 Creating session for admin
It gives me the Connection Manager dialog which indicates the webui truly is not connected to the daemon, just as Transdone reports. Before I tell the Connection Manager to connect, these messages appear in the daemon log:

Code: Select all

[DEBUG   ] 00:32:25 json_api:270 json-request: {"method":"web.get_host_status","params":["abcdef0123456789abcdef0123456789"],"id":40}
[INFO    ] 00:32:25 client:217 Connecting to daemon at localhost:58846..
[INFO    ] 00:32:25 rpcserver:206 Deluge Client connection made from: 127.0.0.1:53070
[INFO    ] 00:32:25 client:121 Connected to daemon at 127.0.0.1:58846..
[INFO    ] 00:32:25 client:224 Connection lost to daemon at localhost:58846 reason: Connection was closed cleanly.
[INFO    ] 00:32:25 rpcserver:226 Deluge client disconnected: Connection to the other side was lost in a non-clean fashion: Connection lost.
The above messages repeat every 2 seconds while the Connection Manager dialog is open, waiting for me to connect to the host. The dialog shows: "Status: Online, Host: localhost:58846, Version 1.3.15".

When I connect to the host, I get these messages in the daemon log:

Code: Select all

[DEBUG   ] 00:39:10 json_api:270 json-request: {"method":"web.connect","params":["abcdef0123456789abcdef0123456789"],"id":319}
[INFO    ] 00:39:10 client:217 Connecting to daemon at localhost:58846..
[INFO    ] 00:39:10 rpcserver:206 Deluge Client connection made from: 127.0.0.1:54306
[INFO    ] 00:39:10 client:121 Connected to daemon at 127.0.0.1:58846..
[DEBUG   ] 00:39:10 pluginbase:77 WebPlugin initialized..
[DEBUG   ] 00:39:10 pluginmanagerbase:156 Adding AutoAdd to enabled_plugins list in config
[INFO    ] 00:39:10 pluginmanagerbase:158 Plugin AutoAdd enabled..
[DEBUG   ] 00:39:10 pluginmanager:115 adding script AutoAdd for autoadd.js
[DEBUG   ] 00:39:10 pluginmanager:119 adding debug script AutoAdd for autoadd.js
...and other plugin messages...
Now when I fire up Transdone from the phone it works, and these messages are in the daemon log:

Code: Select all

[DEBUG   ] 00:43:33 json_api:270 json-request: {"method":"blocklist.get_status","params":[],"id":606}
[DEBUG   ] 00:43:33 json_api:270 json-request: {"method":"auth.login","params":["XxXxXxXxX"],"id":1}
[DEBUG   ] 00:43:33 auth:199 Received a password via the 1.2 auth method
[INFO    ] 00:43:33 auth:327 Login success (ClientIP 192.168.1.1)
[DEBUG   ] 00:43:33 auth:146 Creating session for admin
Note that these messages are identical for the original Transdone connection attempt that failed, the browser interface connection that works, and finally the Transdone connection that now works.

So, it seems like Deluge isn't completing some part of the webui startup. The browser interface on the server (192.168.1.2:8812) has the Connection Manager that causes the webui to connect to the host. Transdone doesn't offer to do that magic bit.

Shouldn't deluge make that final connection between webui and the running daemon at startup time?
Last edited by rickmacd on Thu Apr 23, 2020 8:59 pm, edited 1 time in total.
rickmacd
New User
New User
Posts: 9
Joined: Mon Mar 30, 2020 9:55 pm

Re: [SOLVED] Thin client mode makes me manually connect WebUI to running daemon

Post by rickmacd »

OK, I found the answer in the FAQ. Somehow the setting got changed during the upgrade from 3.1.13 to 3.1.15, likely my fault when I was fiddling other settings (salt values) to get it to download.

Code: Select all

How do I auto-connect to a specific daemon?

    Stop the Web UI before modifying the web.conf file.
    Edit web.conf in config, find "default_daemon" and set its value to the daemon id in hostlist.conf
    e.g. To connect to localhost you would open hostlist.conf as see a snippet such as:

    ...
          "123459d5a5b414159caa1323f6e0c9b240c7abcd",
          "localhost",
          58846,
    ...

    Use the first entry from hostlist, which is the id and add it to web.conf:

    "default_daemon": "123459d5a5b414159caa1323f6e0c9b240c7abcd",

    Restart the Web UI. 
Post Reply