Difference between revisions of "How to use rTorrent"

From WikiDLXTV
Jump to: navigation, search
m (Added a note at the end of "Highly Recommended Configuration Changes" section with some suggestions with my personal experience at configuring and tuning the rtorrent client on the WDLXTV box.)
(Pausing Problem I always get when rtorrent tries to move completed files from .incomplete->finished. Just thought people ought to know what to do.)
Line 151: Line 151:
 
* In the web frontend, click on the "rtorrent" link again.  Click "start rtorrent".
 
* In the web frontend, click on the "rtorrent" link again.  Click "start rtorrent".
 
* It may take a while for rTorrent to re-check all of your existing downloads (you can tell this is the case if the status of the file in rtorrent is "checking").  After this is done, though, you should see a 10x to 100x improvement in download speeds.
 
* It may take a while for rTorrent to re-check all of your existing downloads (you can tell this is the case if the status of the file in rtorrent is "checking").  After this is done, though, you should see a 10x to 100x improvement in download speeds.
 +
 +
== Infinite Pausing ==
 +
Sometimes after a torrent completes downloading, or after rtorrent just starts after reboot, you may find that certain specified torrents are  always stuck in the state of "Pausing". This problem may also occur when asked to "Force Recheck".
 +
 +
This is problem is caused by the torrent file being saved in a different location to where rtorrent is currently checking. This is often caused by rtorrent either failing to move a complete torrent from the '.incomplete' directory to the 'finished' directory, or because you (yes - you!) specified it to move the complete torrent to a different location in the /conf/rtorrent.rc at some point in the past.
 +
 +
This comes down to two solutions:
 +
===To rectify bad config:===
 +
If bad config isn't your problem, you can skip to next part.
 +
# ssh into the box, and edit the config file via "nano /conf/rtorrent.rc".
 +
# Scroll down to the line below '#Move completed torrents', and check that the final part reads:
 +
'' d.set_directory=/tmp/rt/rtorrent/finished/"  ''
 +
# Save (Ctrl+O, Enter), and exit ("exit"), and this configuration shall hold for all future reboots.
 +
 +
===To rectify Pausing problem===
 +
# Go to Webend.
 +
# Start rtorrent (check plugins on side panel if not started)
 +
# Find specified torrent (i.e. the torrent that is pausing forever and not checking).
 +
# Left-click on specified torrent and look at the bottom panel in rtorrent.
 +
# Click on the 'General' tab and scroll down until you see the 'Save as:' line, and note where rtorrent is checking for the missing folder.
 +
# With rtorrent still open, open up the file manager in webend.
 +
# Navigate to: /tmp/mnt/rt/finished/, and check to see if your torrent is there.
 +
# Check the filesize of the file (click 'show' on the right hand side of filename)
 +
# Navigate to: /tmp/mnt/rt/.incomplete/, and check to see if your torrent is there.
 +
# Check the filesize of the file (if it's there)
 +
# Chances are that if you have the file in both of those two locations, that one of them is  ~ 4kb, and the other is much, much larger.
 +
# Note the directory of the much, much larger file.
 +
# Go back into rtorrent
 +
# Right-Click on specified torrent ->  Save to...
 +
# Type in directory of where the file actually is. (This should be either "/tmp/mnt/rt/finished/" or "/tmp/mnt/rt/.incomplete/"
 +
# IMPORTANT STEP: Make sure that the "Move Data" box is UNCHECKED. Click Ok.
 +
# Right-click on torrent again -> Force Recheck...
 +
# Rtorrent should start checking the file.

Revision as of 07:10, 22 May 2011

rTorrent is a BitTorrent client for the WD TV. It will download torrents any time your WD TV is on, so if you leave it on even when you are not watching TV it will continue downloading torrents in the background.


Installation

As of firmware version 4.2.1, rTorrent is included in the base package. However, you will need to do a few things in order to configure it properly.

