SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.03k stars 1.23k forks source link

rutorrent SPK #75

Closed davida72 closed 9 years ago

davida72 commented 12 years ago

I use rutorrent as a bittorrent client. It's a front end to rtorrent. I've been running it for a year or so and it's rock solid but a pain to set up.

http://code.google.com/p/rutorrent/

NimdaBE commented 11 years ago

i am running this on a DS412+ with DSM 4.3-3776 i have 2 issues: 1) when i right-click on a torrent and i select remove torrent + data, the data remains in the download folder 2) i have enabled the automove-feature and selected that i want a copy of the data in another folder, but the copy is never executed...

moneytoo commented 11 years ago

@venomski You have to add all folder paths to open_basedir config (or disable open_basedir completely). These instructions will be displayed in installation wizard (786b30073372798fdb343420a30fef05872b3fc3) but you have to do that manually.

NimdaBE commented 11 years ago

@moneytoo , i have 2 directories: working and complete. The working directory is where the downloaded files end up (i entered this folder when installing via the package installer and i was prompted to enter the download- and wachtfolder-directories). The complete directory is where i want to copy the succesfully downloaded files for other programs (sickbeard and couchpotato) to pickup and process. I have added my "volume1/downloads/working" folder to the open_basedir list, but the 2 problems i mentioned before still exist...

droidgren commented 11 years ago

@venomski Then you need to add :/volume1/downloads. Then restart rtorrent. I had the same issue and it worked fine.

moneytoo commented 11 years ago

@venomski Setting file modes should fix that with 585cab9642f4cd2f395094c565a1d3729a953b37 and 687294a9a05cebe96881a356e40038c68b492f60. Seems like it's really needed for moving files (as I just tested). (Will be in next update).

NimdaBE commented 11 years ago

ok, thanks for the info. Should i then wait for the update then? When will it be updated, and will it show as an update in the Package Center?

moneytoo commented 11 years ago

@venomski Yep, if you're not sure what files to edit, just wait for update that will pop up once available (it will reaquire uninstall/install instead of just upgrade though).

foshizzlemanizzle commented 11 years ago

im looking forward for the update aswell... dont wanna fux0r up my nas by editing files n shiat... =)

please give us the update soon tho!... and thx alot for this gr8 work m8!

appreciate!!!!

ghost commented 11 years ago

wait wait when comes update?

foshizzlemanizzle commented 11 years ago

when hes rdy to release it... im like you man!.. hardly cant wait... but ive rented a seedbox meanwhile untill things are fixed!... just remember he does this for free... so please be patient =)

ghost commented 11 years ago

Can you tell us when will update please Thank you

droidgren commented 11 years ago

Come on guys, have some patience. He is doing this for free, the update is done when it done. Show some respect, please. If you are hurry you can fix it yourself.

moneytoo commented 11 years ago

Update is pending (just like sabnzbd etc) as Piwi is working on some changes on repo server.

bickford commented 11 years ago

Hi guys, Firstly - @moneytoo - big thanks for attempting this SPK, I think a lot of people will find it useful.

I've been trying it out over the last week and got past most of the issues that people have faced above due to fixes previously shared. I'm still trying to get a few more things working: RSS, auto-move on completion, auto-extract on completion, watched directory; but I think they're just permissions issues and I can hopefully figure them out.

I did want to raise two points - a request and a fix:

  1. Can the SPK installer please request a rtorrent TCP port range from the user during installation? I think this could avoid issue #667 for a number of people not familiar with rtorrent/rutorrent config.
  2. Even when the TCP listening port is configured correctly, it shows uncontactable in ruTorrent (as per @davida72 post referencing http://i.imgur.com/jorZgTJ.png). This is because the _checkport plugin was broken (see post here http://www.torrent-invites.com/seedbox-advertising/210036-chmuranet-com-anonymous-1gb-2tb-vps-seedboxes-nl-57-month-no-limits-18.html). The fix is to just install the new version (from SSH as root), I had to add --no-check-certificate because I haven't fixed up the CA issue on my syno yet. eg:

    wget -O /var/services/web/rutorrent/plugins/check_port/action.php https://rutorrent.googlecode.com/svn/trunk/plugins/check_port/action.php --no-check-certificate

I've only got a few test torrents running at the moment, will wipe out my current config and reinstall when the new update comes out, til then I'll try to fix up the last issues I have and report back if I find anything useful.

Cheers

moneytoo commented 11 years ago

@bickford 1) Sure, I will add it to the wizard. I wasn't sure whatever this is important enough as users also might configure their firewalls, routers so they have to have at least some knowledge but... it's probably one of the most edited parameters so it makes sense to make it easier for everyone editing this. Anything important missing from rtorrent config? Some sample configs are just crazy long :)

