rtorrent | rutorrent | ningx | freebsd - No Connection To rtorrent

dsouvik215

Member
May 25, 2018
896
0
16
I am a fairly new user to linux, currently running FreeBSD.

I have rtorrent installed which runs properly; able to download. I have also have nginx installed which also works properly, with a directory setup for rutorrent.

When I go to the rutorrent GUI I receive the following: 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 been trying to get this to work by trying different suggestions for a few days now, with no results other than the occasional different error from rutorrent. Any help would be appreciated, I can provide further documentation if needed. Thank you all very much.

---

.rtorrent.rc

Code:
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.

# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 10000
upload_rate = 50

min_peers = 50 ; look for more peers if limit doesn't reach 50
max_peers = 500 ; if there are 500 peers, don't allow any more

# Same as above but for seeding completed torrents (-1 = same as downloading)
min_peers_seed = 10
max_peers_seed = 100

# Maximum number of simultanious uploads per torrent.
max_uploads = 25

port_range = 2000-2200 ; ports to use for listening

# Start opening ports at a random position within the port range.
port_random = yes

check_hash = yes ; check hash on finished torrents

# encryption settings
encryption = allow_incoming,enable_retry,prefer_plaintext

use_udp_trackers = yes ; setup client to use udp (stateless) trackers

# DHT clientless tracker
dht = auto
dht_port = 6881
peer_exchange = yes

# Session tmp file (relative dir is good, absolute is bad)
session = ~/torrents/.session

# Default directory to save the downloaded torrents.
directory = ~/torrents/

# Close torrents when diskspace is low.
schedule = low_diskspace,5,60,close_low_diskspace=2048M

# Watch a directory for new torrents, and stop those that have been deleted (^d)
schedule = watch_directory,5,5,"load_start=./Downloads/watch/*.torrent"
schedule = watch_directory_2,5,5,"load_start=~/Downloads/watch/music/*.torrent,d.set_directory=~/Downloads/music/"
schedule = watch_directory_3,5,5,"load_start=~/Downloads/watch/television/*.torrent,d.set_directory=~/Downloads/television/"
schedule = watch_directory_4,5,5,"load_start=~/Downloads/watch/books/*.torrent,d.set_directory=~/Downloads/books/"
schedule = untied_directory,5,5,stop_untied= ; stop torrents once removed from the client

# Colors # only in rtorrent extended
## Colors: 0 = black 1 = red 2 = green 3 = yellow 4 = blue 5 = magenta 6 = cyan 7 = white

#rutorrent config lines
scgi_port = 127.0.0.1:5000

nginx

Code:
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /usr/local/www/nginx/rutorrentdir;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
rutorrent config.php

Code:
<?php
// configuration parameters

// for snoopy client
@define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0', true);
@define('HTTP_TIME_OUT', 30, true); // in seconds
@define('HTTP_USE_GZIP', true, true);
$httpIP = null; // IP string. Or null for any.

@define('RPC_TIME_OUT', 5, true); // in seconds

@define('LOG_RPC_CALLS', false, true);
@define('LOG_RPC_FAULTS', true, true);

// for php
@define('PHP_USE_GZIP', false, true);
@define('PHP_GZIP_LEVEL', 2, true);

$schedule_rand = 10; // rand for schedulers start, +0..X seconds
 

das329717

Member
May 25, 2018
928
0
16
Quote:
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.​


.rtorrent.rc

scgi_port = 127.0.0.1:5000

rutorrent config.php

$scgi_port = 9000;

And?
 

dsouvik215

Member
May 25, 2018
896
0
16
I apologize, I got what I copied mixed up from trying several solutions. Here is what happens when I set the scgi port to 5000 and 9000.

scgi port set to 9000

rtorrent does not start; reports error

Code: [Select]
rtorrent: Error in option file: ~/.rtorrent.rc:56: Could not prepare socket for listening: Address already in use

.rtorrent.rc

Code: [Select]
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.

# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 10000
upload_rate = 50

min_peers = 50 ; look for more peers if limit doesn't reach 50
max_peers = 500 ; if there are 500 peers, don't allow any more

