Page 1 of 1

[Solved] ruTorrent not finding rTorrent

PostPosted: Dec 5th, '15, 06:22
by mark9117
Hey there all,

I'm taking a look at rTorrent. I may be interested in moving from Deluge to rTorrent, assuming among other things, I can get ruTorrent (the rTorrent web interface) working. At his point, I'm at an impasse. I can get rTorrent to start okay, adn I can get ruTorrent to open in my browser. The trouble is that ruTorrent reports that it can't find rTorrent:

Code: Select all
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.


I've scoured the web for a solution, but I'm not finding much. I have edited the rTorrent config file and I have this:

Code: Select all
//      $scgi_port = 5000;
        $scgi_port = 34160;
        $scgi_host = "127.0.0.1";


I changed the port from 5000 to 34160 which is the port I want my bittorrent protocol to listen on. It is listening on that port
Code: Select all
tcp        0      0 localhost:34160         0.0.0.0:*               LISTEN


Now, I'm not terribly knowledgeable or sophisticated in these matters, and the web interface is likely looking at a different port for rTorrent, but the instructions that I have seen do not specify such information. Anybody have a clue?

Also, I am seeing references to an SCGI module in Apache. I show no such module loading and can find no such module in the repositories. If this is an issue for ruTorrent, any idea how I can resolve it?

Thanks.

Mark

Edit: I meant to mention that I have installed both rTorrent and ruTorrent from the repositories.

Edit Edit: Here are links to the config files:
rutorrent/config.php

rtorrent.rc

Re: ruTorrent not finding rTorrent

PostPosted: Dec 5th, '15, 14:59
by doktor5000
This may be a dumb question, but did you read the documentation that is shown during installation of rutorrent?
FWIW, you can show the documentation via
Code: Select all
rpm -qd rutorrent


/usr/share/doc/rutorrent/README.install.urpmi wrote:Note that you will need to either configure an SCGI module for your web server
or install rutorrent-plugins and enable rpc or httprpc in /etc/rutorrent/plugins.ini
for rutorrent to work. See the online documentation for more details:
http://code.google.com/p/rutorrent/wiki/WebSERVER

The official plugins are contained in the rutorrent-plugins subpackage.

On this Mageia packaging of rutorrent and its plugins, all configuration
files are in /etc/rutorrent.
The access configuration is in /etc/httpd/conf/sites.d/rutorrent.conf. By default only
localhost is allowed to use rutorrent.

As you don't seem to have a running webserver with an scgi module, can you try the other approach via the rutorrent plugins?
For scgi, I believe that is contained in package apache-mod_proxy as module mod_proxy_scgi - And it seems like nginx and lighttpd provide this already via the base packages.
Disclaimer: I have nearly no clue about webserver configuration at all.

Also see the hint that by default only localhost is permitted access, if you try to access the web frontend from another box ...

Re: ruTorrent not finding rTorrent

PostPosted: Dec 6th, '15, 07:43
by mark9117
Yep, that block quote is the reference I saw. I dug into the matter a little and determined the the plugin route was not the way to go. I am attempting to access ruTorrent from the localhost.

Since I need a working web server for other things, I kept banging my head against this and finally got Apache to work - ruTorrent opens, but it isn't reading the directory where either the download or the session are taking place. On a more positive note, your tip about apache-mod_proxy was spot on. That module is loading as is apache.

Unfortunately, it is producing another error. It's spits out in a rather messy html block, but the upshot is:

"The requested URL was not found on this server. The link on the href="https://localhost/rutorrent/" referring page seems to be wrong or outdated."

RuTorrent loads up in the browser. The toolbar is there with buttons, but the main window where one would expect the torrents to appear is blank. Then there's the matter of me not finding any way to configure the email address for these errors (href="mailto:root@localhost" ...) And finally, I wouldn't expect you to know anything about how to configure those things. I think everything is working as it should be except httpd, cgi, and possibly something else.

I suspect I have done what needs to be done as far as basic setup goes. I'm going to have to either get support on ruTorrent, find another frontend for rTorrent, or give up the frontend all together and just work with the CLI for rtorrent.

At any rate, thanks for the attention. The info about scgi was helpful. As always, if you or anybody else thinks of anything else, please do let me know.

Mark

Re: ruTorrent not finding rTorrent

PostPosted: Dec 6th, '15, 11:23
by doktor5000
Only (loosely) related bug report that I found: https://bugs.mageia.org/show_bug.cgi?id=5143
You could check if apache is configured to have a PrivateTmp in the systemd httpd.service unit file - that would at least explain why rutorrent cannot "see" the rtorrent session content.

Also for SCGI it seems to need some more configuration, see https://github.com/Novik/ruTorrent/wiki ... proxy-scgi
And you should also briefly check the main config.php as shown in https://github.com/Novik/ruTorrent/wiki ... #configphp

Also check your logs e.g. via
Code: Select all
journalctl -ab | grep -iE "rtorrent|rutorrent"

and
Code: Select all
journalctl -ab -u httpd

Re: ruTorrent not finding rTorrent

PostPosted: Dec 6th, '15, 18:25
by mark9117
Victory!

Adding the line:

Code: Select all
ProxyPass /RPC2 scgi://localhost:5000/


to the end of my /etc/httpd/conf/httpd.conf resolved the issue.

Whew, that was a long chase. I think the documentation on this could be better. It seems most of the references I looked at failed to tell you where to put that line.

At any rate, the good news is it's basically resolved for the moment. The downside is that I may wind up sticking with Deluge anyway. I need to do some extensive testing now that I've got ruTorrent up and running.

Much thanks Doc!

Mark