2) Ok. Since it's only one broken plugin and it's one line patch, including it in spksrc would be fine. I will add that too.

nickdiacre commented 11 years ago

hi there...

I have manged to get rutorrent up and running from spksrc, excuse me but I'm a bit of a noob to this sort of thing.

I had a couple of questions I hoped someone could answer, sorry if I'm being daft

1) where is rtorrent.rc kept following this setup? 2) is there any way to configure a blocklist? 3) Is it returning correct stats? 4) Is it returning the correct IP address to private trackers?

Many thanks, in advance,

Nick

foshizzlemanizzle commented 11 years ago

new Rutorrent available Wooot wooot =D

foshizzlemanizzle commented 11 years ago

tested and it has same issues as before so i wonder whats new in it ?... also tried to delete it and reinstall it... it still dont copy or unpack your current torrent when its complete... ill switch back to download station and flexget... thumbs down..... =(

bickford commented 11 years ago

@moneytoo Thanks for the comments :+1: I've been able to get automove (AutoTools plugin) working too, by completely disabling open_basedir security by setting it to blank (as suggested in comments above). Auto-unpack still isn't working though, so I'm continuing to look into that, RSS, watch dir (will try with AutoTools), etc.

@dogboy23 I think I can answer your questions:

  1. It's here on my install, which should be default:

    usr/local/rutorrent/var/.rtorrent.rc

  2. A blocklist for what? Like an anti-p2p blocklist? I think not, you may be able to import that into the Synology Auto-Block list in the firewall (Control Panel -> Auto-Block). I wouldn't recommend blocklists in general, as their benefit is debatable and the impact can be worse than helpful (eg blocking genuine seeders, so you can't download stuff).
  3. Internal stats on the interface? CPULoad plugin is faulty and is returning the wrong figures, other than that all stats should be correct. Or do you mean returning the correct stats to the torrent tracker? If so the answer to that should be yes. If it's not returning correct stats then this rtorrent/libtorrent version (0.9.2/0.13.2) would be banned on most private trackers, it's not banned on any private trackers I use.
  4. As far as I know, yes. I'm testing it with my main private tracker and it seems to be reporting my IP correctly to the tracker. On their 'active torrents' page for my username I can see the torrents I've added to RuTorrent coming up as "rtorrent/0.9.2/0.13.2 | [my IP address]" :)

@foshizzlemanizzle I see the package is showing an update is available too, but I don't see any RuTorrent commits in here recently, so I don't think anything has changed. Weird! I'm new to Github though so maybe I'm just not seeing it. Perhaps moneytoo knows what's up?

moneytoo commented 11 years ago

The latest update is just the last few commits that were not updated in the spk yet.

ghost commented 11 years ago

and settings are not stored rutorrent

nickdiacre commented 11 years ago

thanks muchly for the advice! is there an easy way to pw lock the interface without going into htaccess? All my other queries have been answered, very happy with it!

sewikola commented 11 years ago

is it possible to get the autodl-irssi plugin in the package? would be sooooo much appreciated. (or is there a way i can install it myself? im new to linux OS and i dont have my DS412+ nas bootstrapped...)

thx in advance

sewikola commented 11 years ago

Im constanlty getting the "the request to rTorrent has timed out" error a while after adding a torrent and the speed picks up.

I have a 200/50Mbit/s line, is there any setting I should change?

Im used to rtorrent from using a seedbox but that one I didnt admin myself... ;-)

bickford commented 11 years ago

