Torrent server


197 posts   Page 1 of 8   1, 2, 3, 4, 5 ... 8
by Orionn » Wed May 30, 2012 8:18 am
Can anyone recommend a simple, headless torrent program with RSS support for the raspi?

Deluge doesn't seem to be able to run headlessly.
Transmission needs flexget for RSS and that seems quite complicated.
I tried qbittorrent as well, and I think I had trouble with setting up RSS in that, too, before I even tried getting it to run headlessly using "screen".
Posts: 9
Joined: Fri May 04, 2012 1:11 pm
by chorlton » Wed May 30, 2012 9:33 am
I use rtorrent - there's another thread around if you search which discusses how to use it a little - you need to run it within screen for example.

The author of rtorrent also provides a separate rss downloader utility called rssdler. I use this in conjunction with rtorrent and it works very well.

The set up is

  • rtorrent monitors a torrent directory on the server for .torrent files.
  • I have this shared as a samba drive so I can manually download torrents with my laptop and save them onto the server.
  • When complete, rtorrent moves any downloads to my "linux-isos" directory automatically
  • In addition, rssdler monitors any defined rss feeds - when it finds anything matching, it downloads the .torrent file to the torrent directory where rtorrent picks it up.

Admittedly this is running on ubuntu server on an x86 box at the moment but everything was compiled from source and I've run rtorrent on an ARM device before with no problems.

edit: I just spotted your mention of flexget - I think rssdler might have had a dependency on this but it just needed installed and compiled against. i don't think it was complicated.
Posts: 50
Joined: Mon Feb 06, 2012 1:57 pm
by Targettio » Wed May 30, 2012 11:10 am
There is an unfortunate lack of decent linux based torrent clients. (When I say decent, I mean built in RSS and Web interface; the sort of stuff you need for a torrent box). Odd when compared to the abundance of windows clients.

Ironically, utorrent server, despite being incredibly early alpha is one of the best out there. But sadly it doesn't work on ARM.

rtorrent is supposedly one of the best ARM compatable, but I have never tested it personally. Vuze is java based and has a built in RSS (in plugin form), so in theory that could run if you install java run time; but it could be a little resource heavy.
Posts: 19
Joined: Wed May 30, 2012 11:02 am
by Orionn » Wed May 30, 2012 11:41 am
I use Vuze on my main PC, but it does take up a fair bit of juice. I was hoping to use the Pi as a samba server and maybe other things, so I was after a fairly lightweight torrent client if I can do it. I'll give rtorrent a go and try using chorlton's setup.
Posts: 9
Joined: Fri May 04, 2012 1:11 pm
by Pikachu47 » Wed May 30, 2012 11:52 am
I use Transmission GUI and VNC to the pi from my phone.
Then i just browse to the website with the torrent file and download it, or point it to a torrent file in my shared samba folder.

Not the most efficent way i guess but I find it quite an easy method.
Posts: 24
Joined: Sat May 19, 2012 1:19 pm
by SheepOnMeth » Wed May 30, 2012 1:48 pm
Flexget is very simple to use, their wiki is full of information.
http://flexget.com/wiki/Configuration

I use flexget + deluge (only the web ui & the daemon), on my Archlinux server for my TV series addiction :mrgreen: .

Very usefull for a torrent box, with MiniDLNA for streaming all the videos in the house :D .
Posts: 9
Joined: Wed May 30, 2012 1:39 pm
by yntelectual » Tue Jun 05, 2012 1:02 pm
Transmission is excellent and has web UI.
Posts: 3
Joined: Mon Jun 04, 2012 7:20 pm
by alexjj » Wed Jun 06, 2012 9:55 am
I'm finding the whole pi freezes whilst running transmission and downloading a file. I was using the daemon and remotely connecting to it from my main computer.

Tried limiting the number of connections but kept doing the same.

Anyone have any suggestions?
Posts: 15
Joined: Sun Feb 05, 2012 11:42 am
by praest76 » Wed Jun 06, 2012 10:41 am
I use rtorrent and maintain it using Transdroid on my phone. It's a great combo.
PRAEst76 [about.me/praest76]
    Pi¹ - xibalba: OpenELEC, media centre
    Pi² - erebus: Debian Sid, general shell

