Difference between revisions of "Transmission BitTorrent Client"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(Links and Reference)
m (just a quick edit on the troubleshooting section that fixes transmission freezing/crashing on several NAS'es (my edit account is new, but ive been a passive member here for years))
 
(24 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
{{Template:Articles|Software|Filesharing|Howto}}
 
{{Template:Articles|Software|Filesharing|Howto}}
[[Image:Screenshot-Transmission-Web-Interface2.png|400px|right|Caption Transmission WebUI]]
+
[[Image:Screenshot-Transmission-Web-Interface2.png|430px|right|Caption Transmission WebUI]]
  
 
==What is Transmission?==
 
==What is Transmission?==
Line 6: Line 6:
  
 
==Compiling and Installation==
 
==Compiling and Installation==
 +
===General Info===
 
The [http://trac.transmissionbt.com/wiki/Building Transmission Wiki Howto Build] page gives details.  In short, three binaries are created:
 
The [http://trac.transmissionbt.com/wiki/Building Transmission Wiki Howto Build] page gives details.  In short, three binaries are created:
 
*transmission-daemon (daemon which runs with the webUI active)
 
*transmission-daemon (daemon which runs with the webUI active)
 
*transmission-remote (a remote control utility for transmission-daemon and transmission), and  
 
*transmission-remote (a remote control utility for transmission-daemon and transmission), and  
 
*transmissioncli (the bittorrent client).
 
*transmissioncli (the bittorrent client).
The Transmission wiki also provides an initscript, but it is likely that you will want to modify that script.
+
 
 +
 
 +
 
  
 
'''Note:'''[http://buffalo.nas-central.org/forums/viewtopic.php?p=95076#p95076 A Forum user has reported] that the version in the optware feed gives segfaults when installed in his open stock linkstation pro, following the instructions on transmissions site for compiling should be the best approach.
 
'''Note:'''[http://buffalo.nas-central.org/forums/viewtopic.php?p=95076#p95076 A Forum user has reported] that the version in the optware feed gives segfaults when installed in his open stock linkstation pro, following the instructions on transmissions site for compiling should be the best approach.
 +
 +
 +
===Building in Lenny===
 +
This is a headless build - we don't need the GTK+ stuff.  (Directions tested in Lenny armel - seeking someone to confirm this works from a fresh install- please report any missing dependencies to the thread).
 +
 +
'''Satisfy dependencies''':
 +
apt-get install libcurl3-openssl-dev gettext libtool intltool openssl libcurl3
 +
A lot of other packages (like glib) will be pulled down as well.
 +
 +
'''Get the source''' and download it to /usr/src  (check for newer source!):
 +
cd /usr/src
 +
wget http://mirrors.m0k.org/transmission/files/transmission-1.34.tar.bz2
 +
tar xjvf transmission-1.34.tar.bz2
 +
cd transmission-1.34
 +
 +
'''Configure, build and install''':
 +
./configure
 +
make
 +
make install
 +
 +
'''Set up a torrent dir''' in one of your shared dirs.  I use NFS and /mnt/torrrents.
 +
mkdir -p /mnt/torrents
 +
 +
You may want/have to adjust permissions.  Different security tolerances will dictate how you personally deal w/ users and permissions.  The Transmission wiki has some good suggestions.
 +
 +
'''Test/start''' transmission-daemon:
 +
transmission-daemon
 +
Point your browser to http://<IP of your LinkStation>:9091  to test if the webUI is up and running.
 +
 +
'''Initscript''':
 +
This is extremely basic, but works.  Install it at /etc/init.d/transmission .  Tested improvements are welcome.  If you have any particular changes that require special permissions, please put them on the Talk pages (see top) and make a note of so it is easy for user to find them.
 +
 +
#! /bin/sh
 +
#
 +
# This is a very basic init script for Transmission
 +
# Copy it to /etc/init.d/transmission and type
 +
# > update-rc.d transmission defaults 60
 +
#
 +
#
 +
 +
 +
 +
# Exit if the package is not installed
 +
test -f /usr/local/bin/transmission-daemon || exit 0
 +
 +
 +
 +
case "$1" in
 +
  start)
 +
    echo  "Starting transmission-daemon"
 +
    /sbin/start-stop-daemon --start --quiet --exec /usr/local/bin/transmission-daemon
 +
    ;;
 +
  stop)
 +
    echo  "Stopping transmission-daemon"
 +
    /sbin/start-stop-daemon --stop --quiet --exec /usr/local/bin/transmission-daemon
 +
    ;;
 +
  restart)
 +
    echo -n "Stopping transmission-daemon"
 +
    /sbin/start-stop-daemon --stop --quiet --exec /usr/local/bin/transmission-daemon
 +
    for i in 1 2 3 ;
 +
    do
 +
        sleep 1
 +
        echo -n "."
 +
    done
 +
    echo  "Restarting transmission-daemon"
 +
    /sbin/start-stop-daemon --start --quiet --exec /usr/local/bin/transmission-daemon
 +
    ;;
 +
  *)
 +
    echo "Usage: /etc/init.d/tranmission {start|stop|restart}"
 +
    exit 1
 +
esac
 +
 +
exit 0
 +
 +
 +
Make it executable, and add symlinks:
 +
chmod a=r+w+x /etc/init.d/transmission
 +
update-rc.d transmission defaults 60
 +
 +
Note: If you want some security (always a good idea) for your web interface you can replace the lines
 +
 +
<pre>
 +
/sbin/start-stop-daemon --start --quiet --exec /usr/local/bin/transmission-daemon
 +
</pre>
 +
 +
in the above script with
 +
 +
<pre>
 +
/sbin/start-stop-daemon --start --quiet --exec /usr/local/bin/transmission-daemon -- -t -u <username> -v <password>
 +
</pre>
 +
 +
===Building in Lenny - Transmission 1.82===
 +
Same as the Lenny instructions, but best to call configure with:
 +
<pre>
 +
/configure --disable-gtk --disable-mac --disable-nls
 +
</pre>
 +
 +
This removes the dependency on gettext and intltool which massively reduces the number of packages you need to install and won't attempt to build the GUIs (It'd probably be auto-detected, but better safe than sorry!).
 +
 +
===Building in etch===
 +
Same as the Lenny instructions, however libcurl3 is too old in etch and therefor you will need to compile this yourself.
 +
 +
'''Install lib-curl 7.16.3 ''':
 +
wget http://curl.haxx.se/download/curl-7.16.3.tar.gz
 +
tar xvzf curl-7.16.3.tar.gz
 +
cd curl-7.16.3
 +
./configure
 +
make
 +
make install
 +
 +
 +
'''Satisfy dependencies''':
 +
apt-get install gettext libtool intltool openssl
 +
 +
 +
The rest is the same as the Lenny instructions.
 +
 +
 +
 +
===Building in Gentoo===
 +
stonie posted a thread about how he installed it on Gentoo here : [http://buffalo.nas-central.org/forums/viewtopic.php?f=41&t=13791&start=0&st=0&sk=t&sd=a Transmission in Gentoo-PPC].  Read it for details.
  
 
==Configuration==
 
==Configuration==
 
===Network Configuration===
 
===Network Configuration===
 
*You will probably want to set your LinkStation to a static IP.
 
*You will probably want to set your LinkStation to a static IP.
*Port forwarding is a good idea/pretty much essential.  Transmission listens on port 51413, by default. The Transmission wiki has an excellent [http://trac.transmissionbt.com/wiki/PortForwardingGuide Port Forwarding HowTo] that spells out pretty much everything.  It is comprehensive and gives many good pointers, including the [http://trac.transmissionbt.com/wiki/PortForwardingGuide#Verify Verify] and [http://trac.transmissionbt.com/wiki/PortForwardingGuide#CommonProblems Common Problems] sections.
+
*'''Port forwarding''' is a good idea/pretty much essential.  Transmission listens on port 51413, by default. The Transmission wiki has an excellent [http://trac.transmissionbt.com/wiki/PortForwardingGuide Port Forwarding HowTo] that spells out pretty much everything.  It is comprehensive and gives many good pointers, including the [http://trac.transmissionbt.com/wiki/PortForwardingGuide#Verify Verify] and [http://trac.transmissionbt.com/wiki/PortForwardingGuide#CommonProblems Common Problems] sections.
 +
*Verify your network setup by checking that port 51413 is open at your IP, by using the tool at [http://www.canyouseeme.org/ CanYouSeeMe.org].
  
 
===Configure Transmission===
 
===Configure Transmission===
Use the WebUI, which you can see through any modern browser at http://<your-Linkstation's-IP>:9091/transmission/web/  or http://<your-Linkstation's-IP>:9091 .  In the bottom left-hand corner there is a small tab that allows you to set preferences and.  Choose a torrent directory by specifying Preferences-> Download To: . Many users will choose /mnt or /mnt2, or some subdirectory thereof.  You can also set upload and download limits there.
+
Use the WebUI, which you can see through any modern browser at http://<your-Linkstation's-IP>:9091/transmission/web/  or http://<your-Linkstation's-IP>:9091.  In the bottom left-hand corner there is a small tab that allows you to set:
 +
*Preferences
 +
**Add transfers:  Download to(choose /mnt/torrents or whatever dir you want here)
 +
**Network: Incoming TCP Port:  (default is 51413)
 +
**Transfers: Start transfers when added
 +
**Encryption: Ignore unencrypted peers
 +
**Limit total bandwidth:  (set these lower if you experience network performance problems)
 +
***Download Rate: KB/s
 +
***Upload Rate: KB/s
 +
**Web Client: Refresh Rate:
 +
*Total Upload/Download Rates
 +
*Sorting
 +
There is also a Inspector function w/ Info and Activity buttons on the webUI that allows for seeing details about your torrents.
  
 
==Usage==
 
==Usage==
Line 39: Line 176:
 
After executing this you should have a file called vmlinuz92608foonasem.torrent, which is suitable for uploading to a torrrent tracker site.
 
After executing this you should have a file called vmlinuz92608foonasem.torrent, which is suitable for uploading to a torrrent tracker site.
  
===== Upload to torrent tracker/site =====
+
===== Upload to torrent tracker/site and Seeding =====
This will vary by tracker site.  The FAQ or HowTo section at the tracker will provide details.
+
This will vary by tracker site.  The FAQ or HowTo section at the tracker will provide details. Basically, you upload your initial torrent file through your browser to the tracker site.  It will then register that torrent, give it an ID number, and post it in the torrent list.
 +
 
 +
'''To seed it''', download the registered torrent file (important - you  '''must'''  download a  '''registered''' torrent file to seed - for the majority of trackers, '''only a registered torrent file''' will allow you to seed), place it in your torrents directory, and use Transmission's webUI to open it.  It will scan the source file that is to be shared and verify it.  If successful it should then display something like this in the info panel to the right of the torrent listings:
 +
Information
 +
Tracker:  http://linuxtracker.org:2710/cecf6b59f1ba527975b8fa29289040c6/announce
 +
Hash: a08f27383af3d7726cfdea14005944e5bf510abe
 +
Secure: Public Torrent
 +
Comment: N/A
  
 
===== Checking =====
 
===== Checking =====
 +
Ideally, this works best to get a friend to try to download the torrent file from the tracker, and use some torrent client to download the actual shared file.  You should be able to see upload activity on the webUI of Transmission from your LinkStation.  In all likelihood you will not be able to download your own shared file.
 +
 +
  
 
==Troubleshooting==
 
==Troubleshooting==
 
*'''The torrent that I'm trying to seed reads ''"Unregistered Torrent"''.'''  Normally, this problem is because you are trying to seed w/ your original torrent file.  The fix for this is usually to upload your raw torrent file to the tracker of your choice, and then download it to your torrent dir.  Then open it w/ Transmission and it should proceed as expected.
 
*'''The torrent that I'm trying to seed reads ''"Unregistered Torrent"''.'''  Normally, this problem is because you are trying to seed w/ your original torrent file.  The fix for this is usually to upload your raw torrent file to the tracker of your choice, and then download it to your torrent dir.  Then open it w/ Transmission and it should proceed as expected.
*'''My torrent is registered, but seeding doesn't seem to work, even if I know someone is trying to download the file.'''  This could be a port forwarding problem. The easy but really (stupidly) insecure way is to put your box on a DMZ, but this is way too risky in terms of network security.  It is better to make sure you have port forwarding set up for port 51413 (TCP, port start:51413, port end:51413, port map: 51413).
+
*'''My torrent is registered, but seeding doesn't seem to work, because I know someone is trying to download the file and it isn't working on their end.'''  This could be a port forwarding problem. The easy but really (stupidly) insecure way is to put your box on a DMZ, but this is way too risky in terms of network security.  It is better to make sure you have port forwarding set up for port 51413 (TCP, port start:51413, port end:51413, port map: 51413). See the Port Forwarding section of the Transmission wiki listed above, or the PortForwarding.com reference listed below.
 +
*'''Transmission keeps on crashing after 10 minutes or so even if no torrent is loaded.  I can't connect via RPC or webUI'''  This problem for the most part has been fix but still may occur with some NASes (LSPro v1, etc). The solution is to disable libevent's use of epoll: EVENT_NOEPOLL=1; export EVENT_NOEPOLL.  The easiest way to fix this would be to add this code at the top of your transmission startup script:
 +
#!/bin/bash
 +
export EVENT_NOEPOLL=1
  
 
==Links and Reference==
 
==Links and Reference==
 
* [http://buffalo.nas-central.org/forums/viewtopic.php?f=32&t=12941&start=0&st=0&sk=t&sd=a Forum thread on Transmission]
 
* [http://buffalo.nas-central.org/forums/viewtopic.php?f=32&t=12941&start=0&st=0&sk=t&sd=a Forum thread on Transmission]
 +
* [http://buffalo.nas-central.org/forums/viewtopic.php?f=41&t=13791&start=0&st=0&sk=t&sd=a Forum thread on Transmission & Gentoo]
 
* Official [http://trac.transmissionbt.com/wiki Transmission wiki] and [http://www.transmissionbt.com/community.php forum, IRC and community]
 
* Official [http://trac.transmissionbt.com/wiki Transmission wiki] and [http://www.transmissionbt.com/community.php forum, IRC and community]
 
* Port Forwarding Help [http://portforward.com/default.htm portforward.com] see the ''Guides'' section
 
* Port Forwarding Help [http://portforward.com/default.htm portforward.com] see the ''Guides'' section

Latest revision as of 20:01, 20 December 2010

Caption Transmission WebUI

Contents

What is Transmission?

Transmission is a BitTorrent client package that (as of version 1.34) also contains Clutch, an integrated webUI. It easy to compile, install, configure and operate, and it has relatively low memory and cpu usage.

Compiling and Installation

General Info

The Transmission Wiki Howto Build page gives details. In short, three binaries are created:

  • transmission-daemon (daemon which runs with the webUI active)
  • transmission-remote (a remote control utility for transmission-daemon and transmission), and
  • transmissioncli (the bittorrent client).



Note:A Forum user has reported that the version in the optware feed gives segfaults when installed in his open stock linkstation pro, following the instructions on transmissions site for compiling should be the best approach.


Building in Lenny

This is a headless build - we don't need the GTK+ stuff. (Directions tested in Lenny armel - seeking someone to confirm this works from a fresh install- please report any missing dependencies to the thread).

Satisfy dependencies:

apt-get install libcurl3-openssl-dev gettext libtool intltool openssl libcurl3

A lot of other packages (like glib) will be pulled down as well.

Get the source and download it to /usr/src (check for newer source!):

cd /usr/src
wget http://mirrors.m0k.org/transmission/files/transmission-1.34.tar.bz2
tar xjvf transmission-1.34.tar.bz2
cd transmission-1.34

Configure, build and install:

./configure
make
make install

Set up a torrent dir in one of your shared dirs. I use NFS and /mnt/torrrents.

mkdir -p /mnt/torrents

You may want/have to adjust permissions. Different security tolerances will dictate how you personally deal w/ users and permissions. The Transmission wiki has some good suggestions.

Test/start transmission-daemon:

transmission-daemon

Point your browser to http://<IP of your LinkStation>:9091 to test if the webUI is up and running.

Initscript: This is extremely basic, but works. Install it at /etc/init.d/transmission . Tested improvements are welcome. If you have any particular changes that require special permissions, please put them on the Talk pages (see top) and make a note of so it is easy for user to find them.

#! /bin/sh
#
# This is a very basic init script for Transmission
# Copy it to /etc/init.d/transmission and type
# > update-rc.d transmission defaults 60
#
# 



# Exit if the package is not installed
test -f /usr/local/bin/transmission-daemon || exit 0



case "$1" in
  start)
    echo  "Starting transmission-daemon"
    /sbin/start-stop-daemon --start --quiet --exec /usr/local/bin/transmission-daemon
    ;;
  stop)
    echo  "Stopping transmission-daemon"
    /sbin/start-stop-daemon --stop --quiet --exec /usr/local/bin/transmission-daemon
    ;;
  restart)
    echo -n "Stopping transmission-daemon"
    /sbin/start-stop-daemon --stop --quiet --exec /usr/local/bin/transmission-daemon
    for i in 1 2 3 ;
    do
        sleep 1
        echo -n "."
    done
    echo  "Restarting transmission-daemon" 
    /sbin/start-stop-daemon --start --quiet --exec /usr/local/bin/transmission-daemon
    ;;
  *)
    echo "Usage: /etc/init.d/tranmission {start|stop|restart}"
    exit 1
esac

exit 0

Make it executable, and add symlinks:

chmod a=r+w+x /etc/init.d/transmission
update-rc.d transmission defaults 60

Note: If you want some security (always a good idea) for your web interface you can replace the lines

/sbin/start-stop-daemon --start --quiet --exec /usr/local/bin/transmission-daemon

in the above script with

/sbin/start-stop-daemon --start --quiet --exec /usr/local/bin/transmission-daemon -- -t -u <username> -v <password>

Building in Lenny - Transmission 1.82

Same as the Lenny instructions, but best to call configure with:

/configure --disable-gtk --disable-mac --disable-nls

This removes the dependency on gettext and intltool which massively reduces the number of packages you need to install and won't attempt to build the GUIs (It'd probably be auto-detected, but better safe than sorry!).

Building in etch

Same as the Lenny instructions, however libcurl3 is too old in etch and therefor you will need to compile this yourself.

Install lib-curl 7.16.3 :

wget http://curl.haxx.se/download/curl-7.16.3.tar.gz
tar xvzf curl-7.16.3.tar.gz
cd curl-7.16.3
./configure
make
make install


Satisfy dependencies:

apt-get install gettext libtool intltool openssl


The rest is the same as the Lenny instructions.


Building in Gentoo

stonie posted a thread about how he installed it on Gentoo here : Transmission in Gentoo-PPC. Read it for details.

Configuration

Network Configuration

  • You will probably want to set your LinkStation to a static IP.
  • Port forwarding is a good idea/pretty much essential. Transmission listens on port 51413, by default. The Transmission wiki has an excellent Port Forwarding HowTo that spells out pretty much everything. It is comprehensive and gives many good pointers, including the Verify and Common Problems sections.
  • Verify your network setup by checking that port 51413 is open at your IP, by using the tool at CanYouSeeMe.org.

Configure Transmission

Use the WebUI, which you can see through any modern browser at http://<your-Linkstation's-IP>:9091/transmission/web/ or http://<your-Linkstation's-IP>:9091. In the bottom left-hand corner there is a small tab that allows you to set:

  • Preferences
    • Add transfers: Download to: (choose /mnt/torrents or whatever dir you want here)
    • Network: Incoming TCP Port: (default is 51413)
    • Transfers: Start transfers when added
    • Encryption: Ignore unencrypted peers
    • Limit total bandwidth: (set these lower if you experience network performance problems)
      • Download Rate: KB/s
      • Upload Rate: KB/s
    • Web Client: Refresh Rate:
  • Total Upload/Download Rates
  • Sorting

There is also a Inspector function w/ Info and Activity buttons on the webUI that allows for seeing details about your torrents.

Usage

We assume that you have a general idea of how torrents work, and a familiarity with Torrent Trackers. A particulary good tracker that is germane to our needs is LinuxTracker.org. We will use it here in the examples. Be aware that to upload torrent files, you must have open an account there, as is the case for the vast majority of sites.

man pages for Transmission 1.34

For reference, see these man pages for transmissioncli Transmission 1.34. Note that the commands and options have changed a lot since earlier versions of Transmission, so old scripts may not work for you.

Downloading

  1. Download a torrent file to your LS. This can be done with wget, but is easier using your desktop's web browser, and then dragging and dropping that torrrent file to a mounted share of your LS.
  2. To use the WebUI of Transmission, point your browser to <ip of you linkstation>:9091 - you should see something like the screenshot shown on the top of this page.
  3. Use the Open button to choose & load the torrent file. The download should begin shortly. As is the case w/ torrents, it may be very fast or quite slow, depending on the number of seeders and they upload limits.

Sharing/Uploading

Create a torrent file

Place the file you wish to share in your torrent directory. The command form for creating a new torrent file in Transmission 1.34 is:

transmissioncli -n <file to be shared> -a <URL of torrent announcement> <torrent file filename>

For example, if the file you want to share is vmlinuz92608foonasem.gz, then use the cli binary like this:

transmissioncli -n vmlinuz92608foonasem.gz -a http://linuxtracker.org:2710/announce vmlinuz92608foonasem.torrent

After executing this you should have a file called vmlinuz92608foonasem.torrent, which is suitable for uploading to a torrrent tracker site.

Upload to torrent tracker/site and Seeding

This will vary by tracker site. The FAQ or HowTo section at the tracker will provide details. Basically, you upload your initial torrent file through your browser to the tracker site. It will then register that torrent, give it an ID number, and post it in the torrent list.

To seed it, download the registered torrent file (important - you must download a registered torrent file to seed - for the majority of trackers, only a registered torrent file will allow you to seed), place it in your torrents directory, and use Transmission's webUI to open it. It will scan the source file that is to be shared and verify it. If successful it should then display something like this in the info panel to the right of the torrent listings:

Information
Tracker:  http://linuxtracker.org:2710/cecf6b59f1ba527975b8fa29289040c6/announce
Hash: a08f27383af3d7726cfdea14005944e5bf510abe
Secure: Public Torrent
Comment: N/A
Checking

Ideally, this works best to get a friend to try to download the torrent file from the tracker, and use some torrent client to download the actual shared file. You should be able to see upload activity on the webUI of Transmission from your LinkStation. In all likelihood you will not be able to download your own shared file.


Troubleshooting

  • The torrent that I'm trying to seed reads "Unregistered Torrent". Normally, this problem is because you are trying to seed w/ your original torrent file. The fix for this is usually to upload your raw torrent file to the tracker of your choice, and then download it to your torrent dir. Then open it w/ Transmission and it should proceed as expected.
  • My torrent is registered, but seeding doesn't seem to work, because I know someone is trying to download the file and it isn't working on their end. This could be a port forwarding problem. The easy but really (stupidly) insecure way is to put your box on a DMZ, but this is way too risky in terms of network security. It is better to make sure you have port forwarding set up for port 51413 (TCP, port start:51413, port end:51413, port map: 51413). See the Port Forwarding section of the Transmission wiki listed above, or the PortForwarding.com reference listed below.
  • Transmission keeps on crashing after 10 minutes or so even if no torrent is loaded. I can't connect via RPC or webUI This problem for the most part has been fix but still may occur with some NASes (LSPro v1, etc). The solution is to disable libevent's use of epoll: EVENT_NOEPOLL=1; export EVENT_NOEPOLL. The easiest way to fix this would be to add this code at the top of your transmission startup script:
#!/bin/bash
export EVENT_NOEPOLL=1

Links and Reference