Prepare the Torrent Drive

  • On the hard drive that you will store your torrents on, create an empty file named '.mnt' in the root of the drive.
  • Also in the root of that drive, create a folder called "rtorrent".
  • Reboot your WD TV.
  • The drive should now be mounted in the directory /tmp/mnt with a name like B0BE-456Y77 - it will be a random combination of capital letters and numbers. Find out what this is by either ssh'ing or telneting into your box and looking for it under /tmp/mnt, or from the file manager in webend look for it in /tmp/mnt. If you have multiple drives connected to your computer, you will see multiple mounted directories. In this case, you will need to look inside each of those folders to determine which one is your hard drive.
  • Save this information for the next step.
  • telnet or ssh into your WD TV and set the permissions on the rtorrent folder so that it is writable. Do this using the command below. In this example, the drive was mounted at /tmp/mnt/ABC123-XYZ.
 chmod 777 /tmp/mnt/ABC123-XYZ


Editing your configuration

On the USB key that you used to install b-rad's firmware, edit the file S00-custom-options. Make the following changes:

  • Uncomment this line:
 config_tool -c RTORRENT=ON
  • Uncomment this line:
 config_tool -c RTORRENT_DIR=/tmp/mnt/123ed956-1256-4825-9e79-86fc1e0febaa/
  • On that last line change everything after /tmp/mnt to the name of the folder that your drive is mounted on (using the folder name you found in the last step). For example:
 config_tool -c RTORRENT_DIR=/tmp/mnt/ABC123-XYZ
  • Ensure that the firmware and the S00-custom-options files are both on the USB key. Reboot your WDTV to finalize the changes.

At this point, rTorrent should be working. You will need to make one final change through the web interface the first time you use it as detailed below.

NOTE: Many ISPs now try to block torrent traffic which will result in very slow downloads. If this occurs, see the "Troubleshooting" section below.


Using rTorrent

Once rTorrent is running, you can access it through the WDTV web interface. If you know the IP address that is assigned to your WDTV, you can get there by just typing that IP address into a web browser. If you do not know the IP address of your WDTV, the best thing to do is assign one as per the instructions in the "assigning your WDTV a static IP address" section in the port forwarding guide .

Unless you have changed it, the default username and password for web frontend is "wdlxtv/wdlxtv".


Logging In To rTorrent The First Time

Once you have logged in, ensure that rtorrent is running. If it is, you will see an rTorrent icon on the screen. In small print below it, you will see a link that says "[config]". Click on this link.

On the screen that pops up, you are asked for the rtorrent data path. Enter the path to your hard drive. In the example above, this would be /tmp/mnt/ABC123-XYZ. Then click "save configuration" and close the popup window. rTorrent is now ready to receive torrents.


Highly Recommended Configuration Changes

While the changes in this section aren't strictly necessary, they will greatly increase the performance of rTorrent and, most importantly, keep it from crashing. Click on the "settings" icon in the web interface (the orange gear) and change the following for each of the items in the left-hand navigation of the popup window that appears.

  • General: click "Ignore messages about timeouts".
  • Downloads: set number of upload slots to 3
  • Connection:
    • Global Maximum Upload Rate: 100
    • Global Maximum Download Rate: 1000 (note: if your WDTV frequently crashes, set this to a lower value)

Note: aforementioned options may be set on the fly on your rtorrent client clicking the Settings button. They will become active immediately. Unfortunately at the next reboot you will loose such customizations unless you ssh/telnet your wdlxtv box and edit the /conf/rtorrent.rc file.

Basic Operation

All operations of rTorrent take place through the web interface. To use this, click on the rTorrent icon in the web frontend (not the [config] link you clicked above).


Adding New Torrents

