moved rtorrent folders to another disk. rutorrent connection failed.

jith45

Member
May 25, 2018
960
0
16
hello,

i moved my whole rtorrent directory (containing session, data, watch) to another disk. now rutorrent's logger shows me this error message:
"Bad link 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"

so something with the connection is failing.

i'm using rutorrent 3.2 and rtorrent 0.8.9 with lighthttpd webserver.

the relevant section in the rutorrent config looks like this:
Code:
$scgi_port = 5000;
$scgi_host = "127.0.0.1";

// For web->rtorrent link through unix domain socket
// (scgi_local in rtorrent conf file), change variables
// above to something like this:
//
// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";

$XMLRPCMountPoint = "/RPC2"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!

$pathToExternals = array(
"php" => '', // Something like /usr/bin/php. If empty, will be found in PATH.
"curl" => '', // Something like /usr/bin/curl. If empty, will be found in PATH.
"gzip" => '', // Something like /usr/bin/gzip. If empty, will be found in PATH.
"id" => '', // Something like /usr/bin/id. If empty, will be found in PATH.
"stat" => '', // Something like /usr/bin/stat. If empty, will be found in PATH.
);

$localhosts = array( // list of local interfaces
"127.0.0.1",
"localhost",
);

snipped from my rtorrent.rc:
Code:
execute = {sh,-c,rm -f /mnt/disks/1/rtorrent/session/rpc.socket}
scgi_local = /mnt/disks/1/rtorrent/session/rpc.socket
execute = {sh,-c,chmod 0666 /mnt/disks/1/rtorrent/session/rpc.socket}
encoding_list = UTF-8
system.umask.set = 022
port_range = 23877-23877
port_random = no
check_hash = no
directory = /mnt/disks/1/rtorrent/data/
session = /mnt/disks/1/rtorrent/session

and i added this section to my lighthttpd config:
Code: [Select]
scgi.server = (
"/RPC2" =>
( "127.0.0.1" =>
(
"host" => "127.0.0.1",
"port" => 5000,
"check-local" => "disable"
)
)
)


before i moved the files everything was working perfectly (the section in the lighthttpd config was added after the move).

thanks in advance!
 

dsouvik215

Member
May 25, 2018
896
0
16
From one side
Code

$scgi_port = 5000;
$scgi_host = "127.0.0.1";


From another

Code
scgi_local = /mnt/disks/1/rtorrent/session/rpc.socket

And? What do you want?
 

jith45

Member
May 25, 2018
960
0
16
oh, yeah that's looking wrong.

i changed the rutorrent "side" to:

Code:
//$scgi_port = 5000;
//$scgi_host = "127.0.0.1";

// For web->rtorrent link through unix domain socket
// (scgi_local in rtorrent conf file), change variables
// above to something like this:
//
$scgi_port = 0;
$scgi_host = "unix:///mnt/disks/1/rtorrent/session/rpc.socket";

so it should use the socket now if i'm correct.

i also told lighthttpd to use the socket:

Quote
server.modules += ( "mod_scgi" )
scgi.server = (
"/RPC2" =>
( "127.0.0.1" =>
(
"socket" => "/mnt/disks/1/rtorrent/session/rpc.socket",
"disable-time" => "0",
"check-local" => "disable"
)
)
)


Quote
And? What do you want?​

i just want to connect rtorrent + rutorrent via the socket. or is the scgi_host + port combo way better?

i never used sockets before and always used the scgi host thingy but this time i used this setup script which was working perfectly. until i decided to move the session (within the rtorrent folder) directory to another disk.
 

dsouvik215

Member
May 25, 2018
896
0
16
Quote
i just want to connect rtorrent + rutorrent via the socket. or is the scgi_host + port combo way better?​


If you close access to scgi port from WAN - then no difference.

Quote
i also told lighthttpd to use the socket:​


And? This is doesn't working, or what? Are you restart all soft after conf changes?
 

dsouvik215

Member
May 25, 2018
896
0
16
Haven't any idea. I have some configuration, exclude one line -
Code:
execute = {sh,-c,rm -f /mnt/disks/1/rtorrent/session/rpc.socket}
All works fine.