The ever-so-common problem: Bad link to rtorrent

shwetha17

Member
May 24, 2018
785
0
16
I've seen a lot of people with this problem, but I have yet to find a solution to my problem searching this forum.

The error message:
Quote
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.​

screenshot

Specifics of my situation:
  • I'm running Ubuntu Server 11.04 64-bit
  • rtorrent was installed using apt-get
  • rutorrent is running from an svn checkout
  • Web server is apache2. ruTorrent is accessible only to a user called torrent (AuthType basic)
rtorrent is definitely running and my ports match up. Here's some terminal output to show that:
Code:
glen@Apollo-server:~$ grep scgi /var/www/rutorrent/conf/config.php
$scgi_port = 5000;
$scgi_host = "127.0.0.1";
// (scgi_local in rtorrent conf file), change variables
// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";
glen@Apollo-server:~$ pgrep torr -l
795 rtorrent
glen@Apollo-server:~$ cat .rtorrent.rc
scgi_port = 127.0.0.1:5000

and the relevant chunk of my sites-enabled file for apache:
Code:
# ruTorrent settings
<Directory /var/www/rutorrent/>
AuthType Basic
AuthName "ruTorrent access"
AuthUserFile /etc/apache2/rutorrent_passwd
Require user torrent
Options FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>

Something in my gut tells me that I'm missing a package or plugin for either rutorrent or apache, but I'm not sure how I could find that out.

My sincere apologies if it turns out I'm merely inept at forum-searching
 

shwetha17

Member
May 24, 2018
785
0
16
I originally had scgi_port instead of scgi_local, but rtorrent threw this warning at me when I ran it manually:

Quote
The SCGI socket is bound to a specific network device yet may still pose a security risk, consider using 'scgi_local'.​


Changing it back to scgi_port does not fix the problem.
 

jith45

Member
May 25, 2018
960
0
16
Quote
  • rtorrent was installed using apt-get


Was rtorrent compiled with xmlrpc? Does anything pop up in your status window in rtorrent?
 

das329717

Member
May 25, 2018
928
0
16
Quote
I originally had scgi_port instead of scgi_local, but rtorrent threw this warning at me when I ran it manually:​


With scgi_local you must use unix socket on the both sides (ruTorrent and rTorrent). You line
scgi_local = 127.0.0.1:5000
has an invalid format.

Quote
Changing it back to scgi_port does not fix the problem.​


1) Is you restart rtorrent after changing of its configuration file?
2) Is you properly configure RPC2 mount point on your web-server? Or you use plugin rpc instead?

And yet once - TRY TO READ WIKI.
 

shwetha17

Member
May 24, 2018
785
0
16
Quote
Was rtorrent compiled with xmlrpc? Does anything pop up in your status window in rtorrent?​


Here's what rtorrent logs when I start it manually:
Quote
(16:20:19) Using 'epoll' based polling.
(16:20:19) Using 'epoll' based polling.
(16:20:19) XMLRPC initialized with 897 functions.
(16:20:19) The SCGI socket is bound to a specific network device yet may still p
ose a security risk, consider using 'scgi_local'.​


Quote

With scgi_local you must use unix socket on the both sides (ruTorrent and rTorrent). You line
scgi_local = 127.0.0.1:5000
has an invalid format.​

What would the correct format be, then? All I did was change "scgi_port" to "scgi_local" (I have since then changed it back to scgi_port)

Quote
1) Is you restart rtorrent after changing of its configuration file?​

Just to be safe, I restart the entire machine so I can make sure the behavior is correct on startup.

Quote
2) Is you properly configure RPC2 mount point on your web-server? Or you use plugin rpc instead?​

I haven't configured anything RPC-related. I'll try getting my hands on the RPC plugin.

EDIT: I just installed the RPC plugin from svn, but the error has not gone away. Is there something extra I need to do to enable the plugin?
 

shwetha17

Member
May 24, 2018
785
0
16
I hate to be that guy, but I have been perusing the wiki and I still can't figure out what's going on.

As per the Plugins page, I added "execute = {sh,-c,/usr/bin/php /var/www/rutorrent/php/initplugins.php &}" to my rtorrent.rc. Just for good measure, I downgraded rtorrent to use the recommended latest stable release, 0.8.6, instead of the version 0.8.9 found in the Ubuntu repositories. My only installed plugin is RPC. The page for that plugin is very sparse, so I assume it doesn't need any configuration (right?).

I've done everything on MainInstall and Plugins on the Wiki and I'm still at a loss.
 

dsouvik215

Member
May 25, 2018
896
0
16
Well i don't know what to tell you, i've installed it on hundreds of systems and it always works if the following conditions are true:


1) rtorrent is compiled with xmlrpc-c
2) webserver has an scgi module
3) rtorrent's config file is set up properly (scgi_local or scgi_port depending on your setup)
4) rutorrent's config is set up properly ( $scgi_port and $scgi_host settings in config.php)

2) doesn't even have to be true if you use the httprpc or rpc plugin for rutorrent