[How-To]Install rutorrent with lighttpd

Status
Not open for further replies.

DearestDreamer

Dabbler
Joined
Nov 28, 2015
Messages
42
Well I fixed the curl issue, which was basically setting the curl path in php.ini.

The 403 errors lead me to think it was a permission issue too, but I set it up correctly and I double checked each folder/file. It's all set up correctly.. I tested ruTorrent with Internet Explorer and it seems as though my Firefox setup might be incompatible, because it all works flawlessly without errors in Internet Explorer.
 

Fish

Contributor
Joined
Jun 4, 2015
Messages
108
Well I fixed the curl issue, which was basically setting the curl path in php.ini.

The 403 errors lead me to think it was a permission issue too, but I set it up correctly and I double checked each folder/file. It's all set up correctly.. I tested ruTorrent with Internet Explorer and it seems as though my Firefox setup might be incompatible, because it all works flawlessly without errors in Internet Explorer.
Hmm. Have you tried clearing your cookies in Firefox? Otherwise, I guess it could be an SSL issue.
 
Joined
Dec 16, 2015
Messages
1
Thanks for the writeup. I'm running into a bit of a problem that I'm having trouble figuring out. I don't know FreeBSD much at all so I've been trying to troubleshoot as best I can. After following the instructions I'm able to get a webgui login from step 11 but then I get a 404 error. I've nuked and started over a couple times.

It also doesn't seem like screen is starting at reboot even with the crontab setup which is problematic but I'm not sure if related. I assume I'm verifying its running correctly with screen -list since it doesn't show up without manually entering the command. I'm fairly certain lighttpd is running as it shows up with service -e and trying to start it comes back with already running.

I've tried the permission suggestions without any luck. Anything else I can look at?
 

ondjultomte

Contributor
Joined
Aug 10, 2015
Messages
117
I had some more time over now and finally got lighttpd up and running, but
[03.01.2016 16:33:36] 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 launch rtorrent manually
(19:41:24) Could not read resource file: ~/.rtorrent.rc
(19:41:24) Could not open file: "./rtorrent.rc"

but
-rw-r--r-- 1 admin admin 2799 Jan 3 18:44 .rtorrent.rc

the user is admin.

any ideas why it can't read the rc file?
 

steyr

Cadet
Joined
Feb 7, 2016
Messages
1
Hey.

I have a problem
[08.02.2016 17:41:26] rss: Some functionality will be unavailable. Webserver user can't access external program (curl).

But when i try to install crul agian it say.

root@seedbox:/ # pkg install curl
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The most recent version of packages are already installed

I did install php56 + extensions exact the same way it says in the guide
 

Thadius Miller

Dabbler
Joined
Feb 19, 2015
Messages
15
(19:41:24) Could not read resource file: ~/.rtorrent.rc

Make sure you're the admin user when you launch rtorrent in screen.

Run this:
id

If it doesn't return 'admin', you're not using the correct user account or /home/admin/.rtorrent.rc doesn't exist.

(19:41:24) Could not open file: "./rtorrent.rc"

This one looks like a straight up typo.

rtorrent.rc
is not the same as
.rtorrent.rc

Hey.

I have a problem
[08.02.2016 17:41:26] rss: Some functionality will be unavailable. Webserver user can't access external program (curl).

But when i try to install crul agian it say.

root@seedbox:/ # pkg install curl
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The most recent version of packages are already installed

I did install php56 + extensions exact the same way it says in the guide

Your webserver user doesn't have /usr/local/bin in $PATH. It's probably missing /usr/bin as well.

You could add it, but here's an easier fix. Edit rutorrent/conf/config.php and update these lines:

Code:
        $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"  => '/usr/bin/gzip',             // Something like /usr/bin/gzip. If empty, will be found in PATH.
                "id"    => '/usr/bin/id',               // Something like /usr/bin/id. If empty, will be found in PATH.
                "stat"  => '/usr/bin/stat',             // Something like /usr/bin/stat. If empty, will be found in PATH.
        );
 
Last edited:

ondjultomte

Contributor
Joined
Aug 10, 2015
Messages
117
Make sure you're the admin user when you launch rtorrent in screen.