@MrOnyx Settings are not saved by RuTorrent 'by design' of RuTorrent creator. I think it's stupid. Anyway, read here - http://forums.rutorrent.org/index.php?topic=570.0 . You will have to get all the settings you want in RuTorrent working as you like, then edit the .rtorrent.rc config file (/usr/local/rutorrent/var/.rtorrent.rc) for to save the relevant rtorrent settings permanently. RuTorrent is just a front-end that 'displays' the rtorrent settings. This has nothing to do with Moneytoo.

@dogboy23 Nah you will have to use the usual Apache methods (eg htaccess). However, before you go the .htaccess path, the recommended method is to edit the /etc/apache2/httpd.conf file to add the password details for your rutorrent install. Basically instead of hiding .htaccess files all over the place, this makes the config central. See here, last part of the post under UPDATE - http://www.randystech.com/?option=com_content&view=article&id=68:install-and-configure-rtorrent-and-rutorrent&catid=4:linux-server&Itemid=8

@sewikola I'm sure autodl-irssi package can be installed, you should be able to just SSH into your DS412+ as root, and copy the autodl-irssi plugin into the [your-data-volume]/web/rutorrent/plugins/ directory. I suggest you save the plugin onto a samba share, then SSH in and copy it from the samba share location to the rutorrent plugins dir. If you bootstrap your NAS you will be able to use easier methods (such as a wget to download the file straight into the plugins dir from the googlecode repository). I don't know why you're getting timeouts, but it could be because your connection is so fast it's flooding the device? 200/50Mb.. i'm jealous.

bickford commented 11 years ago

@moneytoo I still can't get auto-unpack on completion working (AutoTools plugin). I enabled Execute logging for Rtorrent, to see if I could see why (edited /usr/local/rutorrent/var/.rtorrent.rc to include the lines

log.open_file = "rtorrent.log", "/tmp/rtorrent.log"
log.execute=/tmp/rtorrent.log"

And it was getting this error:

usr/syno/bin/sh : not found

I fixed that by adding a symbolic link for sh to busybox.

ln -s /bin/busybox /usr/syno/bin/sh

However, I'm now getting another error:

^@>: line 1: '/volume1/web/rutorrent/plugins/unpack/unall_dir.sh': not found

I confirmed that the unall_dir.sh file does exist, and it's executable by all users. I also tried setting owner to nobody:nobody and chmod 777 on all of my directories - no luck still. It seems to me like the script above is getting an incorrect parameter passed to it, and its saying that it can't find it (like a bad path, or something). Either way, I'm out of ideas. I also can't get Autotools watched directory to work, it just changes the .torrent files I place into my watched directory subdir to .torrent.fail (meaning it failed to parse it, I think). So I think i'll try a manual install of RuTorrent now to see if I can get everything working under the more commonly-used lightHttpd instead of Apache. If so, I'll report back - maybe it's just too hard to get everything working under Apache, even if it's 'neater'?

Cheers!

moneytoo commented 11 years ago

@bickford Since I'm not actually much of a torrent user I didn't try anything that should unpack after download. Could you send me (email) some torrent that should unpack using autotools so I could test it? I would recommend trying out the latest versions of rtorrent/rutorrent+plugins from their trunks first.

bickford commented 11 years ago

@moneytoo I actually struggled to find a small, free, torrent file with a zip in it. All of the torrents at the pirate bay use magnet links instead of torrent files, and I don't know any other public torrent sites off the top of my head. Anyway this one should work, but its 160mb :-1: : http://internode.dl.sourceforge.net/project/linuxonandroid/Ubuntu/13.04/Small/ubuntu-13.04.SMALL.ext2.v2.zip.torrent I have actually already tried updating rtorrent from SVN (svn export --force http://rutorrent.googlecode.com/svn/trunk/rutorrent). I didn't bother trying to update rtorrrent though, maybe I'll try that next. Cheers

ghost commented 11 years ago

can someone tell me how to password protect ruTorrent

nickdiacre commented 11 years ago

hey folks,

i know the coup is that blacklists are not recommended but i could still do with knowing if it is possible. I currently point my reorient.rc file to one of the i-blocklist gzip addreses but reckon this is not working. Does anyone have a definitive idea as to how this is possible?

