How to setup rtorrent with cherokee-admin

randac56

Member
May 25, 2018
915
0
16
First of all thanks for all your time. Really appreciated.

Secondly, wondering too why the second one isn't working.
Anyways, since i want to use sockets i decided to try out Cherokee (0.99.27 installed) and shift Apache to other listening ports.

If you can provide hints on how to setup via cherokee-admin that would speed me up nicely. Nevertheless i am screwing around with it myself too
 

peshua19

Member
May 25, 2018
897
0
16
Ok, 2 things. If your machine is on a remote server, you should use a ssh tunnel and only run cherokee-admin via the tunnel. I'm going to assume you understand how to get TO cherokee-admin.

Anyways, If all you need to do is set up rtorrent via cherokee admin, it's dirt simple.

Click Virtual Servers


Then click on your Virtual server, in most cases this will just be "default" (you can set up more than one depending on your needs but chances are you won't be right now)

Next, click on Behavior, then Wizard


From the list of wizards, select MISC then Rtorrent


Then simply set with your settings.


Then save. This will create the needed Interpreter and rule. Now, if you wish to add Authentication to your rpc mount, you can do this as well, but i'd save this until you have it working.
 

randac56

Member
May 25, 2018
915
0
16
I am on my way out. Thanks for the reply.

Yes i do have my linux-server with rtorrent and cherokee and i am working from my Win2k machine. All in the same LAN. I did just start cherokee-admin bound to the LAN-IP of the server so i can reach it from Windows otherwise i would have needed to start a web-browser on the linux-server via SSH-X. Just too lazy right now.

As far as i can see that setup would be for the scgi-port setup of rtorrent and rutorrent.

Difference for the unix-socket setup?
Since i already have rtorrent running with scgi_local and don't want to restart it unnecessarily.

I can re-post my settings later when i am back and after having a look at the images you posted with respect to my cherokee config.
 

peshua19

Member
May 25, 2018
897
0
16
for a unix socket just put in the path

it TELLS you right on the page

Connection
Where rTorrent XMLRPC is available. The host:port pair, or the Unix socket path.



you can name it anything you want. Just make sure that you set it properly in .rtorrent.rc AND in rutorrent/config.php

so for what i have in the picture above, i'd have this in rutorrent/config.php
Code:
$scgi_port = 0;
$scgi_host = "unix:///home/wonslung/rtorrent/.sock/rpc2.socket";
and this in .rtorrent.rc

Code:
scgi_local = /home/wonslung/rtorrent/.sock/rpc2.socket
schedule = chmod,0,0,"execute=chmod,777,/home/wonslung/rtorrent/.sock/rpc2.socket"
 

randac56

Member
May 25, 2018
915
0
16
Seems i am just not lucky. I saw what is written on the pages but since it doesn't work i thought i just ask.

So here is my config.

rutorrent/config.php
Code:
$scgi_port = 0;
$scgi_host = "unix:///home/verwalter/rtorrent/.socket/rpc.socket";
.rtorrent.rc
Code:
scgi_local = /home/verwalter/rtorrent/.socket/rpc.socket
schedule = chmod,0,0,"execute=chmod,777,/home/verwalter/rtorrent/.socket/rpc.socket"
 

lisas4567

Member
May 25, 2018
773
0
16
so does rtorrent not load at all? does ti just keep on the spinning wheel? if so this is probably due to a plugin error. If this is the problem remove all your plugins then try again


also, you're not running cherokee "chrooted" are you?


Edit:

Those errors are apparently not real (the epoll error) according to this:
http://www.gossamer-threads.com/lists/cherokee/users/11621


if it doesn't work with the rpc plugin then there is some underlying problem on your system.

Also, i've had some bad luck in the past on some systems when it comes to unix sockets and rtorrent. Do you HAVE to use a unix socket? have you tried setting it up the normal way?


Anyways, just to recap

You need to set it in .rtorrent.rc
you need to set it up in rutorrent/config.php
you need to also set the mount point in rs.js

and whatever you set needs to also be set properly in your webserver.
 

randac56

Member
May 25, 2018
915
0
16
The rutorrent frontend keeps on spinning. At some point it did load the frontend but kept complaining about wrong settings and also got a web-server error 503 or 500.

Nope, cherokee is not running with chroot.

Will try to remove all plugins except rpc now.

Of course i would prefer a socket-connection, but if failing i will try the scgi-port way again, although didn't work the last time i tried either.
 

randac56

Member
May 25, 2018
915
0
16
All plugin directories removed except rpc, but still the same picture.

Changes all configs rtorrent, rutorrent, cherokee over to scgi-port but still the same.

So i guess i will stay with rtorrent+screen via ssh. sad.gif
 

Attachments

simur612

Member
May 25, 2018
879
0
16
do me a favor


put this in a file called test.php
Code:
<?php phpinfo(); ?>

in your webroot

then go to http://yourip/test.php and tell me what you see


edit:

infact, looking back at your screenshot i don't see the php interpretor.

do you have php installed? which os are you running? you need php-cgi

When you have that, you need to add php via the wizard. It will be under LANG
 

randac56

Member
May 25, 2018
915
0
16
doh.

doh, must have deleted the php-handler when i tried doing all from the start again.

So php was installed but cherokee didn't use it, hence when i tried the php-info he wanted to download the php-file.

I do have installed PHP Version 5.2.4-2ubuntu5.7 on kernel 2.6.24-25-server.

So now with the scgi-port setup the rutorrent frontend loads only complaining about the session directory and the xmlrpc version
Code:
[07.11.2009 18:48:44] WebUI started.
[07.11.2009 18:48:45] Web server can't access rTorrent's session directory for read. ruTorrent will not work. (/home/verwalter/rtorrent/session/)
[07.11.2009 18:48:45] rTorrent is compiled with incorrect version of xmlrpc-c library, without i8 support. Version must be >= 1.11. Some functionality will be unavailable.
So maybe later i will try with the socket again when my nerves allow it and the trackers have been cooling down from my numerous restarts.

P.S. Also i made sure this time that Apache was not running. Although it is configured to listen on other ports and stuff i am not sure if it didn't interfere nevertheless.
 

randac56

Member
May 25, 2018
915
0
16
doh.

doh, must have deleted the php-handler when i tried doing all from the start again.

So php was installed but cherokee didn't use it, hence when i tried the php-info he wanted to download the php-file.

I do have installed PHP Version 5.2.4-2ubuntu5.7 on kernel 2.6.24-25-server
jeeze, ubuntu is behind on php versions....5.2.4? ick


So now with the scgi-port setup the rutorrent frontend loads only complaining about the session directory and the xmlrpc version
Code:
[07.11.2009 18:48:44] WebUI started.
[07.11.2009 18:48:45] Web server can't access rTorrent's session directory for read. ruTorrent will not work. (/home/verwalter/rtorrent/session/)
[07.11.2009 18:48:45] rTorrent is compiled with incorrect version of xmlrpc-c library, without i8 support. Version must be >= 1.11. Some functionality will be unavailable.​

The first error is easy to fix, you need to go to your rutorrent directory and chmod 777 torrents/ and settings/
Code:
sudo chmod 777 settings/ torrents/as far as the other error, dude, you need to delete which ever version of xmlrpc-c you have, delete rtorrent and start over.
best bet is to get this version of xmlrpc from svn:
Code:
svn co http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced xmlrpc-c
on ubuntu you MAY have to disable c++
Code:
./configure --disable-cplusplus
make
make install clean
then get rtorrent and recompile it the new xmlrpc-c

So maybe later i will try with the socket again when my nerves allow it and the trackers have been cooling down from my numerous restarts.

P.S. Also i made sure this time that Apache was not running. Although it is configured to listen on other ports and stuff i am not sure if it didn't interfere nevertheless.​
so long as apache is on another port it's fine, hell, you can even set them on the same port if they use different bind ip's (it's very possible to run multiple ip's)
 

randac56

Member
May 25, 2018
915
0
16
that's because my server is running for nearly 2 years, no major upgrade. Otherwise php would be 5.2.10 and the kernel 2.6.31.
But since this is my server which is running long-time (up to 6 months at a time without restart (maintenance)). Never crashed.
But of course some software is a little behind, besides the stuff i compile myself.


Concerning the first one. It is not about torrents/ and settings/ (both are already on 777). It is about the session directory from rtorrent. I have a directory rtorrent/ below my home folder /home/verwalter/ where i download all the .torrent-files to. Also in this directory is a folder session/ which holds all the session-resume data for rtorrent. The .torrent-data-content goes somewhere to /media/...

settings/ holds the rtorrent settings read out by rutorrent and saved in rtorrent.dat?
torrents/ holds uploaded .torrent-files or the torrent-content? If it is the .torrent-files i could try setting a symlink to the real directory of where rtorrent has been setup with watch-directories.

Concerning the xmlrpc, i know it is not the newest either. Always left my hands of once it was running since i already had troubles with compilation of it back in the days. I have updated my svn copy today but didn't came around compiling yet.
What about c++ disable? Where did you read/know about it? Some rtorrent-tickets?

With Apache, i know, just wanted to be dead sure. LOL
Since i have cherokee i am thinking about getting rid of Apache anyway. It is only my private server...

Thanks for your enduring help so far. Would have taken me a little bit longer to read up on cherokee and stuff.
Although i got pretty skilled over the last ten years using Linux there are days when i think i need one of these yellow books "For Dummies..." ROFL
 

simur612

Member
May 25, 2018
879
0
16
ok, compiled the new xmlrpc (disable cplusplus is also mentioned on some debian related sites).

So besides the access to the session directory (assuming that the www-data user of the web-server just is missing access rights, so thinking about placing the folder structure with all the watch-directories and the session-files somewhere else) the rutorrent frontend is running.

Connecting socket-wise is postponed for right now (since i am going out having a drink on you) but i will try it again for security and speed (to see if the frontend gets even more responsive then). Also i need to add back other plugins, currently only rpc.
 

randac56

Member
May 25, 2018
915
0
16
well, make sure the web user can at least READ the session folder.

And for sure, update xmlrpc

you NEED a newer version.
 

lisas4567

Member
May 25, 2018
773
0
16
There isn't there, for sure- using stock 0.99.39 under Archlinux.
Maybe a compilation issue? I will try to build it myself and see if the wizard is there.
EDIT: My fault. It's there- you just have to expand "Default", pick the Behavior tab, and run THAT wizard.