Rpc or scgi? what am I using? :P

saroos1

Member
May 25, 2018
718
0
16
First of all, rutorrent works 100% adds/ deletes torrents and files, auto unpacks etc.

rtorrent/lib: 0.9.3/0.13.3
rutorrent/plugins: 0.3.5 svn $Rev: 2256

So my rtorrent.rc has:

Code:
encoding_list = UTF-8
scgi_port = 127.0.0.1:5000
#system.umask.set = 0002
log.execute = /home/nihim/rtorrent.log
config.php:

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";
and on lighttpd.conf:

Code:
server.modules += ( "mod_fastcgi" )
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/bin/php5-cgi"
)
)
)

server.modules += ( "mod_scgi" )
scgi.server = (
# "/RPC2" =>
# ( "127.0.0.1" =>
# (
# "socket" => "/tmp/rpc.socket",
# "check-local" => "disable",
# "disable-time" => 0
# )
# )
)
y I know it's commented out, with or without that part commented it makes no difference to rutorrent. I saw it been done on a guide so I tried it.

if i disable the rpc plugin from inside rutorrent (httprpc is already disabled) 1-2 sec later i get hit with errors and it doesn't work. So even though rtorrent and rutorrent communicate with scgi_port:5000, rutorrent seems to need rpc plugin.

So what am I using? rpc plugin or scgi? both? or I haven't understood how it works? cheesy.gif
 

simur612

Member
May 25, 2018
879
0
16
Quote :
I know it's commented out,​


If you use rpc or httprpc plugins then yes, it's must be commented. Otherwise 1) it must be uncommented 2) it must be configured properly.

Quote :
rpc plugin or scgi? both?​


Both. What do you want really?
 

peshua19

Member
May 25, 2018
897
0
16
Quote :
Both. What do you want really?​


Well make it run with (only >_> ) rpc, but this was the best i could do. Looked at a lot of guides but i never managed to make it work.
 

simur612

Member
May 25, 2018
879
0
16
Quote
Well make it run with (only >_> ) rpc​


This can't be done. ruTorrent can link with rtorrent via scgi gateway only.
 

saroos1

Member
May 25, 2018
718
0
16
Quote from:
This can't be done. ruTorrent can link with rtorrent via scgi gateway only.​


Ok so if i didn't want to use rpc plugin i would have to change on lighttp.conf and leave the rest as it is + disable the rpc plugin.
Code:
server.modules += ( "mod_scgi" )
scgi.server = (
"/RPC2" =>
( "127.0.0.1" =>
(
"host" => "127.0.0.1",
"port" => 5000,
"check-local" => "disable",
"disable-time" => 0, # don't disable if connection dies
)
)
)
right?
if i wanted to use the unix sockets to make it more secure: i would have to do these changes:
Code:
rtorrent.rc
scgi_local = /tmp/rpc.socket
schedule = chmod,0,0,"execute=chmod,777,/tmp/rpc.socket"

config.php
$scgi_port = 0;
$scgi_host = "unix:///tmp/rpc.socket";

lighttpd:

# i could remove this completely from the config right? no point of having just a part of it commented out

server.modules += ( "mod_scgi" )
scgi.server = (
"/RPC2" =>
( "127.0.0.1" =>
(
"socket" => "/tmp/rpc.socket",
"check-local" => "disable",
"disable-time" => 0
)
)
)Anything i am missing?
i think i tried to do it that way and i kept getting on rutorrent that it wouldn't connect to rtorrent (i checked /tmp/rpc.socket and it was 777). but i will try it once more on a vm.

Lastly at the moment i get on my lighttpd log:
Code:
2012-12-08 14:08:52: (mod_fastcgi.c.2701) FastCGI-stderr: PHP Warning: scandir(/var/www/rutorrent/share/users/): failed to open dir: No such file or directory in /var/www/rutorrent/plugins/logoff/init.php on line 7
PHP Warning: scandir(): (errno 2): No such file or directory in /var/www/rutorrent/plugins/logoff/init.php on line 7
I have moved share/* outside rutorrent and updated the path on $profilePath but logoff/init.php uses: $rootPath . "share/users/" as the path which ofc points to /var/www/rutorrent/share/users/ I modified the line to have the full path to where i got share/users/


Thx a lot for your patience with me!


EDIT:

so well i did it on a vm, and it worked... no idea what i did wrong before.
I read somewhere that it's good to have a line on rtorrent.rc before "scgi_local = /tmp/rpc.socket" that deletes the rpc.socket. is that true and if so what's that line?
 

simur612

Member
May 25, 2018
879
0
16
Quote
that deletes the rpc.socket. is that true and if so what's that line?​


Don't know. I doesn't use something like this in the my system. All works correctly without any additional commands.
 

saroos1

Member
May 25, 2018
718
0
16
well then i ll leave it as it is.

As for the logoff plugin i saw it's not developed by you should i post about it in it's thread even though last post was from december 2010 or leave it be?

Last thing so i don't make another thread: on options --> bitorrent: IP/Hostname to report to tracker: is 0.0.0.0 does that mean it's reporting that ip, or that it is reporting whatever the machines ip is the moment?

thx
 

simur612

Member
May 25, 2018
879
0
16
Quote :
As for the logoff plugin i saw it's not developed by you should i post about it in it's thread even though last post was from december 2010 or leave it be?​


On your wish.

Quote :
Last thing so i don't make another thread: on options --> bitorrent: IP/Hostname to report to tracker: is 0.0.0.0 does that mean it's reporting that ip, or that it is reporting whatever the machines ip is the moment?


Second case. If your system has 2 or more IP's you must specify one of it in the this variable.