On another note, I can't get the auto watch to work, it constantly adds the fail suffix. However if I use the rtorrent.rc directory path that works OK, but has nothing to do with auto tools [which still doesn't work]

Does anyone have any idea what I'm doing wrong… I'm not massively linux oriented but I've tried a number of solutions with no success, and a working auto tools config would be great.

Please let me know if anyone has had any luck with them, and if so what did you do.

FWIW I have bootstrapped, run IPKG and installed XML-RPC in my attempts [from google I thought it may be a PHP-CLI issue] but still no joy.

Many thanks in advance…

Nick

moneytoo commented 10 years ago

Seems that ruTorrent 3.6 has been released just few days ago. Compiling right now so let's see how better it is. :)

EDIT: Updated. Watch dir, manual unpack, delete works fine for me.

nickdiacre commented 10 years ago

still really struggling with auto tools, i tried clearing the open_base_dir field as recommended, but the files still fail :(

anyone had any joy?

Thanks in advance...

Payti commented 10 years ago

Hello, I have that error on some SSL trackers: Tracker: [SSL peer certificate or SSH remote key was not OK]

Could somebody recompile for me rtorrent 0.9.2 for DS412+ with that option becouse I haven't DS412+ bootstraped:


File: curl_get.cc (which can be found in /rtorrent-0.9.2/src/core folder)...

After the line curl_easy_setopt(m_handle, CURLOPT_MAXREDIRS, (long)5);

add the following code curl_easy_setopt(m_handle, CURLOPT_SSL_VERIFYHOST, (long)0);


and recompile rtorrent as usual.

Regards,

THX Payti

moneytoo commented 10 years ago

@Payti Setting network.http.ssl_verify_peer.set=0 didn't help?

Payti commented 10 years ago

Unfortunately, this setting does not help ;( Please recompile rtorrent with this option for me.

THX

Regards,

spiderben25 commented 10 years ago

Hi guys, Just installed it on my DS413j, tweaked .rtorrent.rc a little, added authbasic authentification, works great! Only problem is, I get an error when loading an https RSS feed (BTN tracker, if that matters). Any idea? Thanks.

EDIT : two other issues so far

ghost commented 10 years ago

rutorrent does not work dsm 5.0-4458 rutorrent

loddo commented 10 years ago

Hey everybody :) I have struggled with bootstrapping for a looong time, and really had a lot of problems with it.. Apperently not tech savvy enough. Well this fixes everything for me :D Great to see a package for rtorrent/rutorrent. Thank you very much :)

I have one small question regarding a errormsg:

"rTorrent user must have read/execute access to the tmp directory. ruTorrent will not work. (/var/spool/php/)"

What can I do about this? Help would really be appreciated :)

moneytoo commented 10 years ago

If you have issues, can you run following command (via SSH/telnet) and paste its output to verify everything is setup and running correctly?

ls -l /var/services/web/rutorrent/ && ls -l /var/packages/rutorrent/target/ && ls /etc/php/conf.d/ && cat /etc/php/conf.d/com.synocommunity.packages.rutorrent.ini && ps | grep [t]orrent
loddo commented 10 years ago

Not sure if I did it right, but this is the output:

