Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Thu Nov 27, 2014 10:31 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon Sep 08, 2008 5:43 pm 
Offline
Newbie

Joined: Mon Sep 08, 2008 5:17 pm
Posts: 5
Hi all,

Yesterday I installed torrent server and GUI client. The process was not straight-forward,
so I thought it would be a good idea to write down what I did before I forgot it.
I hope it is not too late...

There are several other guides I used (thanks to all), but none of them has all the steps.
See also http://buffalo.nas-central.org/index.ph ... t_on_LSPro

The steps below describe how I managed to install rtorrent and ntorrent
on LS Live HS-DH320GL, firmware 1.06

0. Overview

- rtorrent is the torrent server/application

- ntorrent is a Java client for rtorrent using scgi protocol for communication.
Download from http://code.google.com/p/ntorrent/

- lighttpd is a web server ,and it serves the scgi protocol.
http://trac.lighttpd.net/trac/wiki/Tuto ... figuration

- SCREEN is a window manager and provides means to run interactive applications,
like rtorrent in the background. Google for GNU screen, I learned only how to start
it and how to detach the session using Ctrl+a, then Ctrl+d keys

rtorrent will automatically start serving the torrents, provided you
place .torrent files in a the configured directory.

There is also web client available - wtorrent. It requires sqllite install, so I decided to ntorrent instead.

In order to install additional applications on the linkstation you have got to have access to it
- so you need telnet (or ssh).

1. Install telnet on the linkstation

Use acp commander and install telnet as described in
http://buffalo.nas-central.org/index.ph ... k_Firmware

2. Bootstrap the linkstation

Download and run the bootstrap script, now it is at version 1.2-5:
cd /tmp
wget http://ipkg.nslu2-linux.org/feeds/optwa ... -5_arm.xsh
sh lspro-bootstrap_1.2-5_arm.xsh

Reconnect again with telnet and update ipkg
ipkg update

Reference:
viewtopic.php?f=19&t=4075&p=39162#p39162

3. Install lighttpd, rtorrent, screen

ipkg install lighttpd
ipkg install rtorrent
ipkg install screen

4. Configure rtorrent - scgi, user, mem usage, folders ...

Edit the default config file
vi /opt/etc/rtorrent.conf

Add the host:port
scgi_port = localhost:5000

Note: DO NOT specify scgi_local or lighttpd would fail to start
#scgi_local = /tmp/rtorrent/rpc.socket

There are report for linkstation crashing when rtorrent uses to much memory.
I set it to use half the memory of Linkstation Live and limited the number of connections.
Place .torrent files in the directory specified and rtorrent will do them

Here what I used:
max_memory_usage = 67108864
directory = /mnt/disk1/dat/Downloads
session = /mnt/disk1/dat/Downloads/rtorrent.session
max_pears = 20
max_pears_per_seed = 5
schedule = low_diskspace,5,60,close_low_diskspace=100M
use_udp_trackers = yes
check_hash = no
encryption = allow_incoming,enable_retry,prefer_plaintext
dht = auto

You have got to decide which user account will be running rtorrent.
Make sure the directories exist and <torrent user> (the user that will be running rtorrent)
has read/write permissions.

5. Configure the start script for rtorrent

vi /opt/etc/init.d/S99rtorrent

Specify custom dir layout:
#dirlayout=RTORRENT_DEFAULT
dirlayout=CUSTOM

Set user name:
#user = "p2p"
user = <torrent user>

Set the correct script path:
#SCRIPTNAME=/etc/init.d/$NAME
SCRIPTNAME=/opt/etc/init.d/$NAME

Change the start command near the end:

d_start() {
[ -d "${base}" ] && cd "${base}"
stty stop undef && stty start undef
su -c "screen -d -m -S rtorrent rtorrent $options 2>&1 1>/dev/null" ${user} | tee -a "$logfile"
}

See also http://www.synology.com/wiki/index.php/ ... rent_HowTo
for a start command that removes the rtorrent lock file.

Allow write to /dev/null
chmod a+rw /dev/null

6. Configure lighttpd - scgi, port

Edit litthppd.conf
vi /opt/etc/lighttpd/lighttpd.conf
and uncomment the line "mod_scgi" near the beginning

Set the port, or leave it at its default value 8081.
server.port = 8081

Specify the scgi server. Note that it is written with dot, scgi.server, compared to
scgi_port in rtorrent config. Use the port number of the lighttpd server in the previous step.

scgi.server = (
"/RPC2" =>
("127.0.0.1" =>
("host" => "127.0.0.1",
"port" => "8081",
"check-local" => "disable")))

7. Test lighttpd & rtorrent

Start lighttpd and rtorrent:
/opt/etc/init.d/S80lighttpd start
/opt/etc/init.d/S99rtorrent start

List the processes, you shall see lighttpd and screen running,
and also rtorrent running for the torrent user:
ps aux

If the processes are not ok, you may look for the error in the log files folder:
/opt/var/log
/opt/var/log/lighttpd

