Original message follows:Solution wrote: Click to show solution
Hello,
I know this issue was discussed over and over again (and to the death afterwards), as it has popped up all over my searches, yet nothing I have tried has worked so far, so I have decided to spam this forum once again with the same issue, hoping that someone can point me in the right direction.
A little bit of background:
I have a Raspberry Pi 2 with the default Raspbian distro installed. I have installed Deluge on it following closely the Thin Client guide (Raspbian uses System V, so I have followed the init.d Ubuntu Init Script Service guide) and everything worked almost "out of the box" with no issues: the daemon, the console, the web UI, and even the SSH tunnelling.
Two weeks ago the Raspbian started to randomly crash, so I have decided to reinstall it. I believe that one of the updates might have messed it up... I don't really know what was the root cause, but seems to run just fine now. Among other things I have reinstalled Deluge following the same guides/steps as before, while reusing the configuration files kept from the previous installation.
The situation:
The daemon runs fine, but I cannot connect to it using the console or the web UI. SSH tunnelling also does not work. But I can connect to it using the GTK client installed on my Windows machine that is in the same local network.
What I have checked/tried:
- The firewall rules
No rule seems to be in place.
Code: Select all
kkmic@raspberrypi ~ $ sudo iptables -L -n Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
- The port used by the daemon
AFAIK, 0.0.0.0 means "every IP address" so this should be fine.
Code: Select all
kkmic@raspberrypi ~ $ sudo netstat -tuplne Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name ... tcp 0 0 0.0.0.0:58846 0.0.0.0:* LISTEN 1001 1883110 21923/python ...
- The daemon logs:
Empty. The logfile gets created though. - The username deluged runs as:
The daemon is configured to run as my user:It runs as my user. In the netstat output above, the daemon is shown running and belonging to the user with the ID 1001. That is my ID.Code: Select all
kkmic@raspberrypi ~ $ cat /etc/default/deluge-daemon # Configuration for /etc/init.d/deluge-daemon # The init.d script will only run if this variable non-empty. DELUGED_USER="kkmic" # Should we run at startup? RUN_AT_STARTUP="YES"
The console runs as my user, obviously. I have even tried to specifically run it as my user and specify the config file:Code: Select all
kkmic@raspberrypi ~ $ id kkmic uid=1001(kkmic) gid=1004(kkmic) groups=1004(kkmic)
Still failed to connect.Code: Select all
sudo -u kkmic deluge-console -c ~/.config/deluge
- The deluge console log:
Weird part is that the console does not give a specific reason why the connection failed. It literally displays this after about 30 seconds:If does not specify a failure reason.Code: Select all
Failed to connect to 127.0.0.1:58846 with reason:
I have used the -L debug and -l /home/kkmic/deluge.log options to generate a log file for the console.
The log contained this:I have searched for more info about the errors, but I was not able to find any meaningful answers.Code: Select all
[INFO ] 15:32:47 ui:121 Deluge ui 1.3.12 [DEBUG ] 15:32:47 ui:122 options: {'loglevel': 'debug', 'logfile': '/home/kkmic/deluge.log', 'config': None, 'quiet': False} [DEBUG ] 15:32:47 ui:123 args: [] [INFO ] 15:32:47 ui:124 Starting console ui.. [DEBUG ] 15:32:47 main:155 Using encoding: UTF-8 [INFO ] 15:32:47 client:217 Connecting to daemon at 127.0.0.1:58846.. [DEBUG ] 15:32:47 coreconfig:43 CoreConfig init.. [DEBUG ] 15:32:47 screen:82 Screen init! [WARNING ] 15:33:17 client:220 Connection to daemon at 127.0.0.1:58846 failed: User timeout caused connection failure. [DEBUG ] 15:33:17 client:400 connect_fail: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.TimeoutError'>: User timeout caused connection failure. ] [DEBUG ] 15:33:17 client:541 on_connect_fail: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.TimeoutError'>: User timeout caused connection failure. ]
- The configuration files:
I have moved the ~/.config/deluge folder and restarted the deluged. This recreated the configuration folder, so the daemon is reading the correct configuration files.
I have searched in /usr/lib/deluge/ for configuration files but the folder does not exist. - Mismatched component versions:
Everything seems fine.
Code: Select all
kkmic@raspberrypi ~ $ deluged -v deluged: 1.3.12 libtorrent: 0.15.10.0 kkmic@raspberrypi ~ $ deluge-console -v deluge-console: 1.3.12 libtorrent: 0.15.10.0
Again, remote connections work, local connections do not.
Help