rutorrent can't connect to rtorrent (scgi is the prime suspect)

somus1735

Member
May 25, 2018
833
0
16
Hi, I've installed rutorrent+rtorrent on my ubuntu virtual machine 4-5 months ago and everything was working perfectly until today.
I had to shutdown my virtual machine a week ago, as I was moving to a new apartment, and today when I booted my machine and tried to login to rutorrent, the famous:
No connection to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.
Normally it goes away with a browser refresh or sometimes with a reboot. But today is different matter. I tried to check all my configuration and everything seemed fine noting that I did not change anything on the system aside from adding some torrent download.
I killed the rtorrent proccess and run directly to see the output and everything seemed fine. I also have transdroid on my tablet and it is not working either.
I tried to run "xmlrpc localhost download_list" cmd which I found on the rtorrent website but it returned "Failed. Call failed. HTTP response code is 504, not 200. (XML-RPC fault code -504)"

So I suspect that the SCGI is causing the problem but I can't figure out what went wrong.

I'm using Ubuntu 12.04 Server x86_64
I didn't install anything fancy on it except webmin and openssh

So if anyone can help me solve this problem and I would appreciate if it was in a step by step way.
Thanks
 

jith45

Member
May 25, 2018
960
0
16
did you check to make sure rtorrent itself is running?

if so then you need to check that rutorrent and rtorrent have the same settings
 

somus1735

Member
May 25, 2018
833
0
16
rtorrent is running and I check by kill the process and running it manually without Screen it ran fine without any warning except the one for "scgi_local". As for the configuration I tried to check all the possible location and they were all fine and set correctly (at least that what I think from what I've got searching the web).
Any more ideas?
 

das329717

Member
May 25, 2018
928
0
16
I kind of have the same problem sad.gif , I suspect the rpc.socket3 isn't created or someting

I have a dedicated server from seedroot, it comes with rtorrent+rutorrent+lighttpd+vsftp already configured for one user, so I'm trying to add another user to share my server with my brother, so I did this:

Code:
useradd -m user
passwd user

cd /home/old-user
cp .rtorrent.rc /home/user
cd /home/user && chown user:user .rtorrent.rc

cd /home/user
mkdir rtorrent && cd rtorrent
mkdir .session downloads torrents
cd .. && chown user:user rtorrent -R && chmod 755 rtorrent -R

cd /home/user
nano .rtorrent.rc

I just change from rpc.socket2 to rpc.socket3 and the directory and session path

Quote from: .rtorrent.rc
Code:
scgi_local = /tmp/rpc.socket3
directory = /home/user/rtorrent/downloads/
session = /home/user/rtorrent/downloads/
schedule = watch_directory_1,10,10,"load_start=~/autoload/*.torrent,d.set_custom1=Autoload_Directory"
dht = off
port_range = 51040-51050
min_peers = 20
max_peers = 40
min_peers_seed = 20
max_peers_seed = 30
max_uploads = 30
max_uploads_global = 70
max_downloads_global = 50
max_downloads_div = 0
download_rate = 13000
upload_rate = 13000
check_hash=no
# hash_read_ahead = 8
# hash_interval = 10
# hash_max_tries = 5
peer_exchange = no
encoding_list = UTF-8
schedule = chmod,0,0,"execute=chmod,777,/tmp/rpc.socket3"
# network.max_open_files.set = 256​


then login as "user" and start rtorrent in screen

Code:
screen -S rtorrent -d -m rtorrent
then configuring the new RPC mount point but lighttpd config file already have it

Code:
nano /etc/lighttpd/lighttpd.conf
Quote from: lighttpd.conf


so I didn't touch that file, then:

Code:
cd /var/www/rutorrent/conf/users
mkdir user
cd ..
cp config.php plugins.ini access.ini users/user
cd users/user
nano config.php

I just change this lines from rpc.socket2 to rpc.socket3 and /RPC2 to /RPC3

Code:
$scgi_host = "unix:///tmp/rpc.socket3";
$XMLRPCMountPoint = "/RPC3";

scgi_port is 0 on both files, if I set a port number the front end of rutorrent doesn't load

then

Code:
htdigest /etc/lighttpd/.passwd 'RuToRReNT uSeRS' user
cd /var/www
chown www-data:www-data rutorrent -R
/etc/init.d/lighttpd restart

wit the old-user I can access perfectly, but with the user "user" I get

Code:
No connection to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.
what I should do? pleas any help would be appreciated :)thanks!
 

dsouvik215

Member
May 25, 2018
896
0
16
This is pretty old but just in case you didn't find a solution and did something else, maybe this will save you next time. I had that same problem.

Go and delete the "rtorrent.lock" file in /home/yourusername/rtorrent/session/ and then restart rtorrent. It should work if it was the same issue that I had.
 

shwetha17

Member
May 24, 2018
785
0
16
I rent a dediseedbox and use irssi. Some how the .session folder was filled with files, i deleted all of them and restarted the server. Now i get this in rutorrent "No connection to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file." and "Connection to rtorrent not established"
rtorrent is running. I'm not so good at linux but i tried. Sudo service rtorrent restart/start, but get same error.
Dunno what to do :/
 

das329717

Member
May 25, 2018
928
0
16
You of course realise that the session folder holds all the currently loaded torrents and metadata and without them your client will be empty after restart.
Try running rtorrent directly from the console, reload ruTorrent and check for connection. If it's there QQ rTorrent and:
screen -S RUT-d -t rtorrent -m rtorrent
screen -d -r RUT-X screen -t irssi irssi

which will start rtorrent and irssi in a screen session named RUT
 

shwetha17

Member
May 24, 2018
785
0
16
Yes i know that the loaded torrents are lost :/
n00b as i am at linux stuff, but finally came to a soluton after talking to a friend. "sudo killall -9 rtorrent" then start it rolleyes.gif