Now telnet as the torrent user and try to connect to rtorrent
telnet

See if the rtorrent is running in screen session
screen -list

Connect to the rtorrent session
screen -r

Leave the screen session, before exiting telnet
Ctrl+a, Ctrl+d

Try to access lighttpd on LS from another pc, use your favourite browser and go to
http://<linkstation_ip>:port

if you change the config files stop the deamons:
/opt/etc/init.d/S80lighttpd stop
/opt/etc/init.d/S99rtorrent stop
then start them again.

Finally, you may reboot the linkstation and see if the lighttpd and rtorrent
will be run automatically as they should:
reboot
telnet
ps aux

Look in the process list for lighttpd, screen, rtorrent

8. Download and install ntorrent on the client pc

run ntorrent
HTTP
host = <linkstation_ip>
port = 8081
Mountpoint = /RPC2

now click Connect and use :-)


Important security note at the end:
Apparently there is a security vulnerability, either in proftpd itself, or in one of the other services.

I had the Linkstation ftp server port forwarded on the router for outside use for a long time,
with password-protected accounts, and I was the only one that knew the passwords.
But just half an hour after I completed the rtorrent server install and left it running,
I noticed the HDD spins w/o having any torrents to work on. Quick look on the processes
shown that there is an FTP connection leaching files via the proftpd, from an IP address
I do not know and w/o anyone knowing the FTP passwords.

I stopped the FTP server, and removed the ftp port forwarding on the router. I wrote down
the attacker ip, should I decide to try revenge.

vnaumov


Top
 Profile  
 
PostPosted: Tue Sep 09, 2008 8:22 pm 
Offline
Newbie

Joined: Mon Sep 08, 2008 5:17 pm
Posts: 5
well I was too quick to get happy. Today rtorrent crashes almost immediately with segmentation fault. I removed it and installed aria2 (using ipkg). But it also fails with segmentation fault.

Is there any torrent app working?


Top
 Profile  
 
PostPosted: Thu Sep 11, 2008 5:27 pm 
Offline
Total Newbie

Joined: Tue Dec 11, 2007 5:36 pm
Posts: 2
vnaumov wrote:
Is there any torrent app working?

My config is Linkstation Live 500GB, stock firmware + optware.

rtorrent + ntorrent have been working for almost a year now.
rtorrent is running 24/7

Used this instruction to install Optware.
The installed rtorrent through ipkg
Configured ntorrent according to this guide

Have not had any problems so far apart from ocasional power cuts when I have to turn LS on again.
Do not remember exact hardware and firmware version but most likely HW:v2; FW:1.06

I am sure there are quite a few people on this forum that happily run rtorrent + ntorrent on LS Live


Top
 Profile  
 
PostPosted: Fri Sep 12, 2008 2:11 pm 
Offline
Newbie

Joined: Mon Sep 08, 2008 5:17 pm
Posts: 5
Thanks for your answer - I used the same guides. There is a lot of information, but it is not organized well, and takes time to dig out.

I looked on the Asus router forum for the torrent clients, and it is much the same - some people have no problem at all, and some, like me, get these nasty errors.

By now I tried all the torrent clients from optware packages.

However there is one important thing I changed between the first install(working), and all the rest (not working) - I bought a gigabit switch and connected the LS and the other 3 pcs. Also, I read here in the forum a note about using jumbo frames - it seem they lead to the same error. But I left the frames at their default small size, and still get this - any torrent application starts and in less than a minute fails with segmentation fault.

May be the gigabit switch is the problem, but I am not going to use again the older switch - now the network is much faster.


Top
 Profile  
 
PostPosted: Mon Oct 13, 2008 1:10 pm 
Offline
Regular Member

Joined: Fri Sep 28, 2007 8:49 am
Posts: 294
I gave up with BT on my LS. Never had one that was stable. rTorrent crashed time again with Seg Faults. Is there ANY reliable torrent client for LS Live or Pro (running open stock or JTYmod not Debian)?

_________________
Geeky blog at http://www.methanoid.blogspot.com :D


Top
 Profile  
 
PostPosted: Tue Oct 14, 2008 4:40 am 
Offline
Moderator
User avatar

Joined: Tue May 23, 2006 9:20 pm
Posts: 366
Location: Chicago USA
It seems that transmission is quite popular. http://buffalo.nas-central.org/index.php/Transmission_BitTorrent_Client

You could install it through the Optware Feed:

http://buffalo.nas-central.org/index.php/Ipkg_Package_List:_ARM9

_________________
1 LS-GL: (FreeLink - 2.6.22 kernel)- backup and media server...
As of June 11, 2010:
admin@LS320:~$ uptime
20:23:40 up 417 days, 20:09, 1 user, load average: 0.20, 0.21, 0.30

That's only because I had to move that time ago. Love this box and this community, wish I had more time to dedicate to it.


Top
 Profile  
 
PostPosted: Tue Oct 14, 2008 7:50 am 
Offline
Regular Member