iServe> ls -l /var/services/web/rutorrent/ && ls -l /var/packages/rutorrent/targ et/ && ls /etc/php/ drwxr-xr-x 3 nobody 1000 4096 Apr 2 00:54 conf drwxr-xr-x 2 nobody 1000 4096 Apr 2 00:54 css -rw-r--r-- 1 nobody 1000 1150 Mar 29 17:39 favicon.ico drwxr-xr-x 2 nobody 1000 4096 Apr 2 00:54 images -rw-r--r-- 1 nobody 1000 12694 Oct 16 13:40 index.html drwxr-xr-x 2 nobody 1000 4096 Apr 2 00:54 js drwxr-xr-x 2 nobody 1000 4096 Apr 2 00:54 lang drwxr-xr-x 2 nobody 1000 4096 Apr 2 00:54 php drwxr-xr-x 43 nobody 1000 4096 Apr 2 00:54 plugins drwxr-xr-x 5 nobody 1000 4096 Apr 2 00:54 share drwxr-xr-x 3 rutorren root 4096 Apr 2 00:54 app drwxr-xr-x 2 rutorren root 4096 Apr 2 00:54 bin drwxr-xr-x 2 rutorren root 4096 Apr 2 00:54 etc drwxr-xr-x 3 rutorren root 4096 Apr 2 00:54 lib -rw-r--r-- 1 rutorren root 10835 Mar 29 17:32 openssl.cnf drwxr-xr-x 2 rutorren root 4096 Apr 2 00:54 sbin drwxr-xr-x 5 rutorren root 4096 Apr 2 00:54 share drwxr-xr-x 3 rutorren root 4096 Apr 2 00:54 usr drwxr-sr-x 3 rutorren root 4096 Apr 2 00:54 var ls: /etc/php/: No such file or directory iServe> conf.d/ && cat /etc/php/conf.d/com.synocommunity.packages.rutorrent.ini && ps | grep [t]iServe> conf.d/ && cat /etc/php/conf.d/com.synocommunity.packages.rutorrent.ini && ps | grep [iServe> conf.d/ && cat /etc/php/conf.d/com.synocommunity.packages.rutorrent.ini && ps | grepiServe> conf.d/ && cat /etc/php/conf.d/com.synocommunity.packages.rutorrent.ini && ps | griServe> conf.d/ && cat /etc/php/conf.d/com.synocommunity.packages.rutorrent.ini && ps | grep [t]orrent

rtorrent and rutorrent seems to be working fine, but every time I load a torrent, it just pauses.

http://i61.tinypic.com/2urkyur.jpg

moneytoo commented 10 years ago

I'm able to replicate the issue on fresh installation of DSM 4.3 (in virtual machine) so I should be able to track down the cause now.

loddo commented 10 years ago

Yeah sorry :) I have a DS411j with DSM4.3-3827. As far as I could understand, there are still some problems with 5.0-versions, so I decided to wait.

oh and thank you very much for looking into this! You rock sir :)

moneytoo commented 10 years ago

There's very silly mistake that I'm fixing right now.

loddo commented 10 years ago

Well :) I hope others also will benefit from this.

loddo commented 10 years ago

Hey :)

I'm not sure if your new change has been pushed to us users, but i uninstalled og reinstalled rutorrent, and not the error has gone away. Sadly my torrents are still paused :/

http://i61.tinypic.com/rw74u8.jpg

Does rutorrent work with DSM5.0? Maybe I should update then..

Again, thank you for your help :)

moneytoo commented 10 years ago

Does the application log (accessible from rutorrent profile in Package Center) tells anything?

loddo commented 10 years ago

arh.. should have checked that. Seems like there is still problems with permissions

skrmbillede 2014-04-02 kl 09 31 24

moneytoo commented 10 years ago

@loddo Shares and directories on DSM 4.3 are created with 777 by default so you could safely fix it by running chmod 777 /volume1/torrent/ if it wasn't like that for whatever reason. 775 should also work if the owner group of directory is correct but going with 777 is ok as it's default on DSM 4.3.

loddo commented 10 years ago

Wow :D I was pretty sure that I had already tried that! Thank you very much. My torrent started right away!

I'm really glad, that you have made rtorrent/rutorrent work as a package for this Synology NAS. Again - you rock sir :D

loddo commented 10 years ago

Wow :/ I'm really sorry about all these issues, but I seem to have run across a few.

After my first download started, I added some more torrents. All of them give the same error: "Storage error: [File chunk write error: Cannot allocate memory.]" I have looked for a solution, and in the .rtorrent.rc, it states: "max_memory_usage = 30262272" don't know if that is generated for my system, of if it's default? AFAIK other users have solved this by increasing the amount of ram used. But not all of our NAS's are alike, so that could create some problems since e.g. my box only has 128mb ram.

Also the client does not seem to recognize peers and seeds from private trackers? Notice my screenshot where the first torrent is downloading with 273KB/s, but there are no seeds or peers - this often happens with other torrents aswell.

The log-file is empty.

skrmbillede 2014-04-03 kl 12 06 56 skrmbillede 2014-04-03 kl 12 13 35