Forum

Full Version: Guide: rTorrent + ruTorrent installation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Thanks Koper, your script worked great. I am having a little difficulty in trying to connect sickbeard and couchpotato with rtorrent. Because you use unix sockets, how can I connect with rtorrent? In couchpotato I put scgi://localhost:5000/ but it doesn't work.
I'm having the same issue!
It's not working i get an error rtorrent: Error in option file: ~/.rtorrent.rc:77: Could not prepare socket for listening: Address already in use
Ok, sorry that I didn't answer earlier, to all of you who want to use it with sickbeard/couchpotato, because I used here scgi_local (local socket) you need to change in rtorrent.rc (defaulet /home/xbian/.rtorrent.rc)
this line:
scgi_local = /tmp/rtorrent.sock
to
scgi_port = 127.0.0.1:5000

and in:
/etc/nginx/sites-available/rutorrent
scgi_pass unix:/tmp/rtorrent.sock;
to
scgi_pass localhost:5000;

/var/www/rutorrent/conf/config.php
$scgi_port = 0;
$scgi_host = "unix:///tmp/rtorrent.sock";
to
$scgi_port = 5000;
$scgi_host = "127.0.0.1";

It'll now work.
It will solve your problem vokus also, but basicaly it means your rtorrent crashed and just reboot and your problem would be solved.
When I change it to those settings however, the web ui stops working and no longer starts up rtorrent.
You changed all of them? if yes try disableing rutorrent plugins httprcp i rpc. You need to change this 3 files .rtorrent.rc config.php in rutorrent and nginx rutorrent file. It should work I just tried it on fresh install and it works
Yep changed them all, I am however installing this on raspbian, so maybe there is a difference? I even disabled the plugin like you said, still doesnt work. I guess I will have to xbian to see.
Hmm, if it's not a problem I could check out your setup via ssh it should work perfectly on raspian, but for sure you should change user and folders in this to get it work (because here it's "installing" it as xbian user, and in xbian home folder)
Hi all,

Just wanted to say thanks for this awesome script! Got rtorrent and rutorrent up and running quickly and it makes a great xbian citizen w/ XBMC w/ the nice levels.

I also wanted to mange rtorrent remotely with a client such as Transdroid on my android, but it appears scgi wasn't configured to allow this. It also wasn't configured for authentication, and I didn't want to open nginx up to the entire world, so I enabled basic auth on it.

Here's what I did:

nano /etc/nginx/sites-enabled/rutorrent


Paste in following (edit port, auth realm, and auth file) and save.


server
{
listen 9999; ##Replace with port to listen on - preferably not same as rutorrent
server_name localhost;
location ^~ /scgi {
auth_basic "Restricted"; ##auth zone - whatever you want to use
auth_basic_user_file torpasswd; ##auth file - relative to /etc/nginx/.
include scgi_params;
scgi_pass unix:/tmp/rtorrent.sock;
}
}


Now you need an auth file at /etc/nginx/torpasswd (or whatever auth file name you specified)

Easiest way is to use this online tool here:

http://www.askapache.com/online-tools/htpasswd-generator/ -> Be sure to put in the realm used in "auth_basic" in nginx config above, and select md5 and Basic Auth.

nano /etc/nginx/torpasswd -> paste in digest algorithm above

sudo /etc/init.d/nginx restart

Enjoy!

In transdroid, you specify user name and password, and then for SCGI mount point you put "/scgi", and also specify the port number you mapped it to. NAT the port through your router and you've got access anywhere with Dynamic DNS!

~James
Hi and thanks for what seems to be a great script!

I know I probably shouldn't post this here, and I don't mean to be disrespectful in any way. I just thought I'd mention that I tried to install this on latest Raspbmc, and it seems that it started ok, but gave me alot of errors at the end. Pasting errors here, if there is a simple fix to this I would really appreaciate your help. But like I said, I know this isn't the right Place to be asking for support in my case =)

Code:
rtorrent_pi.sh
Install and configure rtorrent on a xbian...
-e Version: 1.0, 27 January 2013
Created by: koper89
-----------------------------------------------------------