Raspberry Pi Last.fm group - last.fm/group/Raspberry+Pi
User avatar
Posts: 29
Joined: Fri Sep 02, 2011 11:33 am
Location: Newark on Trent, Nottinghamshire
by guisacouto » Thu Jun 07, 2012 9:20 am
alexjj wrote:I'm finding the whole pi freezes whilst running transmission and downloading a file. I was using the daemon and remotely connecting to it from my main computer.

Tried limiting the number of connections but kept doing the same.

Anyone have any suggestions?


I have exactly the same problem. It kernel panics when downloading torrents with transmission (rtorrent too). What distro are you running? I'm using ArchLinux.

Are you saving your torrents into an external hd through usb? I think this is the problem.. conflict between the network bandwidth vs the usb bandwitdh (both use the same bus).
Posts: 35
Joined: Mon Feb 20, 2012 12:46 am
by alexjj » Thu Jun 07, 2012 9:28 am
guisacouto wrote:I have exactly the same problem. It kernel panics when downloading torrents with transmission (rtorrent too). What distro are you running? I'm using ArchLinux.

Are you saving your torrents into an external hd through usb? I think this is the problem.. conflict between the network bandwidth vs the usb bandwitdh (both use the same bus).


Using debian build and saving files to the SD card. I'm going to try altering the memory allocation and see if that helps.
Posts: 15
Joined: Sun Feb 05, 2012 11:42 am
by guisacouto » Thu Jun 07, 2012 10:37 am
alexjj wrote:
guisacouto wrote:I have exactly the same problem. It kernel panics when downloading torrents with transmission (rtorrent too). What distro are you running? I'm using ArchLinux.

Are you saving your torrents into an external hd through usb? I think this is the problem.. conflict between the network bandwidth vs the usb bandwitdh (both use the same bus).


Using debian build and saving files to the SD card. I'm going to try altering the memory allocation and see if that helps.


I thought this problem was only when using an external hd.. it seems it isn't (even more problematic).