Click the "Add Torrent" icon in the upper-left corner of rTorrent and enter the following information:

  • Directory: this is where your downloaded file will be saved on your WDTV. Unless you choose a different directory, it will be saved on your hard drive in the /rtorrent directory.
  • Torrent File: If you have already downloaded the torrent file to your computer, click the "choose file" button here and navigate to the torrent file. After you choose the file using your computer's file browser, click the "Add File" button in rTorrent.
  • Torrent URL: if you have not yet downloaded the torrent file to your computer, you can type the URL to the torrent file here and then click "add url".

Download Only Some Files In A Torrent

Sometimes you may only want to download particular files in a torrent and not every file. To do this, start downloading the torrent and then double-click on the name of the torrent in the main rTorrent screen. In the bottom section of the screen, click on the "files" tab. You should now see all of the files in the torrent. All files are downloaded by default.

To prevent a file from being downloaded, right click on the file, hover over the "Priority" menu, and click "Don't Download". To do this with multiple files at once, shift-click on all the files that you don't want to download, then right-click on the group and follow the steps above.

Monitor Downloads

The main screen of rTorrent will show all of your active downloads. The icon to the left of each torrent shows its current state (the key for these icons is in the left navigation pane). Most importantly, blue means the torrent is downloading, green means it is completed, and red means there is a problem downloading the torrent.

If you look to the right of each torrent name, you can also see the total size of the torrent, the percentage completed, the total amount downloaded, the download and upload speeds of the torrent, as well as other useful information. If you want to get more detailed information about the status of a download, double-click on the torrent you are interested in. Clicking the "speed" tab in the lower pane will show a graph over time of your upload and download speeds for that torrent.

Your total upload and download speeds are listed at the very bottom of the window next to the green up arrow and blue down arrow, respectively.

Completed Downloads

Once downloads are completed, they are moved to the /rtorrent/finished folder on your hard drive. It is recommended that you move completed downloads into your main movie, music or photo folders and then remove the torrent using the instructions below.

Automatic unpack torrents when finished

If it is desired to use the auto unpack feature in ruTorrent, it is necessary to eliminate the auto moval from /.incomplete folder to /finished folder. This can be done in the rtorrent.rc file.

Pause or Stop a download

Right click on the torrent file (or shift-click on multiple torrent files and then right-click). Select "Pause" or "Stop" from the popup menu.

Removing A Torrent

If you are done downloading a torrent you can remove it from the list of active torrents. This will prevent it from being uploaded anymore, thus using less system resources. To do this, right-click the torrent and choose "Remove". This will not delete the files from your computer; it will only remove the torrent from the list.

If you wish to delete the downloaded files, then right-click the torrent, choose "Remove and", then click "delete data."


Advanced Operation

Change Download Priority

Because there is limited bandwidth that you can use for torrents, you may want to give some torrents higher priority than others when downloading. To do this, right-click on the torrent, select the "Priority" Menu, then choose the appropriate priority for the torrent.

Setting Up A Download Schedule

If you find that rTorrent is either slowing down your WDTV or is slowing down the other computers on your network, you can set up a schedule so that it will only use certain amounts of bandwidth during certain hours of the day. This is especially useful if you leave your WDTV on 24/7 while using rTorrent.

To use this feature, click the "Scheduler" link in the Settings menu. Click the "enable scheduler" checkbox. You will see a grid showing all the days of the week, and each hour of each day. Click a cell in the grid to change the bandwidth usage for that particular hour. The options are:

  • Unlimited: This is the default. Allow any amount of upload & download traffic. It is unclear whether this is subject to the global "maximum upload" and "maximum download" settings. If you find that this is crashing your WDTV, do not use this option.
  • Turn Off: Don't download during this time.
  • Limited 1/2/3: You can set custom upload and download maximums for these three slots using the text fields directly below the scheduler, effectively giving you three different "profiles" of bandwidth usage in addition to completely on or completely off.
  • Seeding only: Only allow uploads of completed files. Not advisable on the WDTV.


Shutting Off Your WDTV