Run this:
id

If it doesn't return 'admin', you're not using the correct user account or /home/admin/.rtorrent.rc doesn't exist.



This one looks like a straight up typo.

rtorrent.rc
is not the same as
.rtorrent.rc



Your webserver user doesn't have /usr/local/bin in $PATH. It's probably missing /usr/bin as well.

You could add it, but here's an easier fix. Edit rutorrent/conf/config.php and update these lines:

Code:
        $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"  => '/usr/bin/gzip',             // Something like /usr/bin/gzip. If empty, will be found in PATH.
                "id"    => '/usr/bin/id',               // Something like /usr/bin/id. If empty, will be found in PATH.
                "stat"  => '/usr/bin/stat',             // Something like /usr/bin/stat. If empty, will be found in PATH.
        );
Thanks for reply but I solved all issue long ago.
I will remove this jail and do the install all over again soon tho. Moving from esxi to bare metall

Skickat från min HTC One via Tapatalk
 

Thadius Miller

Dabbler
Joined
Feb 19, 2015
Messages
15
Been a bit lax updating with the tweaks to fix rutorrent plugins. Apologies.

Lets start to fix that right now. :>

You'll probably notice that the 'geoip' plugin isn't working. You can check by clicking the Active filter in rutorrent, selecting any torrent, and then clicking the Peers tab.

Not working: The first column will be "IP"
Half-way working: The first column will be "Country", but all will have a ? flag and say "Unknown"
Working: The first column will be "Country" and it'll have the proper flag.

So lets fix it. Start as the root user (or use sudo if you prefer).

Navigate to your plugins folder.

Code:
cd /usr/local/www/rutorrent-users/yourusernamehere/rutorrent/plugins/
cd geoip/


If you can cd into plugins but not geoip, then you're missing the plugin entirely. Go download it. If you can cd into geoip and you see several files owned by your user, then proceed.

Now lets install the pre-reqs.

Code:
pkg install GeoIP
pkg install pecl-geoip


Got it? Great. Now lets find your php config.

Code:
locate php.ini


Yours is probably at /usr/local/etc/php.ini

Open it in nano or your text editor of choice. Add the following line, save, and exit.

Code:
extension=geoip.so


Now lets restart php-fpm and lighttpd to let the change take effect.

Code:
service php-fpm restart
service lighttpd restart


Refresh your rutorrent page. You should now see the "half-way working" symptom above. If you still don't see the column, then you've probably manually unloaded the plugin in rutorrent "plugins" tab or the plugin files are not readable by the web server user (permissions).

You're going to see the "? flag" and Unknown because you don't have a GeoIP database for it to lookup the ip in yet. Lets grab one.

EXIT ROOT NOW. USE YOUR MAIN RUTORRENT USER FOR THESE STEPS.

Code:
cd /usr/local/share/GeoIP
wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip -fk GeoIP.dat.gz


You should now have a GeoIP.dat file. Reload rutorrent and all should be 100% functional.

Lastly, we want the database to be updated automagically for us, right? Lets crontab it as a job.

Code:
crontab -e


Enter this info. If you're not familiar with vi, now's the time to bone up.

Code:
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin
#       Order of crontab fields
#       min     hour    mday    month   wday    command
        0       3       *       *       *       cd /usr/local/share/GeoIP && wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
        5       3       *       *       *       cd /usr/local/share/GeoIP && gunzip -fk GeoIP.dat.gz


Voila. :>
 

NigelNoFriends

Explorer
Joined
Mar 29, 2016
Messages
56
Make sure your rTorrent user is the owner of the plugin folder.

Code:
chown -R rtorrentUser /usr/local/www/rutorrent/plugins


The 403 Forbidden errors mean you probably mixed up something between steps 11 and 13.


I'm get a 404 error in the 'Log' tab of the ruTorrent webUI - I tried your fix, but no luck. Any suggestions? Cheers.

Code:
[08.07.2016 00:17:24] WebUI started.
[08.07.2016 00:17:24] Bad response from server: (404 [error,list]) <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>404 - Not Found</title> </head> <body> <h1>404 - Not Found</h1> </body> </html>
 
Status
Not open for further replies.
Top