Updating package lists...
Installing rtorrent...
Installing dtach...
Installing php5-fpm, and other dependancies...
Installing nginx...
Creating WWW directory...
Creating rTorrent watch directory...
Creating rTorrent session directory...
Creating rTorrent download directory...
Installing rutorrent...
./rtorrentpi.sh: 121: ./rtorrentpi.sh: [[: not found
Setting rtorrent...
./rtorrentpi.sh: 242: ./rtorrentpi.sh: [[: not found
Setting permissions for rtorrent setting file...
Setting rtorrent autostart...
Setting rtorrent autostart permissions...
Setting rutorrent...
Setting ruttorent website in nginx...
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
tee: /etc/nginx/sites-available/rutorrent: No such file or directory
ln: failed to create symbolic link `/etc/nginx/sites-enabled/rutorrent': No such file or directory
sed: can't read /etc/php5/fpm/pool.d/www.conf: No such file or directory
Restart of included packages...
php5-fpm: unrecognized service
nginx: unrecognized service
Stopping rtorrent: Starting rtorrent: start-stop-daemon: unable to stat /usr/bin/dtach (No such file or directory)
chmod: cannot access `/tmp/rtorrent.dtach': No such file or directory
started
dpkg: warning: files list file for package 'vim-tiny' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libsm6:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libtalloc2:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libx11-data' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libjson0:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'minissdpd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libmikmod2:armhf' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
E: Sub-process /usr/bin/dpkg returned an error code (2)
dpkg: warning: files list file for package 'vim-tiny' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libsm6:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libtalloc2:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libx11-data' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libjson0:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'minissdpd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libmikmod2:armhf' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
E: Sub-process /usr/bin/dpkg returned an error code (2)
dpkg: warning: files list file for package 'vim-tiny' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libsm6:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libtalloc2:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libx11-data' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libjson0:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'minissdpd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libmikmod2:armhf' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
E: Sub-process /usr/bin/dpkg returned an error code (2)
dpkg: warning: files list file for package 'vim-tiny' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libsm6:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libtalloc2:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libx11-data' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libjson0:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'minissdpd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libmikmod2:armhf' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
E: Sub-process /usr/bin/dpkg returned an error code (2)
Run this script once more!
rm: cannot remove `/tmp/rtorrent.sock': No such file or directory
If you can please post log file (source to log is on variables in the script)
(14th May, 2014 01:03 AM)koper89 Wrote: [ -> ]If you can please post log file (source to log is on variables in the script)

After I posted this I continiued with a manual install of rtorrent on raspbmc, and the day after when I hit reboot through ssh the system never got back online, after plugging it in to a screen I saw that something had messed up the entire system... the initial boot sequence was full of weird symbols...

so, sorry, can't post any logs.
(14th Apr, 2014 05:07 AM)koper89 Wrote: [ -> ]Ok, sorry that I didn't answer earlier, to all of you who want to use it with sickbeard/couchpotato, because I used here scgi_local (local socket) you need to change in rtorrent.rc (defaulet /home/xbian/.rtorrent.rc)
this line:
scgi_local = /tmp/rtorrent.sock
to
scgi_port = 127.0.0.1:5000

and in:
/etc/nginx/sites-available/rutorrent
scgi_pass unix:/tmp/rtorrent.sock;
to
scgi_pass localhost:5000;

/var/www/rutorrent/conf/config.php
$scgi_port = 0;
$scgi_host = "unix:///tmp/rtorrent.sock";
to
$scgi_port = 5000;
$scgi_host = "127.0.0.1";

It'll now work.
It will solve your problem vokus also, but basicaly it means your rtorrent crashed and just reboot and your problem would be solved.

Anyone can help me?Huh
Made the modification but still no comunication with CouchPotato nor Sickbeard... Also a new message appeared in my rutorrent:

[08.07.2014 02:31:31] 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

See below log from my couchpotato

[ couchpotato.api] Failed doing api request "download.rtorrent.test": Traceback (most recent call last):
File "/usr/local/share/couchpotato/couchpotato/api.py", line 105, in run_handler
res = api[route](**kwargs)
File "/usr/local/share/couchpotato/couchpotato/core/downloaders/base.py", line 164, in _test
t = self.test()
File "/usr/local/share/couchpotato/couchpotato/core/downloaders/rtorrent/main.py", line 82, in test
if self.connect(True):
File "/usr/local/share/couchpotato/couchpotato/core/downloaders/rtorrent/main.py", line 74, in connect
self.rt._verify_conn()
File "/usr/local/share/couchpotato/libs/rtorrent/__init__.py", line 106, in _verify_conn
assert "system.client_version" in self._get_rpc_methods(), "Required RPC method not available."
File "/usr/local/share/couchpotato/libs/rtorrent/__init__.py", line 150, in _get_rpc_methods
return(self._rpc_methods or self._update_rpc_methods())
File "/usr/local/share/couchpotato/libs/rtorrent/__init__.py", line 139, in _update_rpc_methods
self._rpc_methods = self._get_conn().system.listMethods()
File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
return self.__send(self.__name, args)
File "/usr/local/share/couchpotato/libs/rtorrent/lib/xmlrpc/scgi.py", line 188, in __request
verbose=self.__verbose
File "/usr/local/share/couchpotato/libs/rtorrent/lib/xmlrpc/scgi.py", line 98, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/local/share/couchpotato/libs/rtorrent/lib/xmlrpc/scgi.py", line 121, in single_request
sock.connect(addrinfo[0][4])
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused
Hey, I just installed Xbian on my pi and was looking for a torrent client. I have few requirements.

1. I dont keep my on always, so will rtorrent start along with pi?
2. I have a WD My cloud and want the download to be saved there. I rtorrent capable to downloading directly into my NAS (My Cloud)
3. Does it have a webui that i can use from my laptop/mobile?

Thanks!
[quote='koper89' pid='22167' dateline='1397416034']

I installed this per OP but i do not know how to access rtorrent via web GUI. When i typed "rtorrent" in putty this is what i am getting
Code:
rtorrent: Error in option file: ~/.rtorrent.rc:77: Could not prepare socket for listening: Address already in use
Pages: 1 2 3 4
Reference URL's