When you put your WDTV in standby mode or turn off power to it completely, all torrents will stop downloading. However, as with any torrent client rTorrent will resume downloading the files once you turn the WDTV back on. Note, however, that it can take the WDTV a long time to re-check the files after reboot. For this reason, it is best to leave your WDTV turned on even when you are not watching it and just turning off your TV. This way, rTorrent can continue to download files even when you are not actively watching it.

Troubleshooting

Torrents Not Downloading

If your torrents aren't downloading at all, your router may not know how to route traffic to your WD TV properly. If this is the case, you can forward torrent traffic to your WDTV .

Speed Up Torrent Downloads

Many ISPs now slow down torrent traffic to the point of unusability. Specifically, once they see torrent files start to download on your computer, they will drop that connection.

If rTorrent seems to be sending uploads quickly but downloads are very slow, then this is likely the issue. The way to get around this is to encrypt your torrent traffic using the following steps.

  • Log into the WDTV web frontend. Click the "rtorrent" link in the left-hand navigation. Click "stop rtorrent".
  • On your WDTV, edit the file /conf/rtorrent.rc. You can do this either by logging into the WDTV using SSH or Telnet and editing using vi or Nano, or you can download the file to your computer from the "file manager" in the web frontend, make the changes using a text editor, and re-uploading the file.
  • Add the following line to the file:
 encryption = allow_incoming,try_outgoing,require,require_RC4,enable_retry
  • In the web frontend, click on the "rtorrent" link again. Click "start rtorrent".
  • It may take a while for rTorrent to re-check all of your existing downloads (you can tell this is the case if the status of the file in rtorrent is "checking"). After this is done, though, you should see a 10x to 100x improvement in download speeds.

Infinite Pausing

Sometimes after a torrent completes downloading, or after rtorrent just starts after reboot, you may find that certain specified torrents are always stuck in the state of "Pausing". This problem may also occur when asked to "Force Recheck".

This is problem is caused by the torrent file being saved in a different location to where rtorrent is currently checking. This is often caused by rtorrent either failing to move a complete torrent from the '.incomplete' directory to the 'finished' directory, or because you (yes - you!) specified it to move the complete torrent to a different location in the /conf/rtorrent.rc at some point in the past.

This comes down to two solutions:

To rectify bad config:

If bad config isn't your problem, you can skip to next part.

  1. ssh into the box, and edit the config file via "nano /conf/rtorrent.rc".
  2. Scroll down to the line below '#Move completed torrents', and check that the final part reads:

d.set_directory=/tmp/rt/rtorrent/finished/"

  1. Save (Ctrl+O, Enter), and exit ("exit"), and this configuration shall hold for all future reboots.

To rectify Pausing problem

  1. Go to Webend.
  2. Start rtorrent (check plugins on side panel if not started)
  3. Find specified torrent (i.e. the torrent that is pausing forever and not checking).
  4. Left-click on specified torrent and look at the bottom panel in rtorrent.
  5. Click on the 'General' tab and scroll down until you see the 'Save as:' line, and note where rtorrent is checking for the missing folder.
  6. With rtorrent still open, open up the file manager in webend.
  7. Navigate to: /tmp/mnt/rt/finished/, and check to see if your torrent is there.
  8. Check the filesize of the file (click 'show' on the right hand side of filename)
  9. Navigate to: /tmp/mnt/rt/.incomplete/, and check to see if your torrent is there.
  10. Check the filesize of the file (if it's there)
  11. Chances are that if you have the file in both of those two locations, that one of them is ~ 4kb, and the other is much, much larger.
  12. Note the directory of the much, much larger file.
  13. Go back into rtorrent
  14. Right-Click on specified torrent -> Save to...
  15. Type in directory of where the file actually is. (This should be either "/tmp/mnt/rt/finished/" or "/tmp/mnt/rt/.incomplete/"
  16. IMPORTANT STEP: Make sure that the "Move Data" box is UNCHECKED. Click Ok.
  17. Right-click on torrent again -> Force Recheck...
  18. Rtorrent should start checking the file.