RPC10 shows RPC1 torrents.

jith45

Member
May 25, 2018
960
0
16
I've set up 10 users on rpc1 to rpc10

Users 1 -9 work fine.

When user 10 logs into rutorrent they see torrents for user 1.

But all the settings are correct, (.rtorrent.rc, config.php) so if user 10 add's torrent it loads in user 10 folder (get_dir see's it as user10) and the torrent will run ok and will save to user 10 folder but the user cannot see it's succesfully loaded via rutorrent as user 10 see user 1 torrents??

The setting for ruT showing the torrents is in config.php
Here is the user10 config.php.

Code: [Select]
<?php
// configuration parameters

// for snoopy client
@define(&#39;HTTP_USER_AGENT&#39;, &#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0&#39;, true);
@define(&#39;HTTP_TIME_OUT&#39;, 30, true); // in seconds
@define(&#39;HTTP_USE_GZIP&#39;, true, true);

@define(&#39;RPC_TIME_OUT&#39;, 5, true); // in seconds

@define(&#39;LOG_RPC_CALLS&#39;, false, true);
@define(&#39;LOG_RPC_FAULTS&#39;, true, true);

// for php
@define(&#39;PHP_USE_GZIP&#39;, false, true);
@define(&#39;PHP_GZIP_LEVEL&#39;, 2, true);

$do_diagnostic = true;
$log_file = &#39;/tmp/error10.log&#39;; // path to log file (comment or make empty to disable logging)
$saveUploadedTorrents = false;

$topDirectory = &#39;/home/user10/&#39;; // Upper available directory. Absolute path with trail slash.
$forbidUserSettings = false;

$scgi_port = 5010;
$scgi_host = "127.0.0.1";

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

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

// 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";

?>

Now if I change the line

$XMLRPCMountPoint = "/RPC10"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
to
$XMLRPCMountPoint = "/RPC9"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!

user 10 can now see user 9 torrents instead.

So same as above, everything else still work OK, so if user 10 loads a torrent it does load to user 10 folder but because they see user 9 torrents they dont see it added to the list in rutorrent.

When I change it back to RPC10 they see RPC1 again.

Is there a problem wih rutorrent thinking RPC10 is RPC1 or is there some other explanation?
 

dsouvik215

Member
May 25, 2018
896
0
16
Quote
Is there a problem wih rutorrent thinking RPC10 is RPC1 or is there some other explanation?​

I think, this is a problem with your web-server's mod_scgi module. Check it configuration or use plugin rpc.
 

jith45

Member
May 25, 2018
960
0
16
Yeah, thought about RPC 0 but that would still limit me to 10.

Ok, some more testing reveals the following:

Change $XMLRPCMountPoint = "/RPC10"; to $XMLRPCMountPoint = "/RPC16";
and you see user 1 torrents.

Change $XMLRPCMountPoint = "/RPC10"; to $XMLRPCMountPoint = "/RPC22";
and you see user 2 torrents.

Change $XMLRPCMountPoint = "/RPC10"; to $XMLRPCMountPoint = "/RPC500";
and you see user 5 torrents.

You can see the pattern!

So yeah, only 10 slots max (0-9) with my default lighttpd setup.
All I did was add the folloing to lighttpd.conf to get scgi module working:

Code:
server.modules += ( "mod_scgi" )
scgi.server = (
"/RPC1"=>
( "127.0.0.1" =>
(
"host" => "127.0.0.1",
"port" => 5001,
"check-local" => "disable"
)
),
"/RPC2"=>
( "127.0.0.1" =>
(
"host" => "127.0.0.1",
"port" => 5002,
"check-local" => "disable"
)
), ETC
but not sure what else I need to do to get it to work above rpc10.

Will have a dig around today and if I can find a solution will post back here otherwise I might have to consider the rpc plugin.
 

dsouvik215

Member
May 25, 2018
896
0
16
there is something wrong on your system. I've set up plenty with RPC1 RPC10 RPC11 RPC12 and so on.


It SOUNDS like you are using a regex based matching system (cherokee can use this if it's set up wrong)


anyways, you are free to make mutliple names

/RPC is just a convention, you could, for instance do

/Stupid0
/Rastmonsta0-9

/Jesus0-9
/HulkHogan0-9

whatever

it isn't a REAL solution to your issue but it IS a solution that wouldn't require you to figure out where things went wrong
 

jith45

Member
May 25, 2018
960
0
16
Thanks for that wonslung. Not been near cherokee, just lenny 64 with libtorrent, xmlrpc-c and rtorrent configure --with-xmlrpc-c. compiled from source then ruTorrent from svn and the various settings as shown in the main install guide.
http://code.google.com/p/rutorrent/wiki/MainInstall

Not getting very far finding out why it's behaving like this so I'll do as you suggest and rename the mountpoints.

Will report back.
 

jith45

Member
May 25, 2018
960
0
16
Yup, works great.

So I went into lighttpd.conf and changed /RPC10 to /RPCA.
Then changed config.php for user 10 to /RPCA and voila, user now has correct access to his torrent list. smiley.gif

Thanks a bunch for that suggestion, that well deserves another donation for the time it's saved me.
 

dsouvik215

Member
May 25, 2018
896
0
16
Glad i could help...i'm still currious to know why ti's behaving like this in lighttpd....i'm going to set up a test server and try to use some settings from you rpost to see if i can reproduce it...if so this is a bug in lighttpd and not in rutorrent (infact if you had just used the rpc or httpdrpc plugin i'd bet it wouldhave worked fine, though scgi in the webserver is generally more performant)

If i CAN reproduce this, i WILL be filing a bug with lighttpd's people.
 

somus1735

Member
May 25, 2018
833
0
16
I know this is an old thread.

The reason it's not working is because the path (in his case /RPC2) is only compared against the first part of the URL path. So if the URL path is /RPC23 then of course /RPC2 will match since it only checks the first part. A solution could be to rearrange the scgi.server table so /RPC10 is before /RPC1.

Example:

Code:
scgi.server = (
"/RPC100" => (
(
"host" => "127.0.0.1",
"port" => 23891,
"check-local" => "disable",
"disable-time" => 0,
),
),
"/RPC10" => (
(
"host" => "127.0.0.1",
"port" => 23888,
"check-local" => "disable",
"disable-time" => 0,
),
),
"/RPC1" => (
(
"host" => "127.0.0.1",
"port" => 23885,
"check-local" => "disable",
"disable-time" => 0,
),
),
)