I already tried some stuff but no luck:
-incremented the nice value to 19, so it has the lowest priority possible.. this way it shouldn't get in the way of the kernel or more important processes
-disabled encription in transmission (for what I've read it's his botleneck)
-set the cache of transmission at 8MB instead of the 4MB default value (should decrease to half the number of writes to permanent memory (sd or external hd)
-created a ext4 partition in the external hd just for torrenting (in external hds I normally use ntfs for portability)
-probably some more stuff I don't remember anymore

best regards

edit: if by memory allocation you are referring to the memory that the system is given vs the memory of the gpu, let me tell you I don't think that the problem is there. While I'm trying to make torrents work I normally leave htop open in a ssh session to see how the cpu and memory are. When the kernel panic happens, the ssh goes off but I still get to see what's the last state of htop before the crash happens. The memory is around 40/50MB, so if you are working with 128cpu/128gpu that should be enough.
Posts: 35
Joined: Mon Feb 20, 2012 12:46 am
by jerhat » Fri Jun 08, 2012 1:48 am
Hi,
I'm sorry in advance, my post is not gonna help much.

I am facing the exact same problem. Pi works beautifully (can be up for several days without pb), but freezes after ~5mn of torrent download.

I'm on an up-to-date raspbian with rpi-updated kernel and firmware. I'm downloading to the SD card directly. I tried 3 different PSU (all 5V and between 1A and 2.1A) and 2 different USB cables (including an expensive brand new one). Only power and ethernet plugged to the pi. Unfortunatly I do not have voltmeter so I cannot tell you the pi voltage.

I tried to:
- increase vm.min_free_kbytes to 16M
- adjust memory split
- remove any config from config.txt
- different torrent clients (transmission and deluge)
- different wall plugs in my appartment

As guisacouto said, memory is barely used when crash occurs so I doubt this is a memory issue.

If someone has a suggestion, he is most welcome...
Posts: 14
Joined: Fri Jun 08, 2012 1:26 am
by obarthelemy » Fri Jun 08, 2012 12:32 pm
I think the USB drivers are flaky right now. Does your pi freeze also on heavy disk I/O, not torrent-related ?
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm
by Jancis » Sat Jun 09, 2012 9:13 am
i'm trying to watch out for connections. as long as they are under 30, it works okay. i'm using transmission.
Posts: 25
Joined: Thu Jan 26, 2012 3:54 pm
by errikos » Sun Jun 10, 2012 1:01 am
I'm having the same problem with rtorrent run from screen. I have several days of uptime, but when I try to download torrents to an external usb drive (self - powered) the raspi freezes after some minutes. I have no clue on what happens, I assume it must be something with the USB drivers and the constant read-write operations the rtorrent creates...
Posts: 30
Joined: Thu Feb 09, 2012 12:47 pm
by guisacouto » Sun Jun 10, 2012 1:18 pm
Jancis wrote:i'm trying to watch out for connections. as long as they are under 30, it works okay. i'm using transmission.

What do you mean by connections? THe number of peers?

My rpi already crashed with 2 peers so I don't think limiting that solves the problem
Posts: 35
Joined: Mon Feb 20, 2012 12:46 am
by colinbharris » Sun Jun 10, 2012 7:02 pm
Hi,

As was just said I cannot help with this one but have exactly the same issue, but not torrent related.
The problem is that the PI freezes, I don't know why but have some ideas below.

I am running the latest Debian download image with samba.
I started with 3 1TB USB disks with NTFS on them shared out as separate shares.
This setup will stay up for sometimes days, but after 2-3 days max the system will freeze when accessing the files (movies/recorded TV).
If I write data to the drives from another machine via samba (from a windows 7, win Vista or Ubuntu 11.10 machine) the freeze will happen more quickly, in around 2-15 minutes.

This seems to happen with smaller files as well.

The power is from a 1a 5v HTC charger but I have tried two others at 700 and 850 and that did not help. I have tried 3 cables, same response with all of them.

I have a powered hub and 3 USB powered disks. The disks always need power but the hub being powered or not makes no difference to this, takes the same time to freeze up even with no USB disks attached and testing to the SD disk.

I started thinking this was an NTFS driver issue so tried VFAT (actually worked better, but failed after a longer period of time) and EXT3 which failed much faster than NTFS.
I then removed the USB drives and tried copying onto the SD card (16gb). This failed in the same time frame.

The memory is low when I do this, less than 40mb used.
The processor is not busy, around 40-50% max, samba uses around 15% for most of the time so it is not getting over worked.

I cannot measure the voltage, looks like my meter is broken for the moment.

I have only the power, Ethernet and USB powered hub attached.

In summary, writing lots over the Ethernet link seems to be the trigger for this, but reading also triggers it.

Any suggestions or tests and I will run them, very keen to make this stable as when it is working it is great and 100% meets what i wanted to use it for (file server) really well.

Thanks
Posts: 1
Joined: Thu Jan 12, 2012 10:02 pm
by mik » Sun Jun 10, 2012 8:39 pm
Hi,
I have the same problem using the minimal Debian Wheezy installation http://www.linuxsystems.it/2012/06/debian-wheezy-raspberry-pi-minimal-image/), with transmission (2.52).
The RPi crashes a short time after the beginning of a torrent load.
The download area is on the SD card (no USB). I have limited the dowload to 100 Kbytes/s... no more success. May someone has a solution to that?
regards,
--
Mik
Posts: 1
Joined: Sun Jun 10, 2012 8:32 pm
by purg » Mon Jun 11, 2012 12:10 am
ive been comparing settings between RPI and a NAS (snakeos) that can run transmission.

Found a way of keep the box from crashing which I hope helps others find a better solution for everyone. Only difference seems to be RPI by default doesnt have a swapfile. Just by setting up a small file prevented the box from crashing while downloading the RPI torrent.

Code: Select all
cd /var
sudo dd if=/dev/zero of=swapfile bs=1M count=128
sudo mkswap /var/swapfile
sudo swapon /var/swapfile

/etc/fstab included the following line
/var/swapfile   none    swap    sw                              0 0


Having the swap on main SD is horrid but as first said this is purely a successful test to prevent the RPI from crashing. Moving swap to USB attached HDD would be the obvious next step.


screenshots what I think showing swap is being used a lot
Code: Select all
top - 00:54:44 up 25 min,  1 user,  load average: 3.44, 1.69, 0.71
Tasks:  61 total,   1 running,  60 sleeping,   0 stopped,   0 zombie
Cpu(s):  9.5%us, 11.8%sy,  0.0%ni, 68.0%id,  0.3%wa,  0.0%hi, 10.5%si,  0.0%st
Mem:    220616k total,    63128k used,   157488k free,      960k buffers
Swap:   131068k total,     6996k used,   124072k free,    33992k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1132 debian-t  20   0 36100 4312 1180 S 16.6  2.0   0:32.47 transmission-da
Posts: 21
Joined: Fri Jun 08, 2012 8:07 pm
by guisacouto » Mon Jun 11, 2012 12:17 am
purg wrote:ive been comparing settings between RPI and a NAS (snakeos) that can run transmission.

Found a way of keep the box from crashing which I hope helps others find a better solution for everyone. Only difference seems to be RPI by default doesnt have a swapfile. Just by setting up a small file prevented the box from crashing while downloading the RPI torrent.

Code: Select all
cd /var
sudo dd if=/dev/zero of=swapfile bs=1M count=128
sudo mkswap /var/swapfile
sudo swapon /var/swapfile

/etc/fstab included the following line
/var/swapfile   none    swap    sw                              0 0


Having the swap on main SD is horrid but as first said this is purely a successful test to prevent the RPI from crashing. Moving swap to USB attached HDD would be the obvious next step.


screenshots what I think showing swap is being used a lot
Code: Select all
top - 00:54:44 up 25 min,  1 user,  load average: 3.44, 1.69, 0.71
Tasks:  61 total,   1 running,  60 sleeping,   0 stopped,   0 zombie
Cpu(s):  9.5%us, 11.8%sy,  0.0%ni, 68.0%id,  0.3%wa,  0.0%hi, 10.5%si,  0.0%st
Mem:    220616k total,    63128k used,   157488k free,      960k buffers
Swap:   131068k total,     6996k used,   124072k free,    33992k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1132 debian-t  20   0 36100 4312 1180 S 16.6  2.0   0:32.47 transmission-da


That is very interesting, but shouldn't the swap only be used when the system is out of ram? When my rpi crashes I still have a lot of ram so that's a bit odd.

Having a swap in a sd card is not a very good idea, since the sd cards can easily get damaged with high frequency write/read operations.

Will definitelly try this with my usb external hd.

edit:

Just tested it with a swapfile in external hd. Didn't work.. still got a kernel panic
Posts: 35
Joined: Mon Feb 20, 2012 12:46 am
by errikos » Mon Jun 11, 2012 12:49 am
Wow! I tried the swap thing and it seems it works like a charm! I will let it the whole night to see... Thank you very much! Quite weird solution/workaround but it works! How did you think about it?! :) ;)

