Rtorrent

From Bytesized Wiki

Jump to: navigation, search

rTorrent is a very powerful and lightweight bittorrent client, that you can run right off your shell, combine it with your regular SSH dose to Bytesized-Hosting. ruTorrent is NOT a client, it is only a rTorrent frontend (webui if you like).

Contents

rTorrent explained

rTorrent is command line bittorent client. It is started and managed in terminal via command line. Common noob mistake is referring to rTorrent as ruTorrent. ruTorrent is WEBUI for rTorrent.

Basic rTorrent usage

  • You can read all the documentation for rTorrent by with the command:
man rtorrent

Explanation of rTorrent UI

  • The main page is comprised of a listing of all your torrents, you can select a torrent with the up/down keys

s5WUw.png

  • The status bar at the bottom gives overall information

bu7dS.png

Useful commands

BACKSPACE : open a torrent file and start it
RETURN : open a torrent file without starting it
CTRL-s : start a torrent
CTRL-d : stop a torrent / remove a stopped torrent (only press CTRL-D once if you only want to stop a torrent!)
CTRL-k : close a torrent
CTRL-o : change a torrent destination directory (can only been used on torrents closed with CTRL-K)
CTRL-r : force a hash check
right/left : navigate a torrent hierachy (right to see more information for a torrent)

Common problems and solutions

CTRL-s and CTRL-q don’t work!

You can use them by first pressing CTRL-a-f and then using either CTRL-q or CTRL-s.

  • If you used this, and they still don’t work, you can then use CTRL-a s and CTRL-a q to send the CTRL-s and CTRL-q signals.
  • If you need any help, visit us on irc chat.

ruTorrent frontend

We must emphasize that ruTorrent is not a bittorrent client but merely a frontend. That means that you cannot start, restart, stop ruTorrent. That means that most problems with the torrents itself are an issue with rtorrent. Connection between rtorrent and rutorrent is a different matter and here we will try to cover most problems and offer solutions.

Our setup

On the dashboard you will see a line that says "Webui-port". To connect to ruTorrent you need to use a port 2 higher then written there (or use a link from the dashboard if your default client is rtorrent). To login to ruTorrent you must use username and password provided on the dashboard(case sensitive).

Bad link 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

When this is shown when you load ruTorrent that means that either rtorrent is not active or that it locked itself. To rectife this you can use a "Reboot Box" from a box dashboard. Wait for 20 seconds and then try reloading the page. If it still persists that means rtorrent needs to be killed manually. Login via SSH or VNC(and open lxterminal). Type:

killall rtorrent

This command will try to shutdown rtorrent gracefully. Wait for 20-30 seconds depending on how many torrents you have. Next, try to start rtorrent again

screen -dmSf rtorrent rtorrent

If you it startsup normally, reload your ruTorrent and it should start working. If it says "screen terminating", try starting rtorrent with command

rtorrent
  • It will probably give you the following error: "rtorrent: Could not open/bind port for listening: Address already in use". Then you need to kill the rtorrent:
killall -9 rtorrent
  • If you get an error "rtorrent: Could not lock session directory: "~/.session/""

navigate to the session directory:

cd ~/.session

and then delete the lock file

rm -f rtorrent.lock
  • If you get "rtorrent: Invalid DHT cache." navigate to the session directory:

navigate to the session directory:

cd ~/.session

and then delete the dht lock file

rm  rtorrent.dht_cache

Start it up again with the screen command from above and that will do the trick.

Bad response from server: 502 Bad Gateway

When this happens you need to do the following steps:

Make sure that in .bashrc file line: export USER_CLIENT=rtorrent exists. SSH or VNC(and open lxterminal) and type:

nano .bashrc

scroll down and make sure that line exists. If it doesn't exist or has one of the other clients change it, save the changes(CTRL O, YES, ENTER) and then type:

source .bashrc

Next thing you need to do is:

killall -9 php-cgi

Wait for approx. a minute and then reload the rutorrent(you might also want to restart rtorrent too).

Installing rutorrent plugins

No additional plugins can be installed on managed boxes since we need to keep everything managable, quick and easy to use. More plugins can make rutorrent even slower than it already is and can create additional security issues. We feel that we offer most if not all functionality of rutorrent plugins via VNC and command line programs.

Personal tools