[SOLVED] No connection to rtorrent - rutorrent/rtorrent + nginx on ubuntu 12.04

das329717

Member
May 25, 2018
928
0
16
Trying to get the following setup:

rtorrent-0.9.2
rutorrent-3.4
nginx-1.1.19

this is on a fresh ubuntu 12.04 install.

.rtorrent.rc


directory = ~/downloads
session = ~/rtorrent/sessions
schedule = low_diskspace, 5, 120, close_low_diskspace=2048M
schedule = watch_directory,1,1,"load_start=~/rtorrent/watch/*.torrent"
schedule = untied_directory,1,1,stop_untied=
port_range = 55995-56000
max_peers = 100
min_peers_seed = -1
max_peers_seed = -1
max_uploads = 100
check_hash = no
scgi_local = /tmp/scgi.rtorrent.sock
peer_exchange = no
encryption = allow_incoming,try_outgoing,enable_retry
encoding_list=UTF-8
max_memory_usage = 6000M

nginx config:

server {
listen 80;
server_name rutorrent;
access_log /home/www/rutorrent/logs/nginx/access.log;
error_log /home/www/rutorrent/logs/nginx/error.log;
auth_basic "Danger";
auth_basic_user_file /etc/nginx/htpasswd;

root /home/www/rutorrent/public;

location / {
index index.php index.html;
}

location /RPC2 {
include /etc/nginx/scgi_params;
scgi_pass unix:/tmp/scgi.rtorrent.sock;
}
include php;
include drop;

}

the 'php' include has this:


location ~ \.php {
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_pass unix:/var/run/hockey.sock;
fastcgi_index index.php;
}

config.php

$scgi_port = 0;
$scgi_host = "unix:///tmp/scgi.rtorrent.sock";
$XMLRPCMountPoint = "/RPC2";


I'm getting the "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." error in rutorrent.

I can launch rtorrent, and it stays running. I see this on rtorrent startup

(23:29:54) Using 'epoll' based polling.
(23:29:54) Using 'epoll' based polling.
(23:29:54) Using 'epoll' based polling.
(23:29:54) Closed XMLRPC log.

then to confirm its still running:

ps auxw| grep rtorrent
torrents 20480 0.0 0.0 26352 1632 ? Ss 23:03 0:00 SCREEN -S rtorrent
torrents 22213 0.1 0.0 267732 8588 pts/2 Sl+ 23:29 0:00 rtorrent

socket is there:

ls -al /tmp/*.sock
srwxrwxr-x 1 torrents torrents 0 May 11 23:29 /tmp/scgi.rtorrent.sock

Kind of seems permissions related, but not sure where to look. Getting nothing in nginx logs, and the rutorrent log doesn't appear to even get generated, though I've got

$log_file = '/home/www/rutorrent/logs/rutorrent/errors.log

defined.

Note: replaced actual domain name with "rutorrent" in paths above.
 

das329717

Member
May 25, 2018
928
0
16
Is there something special I need to do to get that loaded? I commented out my /RPC2 line in my nginx conf. Copied rpc to the plugins dir and have this in conf/plugins.ini


[default]
enabled = user-defined
canChangeToolbar = yes
canChangeMenu = yes
canChangeOptions = yes
canChangeTabs = yes
canChangeColumns = yes
canChangeStatusBar = yes
canChangeCategory = yes
canBeShutdowned = yes

[rpc]
enabled = yes

But in the UI when I click the plugins tab it shows as Not Loaded, and of course I still have no link to rtorrent. In fact, all my plugins show as "Not Loaded" except for the _getdir plugin. (I also have autotools, create, rpc, seedingtime, _task in my plugins dir). If I right-click the plugin in the UI the enable/disable option are greyed out for rpc (and the others allow me to disable, implying to me they are enabled but just not loaded?)

I've restarted everything after making changes (php, nginx, rtorrent)
 

saroos1

Member
May 25, 2018
718
0
16
Quote:
Copied rpc to the plugins dir​


Check permissions. Are web-server user can read it?
Are web-server user can read/write to scgi.rtorrent.sock?

Quote:
In fact, all my plugins show as "Not Loaded" except for the _getdir plugin. (I also have autotools, create, rpc, seedingtime, _task in my plugins dir)​


Because all of its (except _getdir) require existing link to rtorrent.

Quote:
. If I right-click the plugin in the UI the enable/disable option are greyed out for rpc​


You write "enable=yes" for it.

Quote :
(and the others allow me to disable, implying to me they are enabled but just not loaded?)​


You write "enable=user-defined" for its.
 

somus1735

Member
May 25, 2018
833
0
16
Having the same problem. When you say permissions related, you mean where exactly? The rpc plugin dir, rutorrent dir in general, or somewhere else?