Joined: Fri Sep 28, 2007 8:49 am
Posts: 294
Thanks Goat, I do remember Transmission was one I tried many times and the worst Seg Faulter I came across. Still I know they were aware of the issue so maybe its been fixed. Will try again.

_________________
Geeky blog at http://www.methanoid.blogspot.com :D


Top
 Profile  
 
PostPosted: Tue Oct 14, 2008 11:50 am 
Offline
Newbie

Joined: Mon Sep 08, 2008 5:17 pm
Posts: 5
I tried Transmission, it looks very nice, but does have the same problem - segmentation fault.

A month ago I bought a very cheap NAS, Mobile LanDisk NS-348S, and it has bittorrent client. But, it allows only two active torrents at a time, and the dl speed is max 900KB/sec, while on a computer I get 3.5 MB /sec, up to 4MB /sec in the morning.

So I think it is that these small boxes are just unable to cope with multiple high-speed downloads - too weak processors and too small amount of memory.

I gave up - now using a PC always on.

I guess if I configure any torrent client on the linkstation as it is on NS-348S - two active torrents only, limited speed - it would work. But I do not want it this way.


Top
 Profile  
 
PostPosted: Tue Oct 14, 2008 12:12 pm 
Offline
Regular Member

Joined: Fri Sep 28, 2007 8:49 am
Posts: 294
http://forum.transmissionbt.com/viewtop ... f=2&t=6075

I do wonder sometimes if anyone actually tests a program before it gets into the Optware feed.

Transmission has been seg-faulting for MANY MANY months. It's been reported on various places.

I think I might look into the hardware on the LS Live vs LS Live with Bittorrent and see if the LS Live can be flashed with FW that has a working BT client and then use ACP_Commander to open up that firmware. Anyone tried?

Meth

_________________
Geeky blog at http://www.methanoid.blogspot.com :D


Top
 Profile  
 
PostPosted: Tue Oct 14, 2008 12:23 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
for what its worth... I've had Transmision 1.34 running continuously for about 4 days now (no seg faults whatsoever) - works well and is very easy to set up. No extra app for the webif are needed as it is built in.

http://buffalo.nas-central.org/index.ph ... ent_Client

This was on my LS2 running foonas, but it should build easily on/for just about any box.

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
 Profile  
 
PostPosted: Tue Oct 14, 2008 12:48 pm 
Offline
Regular Member

Joined: Fri Sep 28, 2007 8:49 am
Posts: 294
Davy, I think that might be the nail on the head. I'm running Open Stock or I run jtymod (another Open Stock) and it barfed last time I tried. The link I posted was from a user running open stock and 1.34 Transmission and it seems it still barfs.

_________________
Geeky blog at http://www.methanoid.blogspot.com :D


Top
 Profile  
 
PostPosted: Tue Oct 14, 2008 4:31 pm 
Offline
Regular Member

Joined: Fri Sep 28, 2007 8:49 am
Posts: 294
An uodate. Installed Transmission from Optware. Nice that the WebUI is now built in but still seg faults within a minute of use as before.

Looks pretty, does bugger all :(

ISTR I had MLDonkey working. I cannot use Sancho (UI) at work which is a PITA but at least MLDonkey has worked.

_________________
Geeky blog at http://www.methanoid.blogspot.com :D


Top
 Profile  
 
PostPosted: Wed Oct 15, 2008 5:59 am 
Offline
Regular Member

Joined: Mon Oct 01, 2007 11:29 pm
Posts: 79
For rtorrent, does it still crash if you don't use xmlrpc?

Since people tends to post when there is problem. I'm wondering if there's any people using either optware rtorrent or transmission without problem on ARM linkstation?

I guess it depends on libc and libstdc++ quite a bit. So far on the platforms I have access to (nslu2/unslung, nslu2/slugosbe, nslu2/debian), optware rtorrent runs fine with no xmlrpc; transmission runs stable on all these platforms plus nslu2/openwrt.


Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 10:27 am 
Offline
Newbie

Joined: Fri Sep 19, 2008 2:09 pm
Posts: 21
transmission 1.34 works well on LiveStation Live v2 with Freelink, no crash / seg fault for days of utilization.

I rolled back to rtorrent (cauz transmission is beautiful but sloooooooooooow), I had problems with 0.7.9 (LS crashs after of 1-4 hours of rtorrent utilization), but 0.8.2 works like a charm, so far.

I will try to install wtorrent and link with xmlrpc this WE, to see if crashs are coming back.


Top
 Profile  
 
PostPosted: Fri Oct 17, 2008 10:50 am 
Offline
Regular Member

Joined: Fri Sep 28, 2007 8:49 am
Posts: 294
Yes we KNOW it works with Freelink... my question is if there is a Torrent client that works with open STOCK firmware or with similar (like jtymod) firmware. Freelink is different.

_________________
Geeky blog at http://www.methanoid.blogspot.com :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Protected by Anti-Spam ACP
Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group