# Same as above but for seeding completed torrents (-1 = same as downloading)
min_peers_seed = 10
max_peers_seed = 100

# Maximum number of simultanious uploads per torrent.
max_uploads = 25

port_range = 2000-2200 ; ports to use for listening

# Start opening ports at a random position within the port range.
port_random = yes

check_hash = yes ; check hash on finished torrents

# encryption settings
encryption = allow_incoming,enable_retry,prefer_plaintext

use_udp_trackers = yes ; setup client to use udp (stateless) trackers

# DHT clientless tracker
dht = auto
dht_port = 6881
peer_exchange = yes

# Session tmp file (relative dir is good, absolute is bad)
session = ~/torrents/.session

# Default directory to save the downloaded torrents.
directory = ~/torrents/

# Close torrents when diskspace is low.
schedule = low_diskspace,5,60,close_low_diskspace=2048M

# Watch a directory for new torrents, and stop those that have been deleted (^d)
schedule = watch_directory,5,5,"load_start=./Downloads/watch/*.torrent"
schedule = watch_directory_2,5,5,"load_start=~/Downloads/watch/music/*.torrent,d.set_directory=~/Downloads/music/"
schedule = watch_directory_3,5,5,"load_start=~/Downloads/watch/television/*.torrent,d.set_directory=~/Downloads/television/"
schedule = watch_directory_4,5,5,"load_start=~/Downloads/watch/books/*.torrent,d.set_directory=~/Downloads/books/"
schedule = untied_directory,5,5,stop_untied= ; stop torrents once removed from the client

# Colors # only in rtorrent extended
## Colors: 0 = black 1 = red 2 = green 3 = yellow 4 = blue 5 = magenta 6 = cyan 7 = white

#rutorrent config lines
scgi_port = 127.0.0.1:9000
rutorrent config.php

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

// for snoopy client
@define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0', true);
@define('HTTP_TIME_OUT', 30, true); // in seconds
@define('HTTP_USE_GZIP', true, true);
$httpIP = null; // IP string. Or null for any.

@define('RPC_TIME_OUT', 5, true); // in seconds

@define('LOG_RPC_CALLS', false, true);
@define('LOG_RPC_FAULTS', true, true);

// for php
@define('PHP_USE_GZIP', false, true);
@define('PHP_GZIP_LEVEL', 2, true);

$schedule_rand = 10; // rand for schedulers start, +0..X seconds

$do_diagnostic = true;
$log_file = '/tmp/errors.log'; // path to log file (comment or leave blank to disable logging)

$saveUploadedTorrents = true; // Save uploaded torrents to profile/torrents directory or not
$overwriteUploadedTorrents = false; // Overwrite existing uploaded torrents in profile/torrents directory or make unique name

$topDirectory = '/'; // Upper available directory. Absolute path with trail slash.
$forbidUserSettings = false;

$scgi_port = 9000;
$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" => '/usr/local/bin/php', // Something like /usr/bin/php. If empty, will be found in PATH.
"curl" => '/usr/local/bin/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",
);

$profilePath = '../share'; // Path to user profiles
$profileMask = 0777; // Mask for files and directory creation in user profiles.
// Both Webserver and rtorrent users must have read-write access to it.
// For example, if Webserver and rtorrent users are in the same group then the value may be 0770.

scgi port set to 5000

rtorrent starts but freezes

Code: [Select]
(11:50:46) XMLRPC initialized with 897 functions.
(11:50:46) The SCGI socket is bound to a specific network device yet may still pose a security risk, consider using 'scgi_local'.
(11:50:46) Closed XMLRPC log
rutorrent slow to load; reports error

Code: [Select]
[28.03.2013 11:51:29] Bad response from server: (404 [error,getplugins]) &lt;html&gt;
&lt;head&gt;&lt;title&gt;404 Not Found&lt;/title&gt;&lt;/head&gt;
&lt;body bgcolor="white"&gt;
&lt;center&gt;&lt;h1&gt;404 Not Found&lt;/h1&gt;&lt;/center&gt;
&lt;hr&gt;&lt;center&gt;nginx/1.2.6&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;!-- a padding to disable MSIE and Chrome friendly error page --&gt;
&lt;!-- a padding to disable MSIE and Chrome friendly error page --&gt;
&lt;!-- a padding to disable MSIE and Chrome friendly error page --&gt;
&lt;!-- a padding to disable MSIE and Chrome friendly error page --&gt;
&lt;!-- a padding to disable MSIE and Chrome friendly error page --&gt;
&lt;!-- a padding to disable MSIE and Chrome friendly error page --&gt;
.rtorrent.rc

