Can't connect to rtorrent

jith45

Member
May 25, 2018
960
0
16
Hey there, I've been struggling with rtorrent and rutorrent w/ apache.

I get "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."

EDIT: After a restart it says:
Quote
Bad response from server: (401 [error,getplugins]) theWebUI.deltaTime = 0; theWebUI.showFlags = 255; theURLs.XMLRPCMountPoint = '/RPC2'; theWebUI.systemInfo = {}; theWebUI.systemInfo.php = { canHandleBigFiles : false }; log(theUILang.badLinkTorTorrent);theWebUI.systemInfo.rTorrent = { started: false, iVersion : 0, version : '?', libVersion : '?' }; (function () { var plugin = new rPlugin( 'loginmgr',3.4,'Novik','This plugin is used to login to torrent sites in cases where cookies fail.',256,'http://code.google.com/p/rutorrent/wiki/PluginLoginMgr' ); theWebUI.theAccounts = {'BroadcasThe': { login: "", password: "", enabled: 0 },'FrenchTorrentDB': { login: "", password: "", enabled: 0 },'FtN': { login: "", password: "", enabled: 0 },'HDDream': { login: "", password: "", enabled: 0 },'ILoveTorrents': { login: "", password: "", enabled: 0 },'LostFilm': { login: "", password: "", enabled: 0 },'NovaFilm': { login: "", password: "", enabled: 0 },'PlayTheNet': { login: "", password: "", enabled: 0 },'RUTracker': { login: "", password: "", enabled: 0 },'TVTorrents': { login: "", password: "", enabled: 0 },'TorrentDamage': { login: "", password: "", enabled: 0 },'TorrentLeech': { login: "", password: "", enabled: 0 },'WhatCD': { login: "", password: "", enabled: 0 },'WorldInHD': { login: "", password: "", enabled: 0 },'jpopsuki': { login: "", password: "", enabled: 0 }}; plugin.loadLang();
plugin.loadMainCSS();

if(plugin.canChangeOptions())
{
plugin.accaddAndShowSettings = theWebUI.addAndShowSettings;
theWebUI.addAndShowSettings = function(arg)
{
if(plugin.enabled)
{
$.each( theWebUI.theAccounts, function(name,val)
{
$('#'+name+'_lmenabled').attr("checked", (val.enabled==1));
$('#'+name+'_lmlogin').val(val.login);
$('#'+name+'_lmpassword').val(val.password);
$('#'+name+'_lmenabled').change();
});
}
plugin.accaddAndShowSettings.call(theWebUI,arg);
}

plugin.accWasChanged = function()
{
var ret = false;
$.each( theWebUI.theAccounts, function(name,val)
{
if( ($('#'+name+'_lmenabled').attr("checked") ^ val.enabled) ||
($('#'+name+'_lmlogin').val()!=val.login) ||
($('#'+name+'_lmpassword').val()!=val.password))
{
ret = true;
return(false);
}
});
return(ret);
}

plugin.accSettings = theWebUI.setSettings;
theWebUI.setSettings = function()
{
plugin.accSettings.call(this);
if(plugin.enabled && plugin.accWasChanged())
this.request("?action=setacc");
}

rTorrentStub.prototype.setacc = function()
{
var s = '';
$.each( theWebUI.theAccounts, function(name,val)
{
s+=("&"+name+"_enabled="+($('#'+name+'_lmenabled').attr("checked") ? 1 : 0)+
"&"+name+"_login="+encodeURIComponent($.trim($​


Here is the relevant areas of the config.php:

Quote
$scgi_port = 8083;
$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",​


HTTPD

Quote
ServerName localhost
NameVirtualHost *:443
SCGIMount /RPC2 127.0.0.1:8083










.rtorrent.rc

Quote
# The ip address reported to the tracker.
#ip = 127.0.0.1
#ip = rakshasa.no
#
# The ip address the listening socket and outgoing connections is
# bound to.
#bind = 127.0.0.1
#bind = rakshasa.no
#
# Port range to use for listening.
port_range = 55556-55560;
#
scgi_port = 127.0.0.1:8083;​
 

dsouvik215

Member
May 25, 2018
896
0
16
My guess is that php is not in the PATH of the user running ruTorrent. On the config.php, complete the following lines:
Code:
$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.
);
Add the complete path to all the externals needed.
 

jith45

Member
May 25, 2018
960
0
16
Where would they be?

It's a standard Ubuntu Server install, so shouldn't the values in Path be correct? How do i find out where they are?

Thanks
 

lisas4567

Member
May 25, 2018
773
0
16
Code:
find / -name phpI believe that php is not your problem, though... But also have no idea what is..