Edit: I tried it with the sd card. I know it is not the best idea, but I really don't care if a 4pound card is destroyed after 2-3 years or even 6 months of continuous usage... ;) Of course it would be a good to fix whatever causes the kernel panics...

Edit2: It still freezes .... :roll: :? No solution yet...

I'm using a 0.7A Samsung charger for power and rtorrent for client... but I don't think that this is the issue...
Posts: 30
Joined: Thu Feb 09, 2012 12:47 pm
by jerhat » Mon Jun 11, 2012 1:16 am
obarthelemy wrote:I think the USB drivers are flaky right now. Does your pi freeze also on heavy disk I/O, not torrent-related ?


Unable to reproduce the issue doing something else than downloading torrent.
I tried to run simulataneously:
- dd if=/dev/zero of=~/bigfile
- axel -n50 http://cdimage.debian.org/debian-cd/6.0 ... -DVD-1.iso

It ran for 30mn without pb. Then I started my torrent download: 2mn later it crashed.

I installed a brand new raspbian (pisces r2), no luck.
Posts: 14
Joined: Fri Jun 08, 2012 1:26 am
by obarthelemy » Mon Jun 11, 2012 1:55 am
That's interesting. the next questions are:
- what happens if you do the same copy operation from a network share to a USB drive ? Maybe local to USB drive doesn't stress the I/O enough, and Torrents do 'net to local, both over USB.
- does the Linux cop command have extra I/O safeties, timers, or error handling that torrent clients don't ?
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm
by guisacouto » Mon Jun 11, 2012 10:08 am
Another way to provoke the kernel panic is by mounting a sshfs in another machine (i.e, mount the rpi filesystem in another machine), and transfer a movie or something.
Posts: 35
Joined: Mon Feb 20, 2012 12:46 am