Code: [Select]
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.

# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 10000
upload_rate = 50

min_peers = 50 ; look for more peers if limit doesn't reach 50
max_peers = 500 ; if there are 500 peers, don't allow any more

# Same as above but for seeding completed torrents (-1 = same as downloading)
min_peers_seed = 10
max_peers_seed = 100

# Maximum number of simultanious uploads per torrent.
max_uploads = 25

port_range = 2000-2200 ; ports to use for listening

# Start opening ports at a random position within the port range.
port_random = yes

check_hash = yes ; check hash on finished torrents

# encryption settings
encryption = allow_incoming,enable_retry,prefer_plaintext

use_udp_trackers = yes ; setup client to use udp (stateless) trackers

# DHT clientless tracker
dht = auto
dht_port = 6881
peer_exchange = yes

# Session tmp file (relative dir is good, absolute is bad)
session = ~/torrents/.session

# Default directory to save the downloaded torrents.
directory = ~/torrents/

# Close torrents when diskspace is low.
schedule = low_diskspace,5,60,close_low_diskspace=2048M

# Watch a directory for new torrents, and stop those that have been deleted (^d)
schedule = watch_directory,5,5,"load_start=./Downloads/watch/*.torrent"
schedule = watch_directory_2,5,5,"load_start=~/Downloads/watch/music/*.torrent,d.set_directory=~/Downloads/music/"
schedule = watch_directory_3,5,5,"load_start=~/Downloads/watch/television/*.torrent,d.set_directory=~/Downloads/television/"
schedule = watch_directory_4,5,5,"load_start=~/Downloads/watch/books/*.torrent,d.set_directory=~/Downloads/books/"
schedule = untied_directory,5,5,stop_untied= ; stop torrents once removed from the client

# Colors # only in rtorrent extended
## Colors: 0 = black 1 = red 2 = green 3 = yellow 4 = blue 5 = magenta 6 = cyan 7 = white

#rutorrent config lines
scgi_port = 127.0.0.1:5000
rutorrent config.php

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

// for snoopy client
@define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0', true);
@define('HTTP_TIME_OUT', 30, true); // in seconds
@define('HTTP_USE_GZIP', true, true);
$httpIP = null; // IP string. Or null for any.

@define('RPC_TIME_OUT', 5, true); // in seconds

@define('LOG_RPC_CALLS', false, true);
@define('LOG_RPC_FAULTS', true, true);

// for php
@define('PHP_USE_GZIP', false, true);
@define('PHP_GZIP_LEVEL', 2, true);

$schedule_rand = 10; // rand for schedulers start, +0..X seconds

$do_diagnostic = true;
$log_file = '/tmp/errors.log'; // path to log file (comment or leave blank to disable logging)

$saveUploadedTorrents = true; // Save uploaded torrents to profile/torrents directory or not
$overwriteUploadedTorrents = false; // Overwrite existing uploaded torrents in profile/torrents directory or make unique name

$topDirectory = '/'; // Upper available directory. Absolute path with trail slash.
$forbidUserSettings = false;

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

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

$pathToExternals = array(
"php" => '/usr/local/bin/php', // Something like /usr/bin/php. If empty, will be found in PATH.
"curl" => '/usr/local/bin/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",
);

$profilePath = '../share'; // Path to user profiles
$profileMask = 0777; // Mask for files and directory creation in user profiles.
// Both Webserver and rtorrent users must have read-write access to it.
// For example, if Webserver and rtorrent users are in the same group then the value may be 0770.
 

jith45

Member
May 25, 2018
960
0
16
Try to configure your system by the normal way.

Quote
rutorrent slow to load; reports error​


Invalid installation. Or error in the web-server configuration. Or PHP doesn't installed. Or something else.