rTorrent + ruTorrent

Questions regarding modifying the torrent engine or download station may go here.
Forum rules
Please note the disclaimer before modifying your Synology Product.

Re: rTorrent + ruTorrent - lighttpd password

Postby ruppo » Thu Apr 21, 2011 9:18 pm

Paktas wrote:Regards to lighttpd passwords refer to manual of lighttpd at http://redmine.lighttpd.net/wiki/1/Docs:ModAuth

Not sure if this is the correct structure, but in it's simplest way, according to manual above, it should be something like this:

/opt/etc/lighttpd/lighttpd.conf
Code: Select all
auth.backend = "plain"
auth.backend.plain.userfile = "/opt/etc/lighttpd/lighttpd.user"

auth.require = ( "/rutorrent/" =>
(
"method" => "basic",
"realm" => "Password protected area",
"require" => "valid-user"
)
)


/opt/etc/lighttpd/lighttpd.user
Code: Select all
plaintextuser1:plaintextpassword1
plaintextuser2:plaintextpassword2


Be sure to restart lighttpd after the changes above. Would be great if someone posts if this works (or the working config).

I've just tried your solution, it and it works very well.
ruppo
I'm New!
I'm New!
 
Posts: 9
Joined: Wed Mar 02, 2011 1:33 pm

Re: rTorrent + ruTorrent

Postby molecule » Thu Apr 21, 2011 11:58 pm

Thanks Ruppo - that code worked!
molecule
I'm New!
I'm New!
 
Posts: 8
Joined: Tue Mar 29, 2011 8:59 pm

Re: rTorrent + ruTorrent

Postby Deefa » Tue Apr 26, 2011 5:52 am

Hi all,
I had a nicely running rtorrent+rutorrent install on my new DS211j, but for some reason it now will not start from the S99rtorrent script.
I seem to get no errors, and I can run rtorrent from the CLI, but I want it to start up when the DS boots up.
lighttpd is starting (I have it running from /usr/syn/etc/rc.d/S87lighttpd.sh) and I can connect to the rutorrent interface, so that is all configured right, but rtorrent does not want to start any more.
I've played around a but to try and get some error output but the logfile is empty.
Anyone have any ideas?
Deefa
I'm New!
I'm New!
 
Posts: 5
Joined: Tue Apr 05, 2011 9:33 am

Re: rTorrent + ruTorrent

Postby Paktas » Tue Apr 26, 2011 8:03 pm

needs more details on your configs... also refer to Troubleshooting on wiki.
Synology DS409 + 4 x WD CAVIAR GREEN 2TB
Paktas
Experienced
Experienced
 
Posts: 116
Joined: Wed Feb 17, 2010 10:45 pm
Location: Vilnius, Lithuania

Re: rTorrent + ruTorrent

Postby Deefa » Wed Apr 27, 2011 12:46 am

I managed to sort out the problem - a previous rtorrent session had locked the session folder and must have exited badly during a DS reboot.
I removed the lock file:
Code: Select all
rm -f /opt/share/torrent/session/*.lock

started rtorrent & restarted lighttpd
Code: Select all
/opt/etc/init.d/S99rtorrent start
/opt/etc/init.d/S80/lighttpd restart

All is running ok.
To actually view the 'session folder is locked' error message I did:
Code: Select all
cp /opt/etc/rtorrent.conf ~/.rtorrent.rc
rtorrent
I could tell that rtorrent wasn't using the configuration file /opt/etc/rtorrent.conf so copying this to the default .rtorrent.rc at least showed me what was happening.
Deefa
I'm New!
I'm New!
 
Posts: 5
Joined: Tue Apr 05, 2011 9:33 am

Re: rTorrent + ruTorrent

Postby Martin H » Tue May 10, 2011 8:03 pm

First thing.

The diskstation can't shutdown properly, how do I fix this? When hitting the shutdown button, it shuts down some of the applications running on the NAS but not all of them. So when I want to shut it down I need to push down the on/off button on the NAS.

Second thing, have anyone tried to get rtorrent-for-iphone up and running, http://code.google.com/p/rtorrent-for-iphone/ ?

I can't get it to work properly, I can see the torrents running but I can't add a new one.

- Martin
Martin H
I'm New!
I'm New!
 
Posts: 8
Joined: Wed Apr 07, 2010 8:00 pm

Re: rTorrent + ruTorrent

Postby Mosscow » Sun Jun 26, 2011 11:57 am

Re: rTorrent + ruTorrent
Hello, I'm getting the same error as Martin H. I get stuck at trying to restart rtorrent. I have checked my conf file and all seems good.

I get the error "-ash: /opt/etc/init.d/S99rtorrent: not found". But when go to the folder I can see SS99rtorrent. Seems like rtorrent can't start, also when I'm using "screen -list" is says "No Sockets found in /tmp/screens/S-root."

I have a new 411+II. Bootstrap installed fine. xmlrpc-c from SVN repository installed fine, except I had to manually install wget-ssl as there was an error. So

I tried to manually start rtorrent
> rtorrent -n -o import=/opt/etc/rtorrent.conf
rtorrent: Failed to parse command line option: Error in option file: /opt/etc/rtorrent.conf:4: Invalid start of name.
I can get RU torrent to load and I am getting the
[25.06.2011 12:12:12] WebUI started.
[25.06.2011 12:12:12] Bad link to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.

I also installed optware-devel as someone suggested. I have reinstalled xmlrpc-c using SVN repository. I have restarted NAS. Lightpad and RUTorrent working fine. I am stuck. Any help would be great.
I have read the troubleshooting wiki too.

rtorrent.conf
Code: Select all
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. #Remember to
# uncomment the options you wish to enable.

# Minumum amount of peers to connect per torrent, if available.
min_peers = 1

# Minumum amount of peers to connect per torrent.
max_peers = 40

# Same as above but for seeding completed torrents (-1 = same as downloading)
#min_peers_seed = 10
#max_peers_seed = 20

# Maximum number of simultanious uploads per torrent.
max_uploads = 5

# Global download rate in KiB. "0" for unlimited.
download_rate = 0

# Global upload rate in KiB. "0" for unlimited.
upload_rate = 70

# Default directory to save downloaded files. Note it doesn't support
# space yet.
directory = /volume1/downloads/

# Watch a directory for new torrents, and stop those that have been deleted.
schedule = watch_directory,5,5,load_start=/volume1/watch/*.torrent
schedule = untied_directory,5,5,stop_untied=

# Close torrents when diskspace is low.
#schedule = low_diskspace,5,60,close_low_diskspace=100M

# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
session = /volume1/session/

# The ip address reported to the tracker.
#ip = rakshasa

# The ip address the listening socket and outgoing connections is
# bound to.
#bind = rakshasa

# Port range to use for listening.
port_range = 6881-6999

# Start opening ports at a random position within the port range.
#port_random = no

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
#check_hash = no

# Set whetever the client should try to connect to UDP trackers.
#use_udp_trackers = yes

# Alternative calls to bind and ip that should handle dynamic ip's.
#schedule = ip_tick,0,1800,ip=rakshasa
#schedule = bind_tick,0,1800,bind=rakshasa

#
# Do not modify the following parameters unless you know what you're doing.
#

# Hash read-ahead controls how many MB to request the kernel to read
# ahead. If the value is too low the disk may not be fully utilized,
# while if too high the kernel might not be able to keep the read
# pages in memory thus end up trashing.
#hash_read_ahead = 10

# Interval between attempts to check the hash, in milliseconds.
#hash_interval = 100

# Number of attempts to check the hash while using the mincore status,
# before forcing. Overworked systems might need lower values to get a
# decent hash checking rate.
#hash_max_tries = 10

# Max number of files to keep open simultaniously.
#max_open_files = 128

# Number of sockets to simultaneously keep open.
#max_open_sockets = <no default>


# Example of scheduling commands: Switch between two ip's every 5
# seconds.
#schedule = "ip_tick1,5,10,ip=torretta"
#schedule = "ip_tick2,10,10,ip=lampedusa"

# Remove a scheduled event.
#schedule_remove = "ip_tick1"

# Stop torrents when reaching upload ratio in percent,
# when also reaching total upload in bytes, or when
# reaching final upload ratio in percent.
# example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0
#schedule = ratio,60,60,"stop_on_ratio=200,200M,2000"
schedule = ratio,30,60,stop_on_ratio=200


# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
#
# The example value allows incoming encrypted connections, starts unencrypted
# outgoing connections but retries with encryption if they fail, preferring
# plaintext to RC4 encryption after the encrypted handshake
#
# encryption = allow_incoming,enable_retry,prefer_plaintext

# Enable DHT support for trackerless torrents or when all trackers are down.
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
# The default is "off". For DHT to work, a session directory must be defined.
#
dht = disable

# UDP port to use for DHT.
#
# dht_port = 6881

# Enable peer exchange (for torrents not marked private)
#
# peer_exchange = yes

#
# Do not modify the following parameters unless you know what you're doing.
#
scgi_port = 127.0.0.1:5050


S99rtorrent
Code: Select all
#!/opt/bin/bash

############################################################################
#Optware package of rtorrent uses non-standard layout of directories.     ##
#Uncomment the following line to switch to the default layout of rtorrent.##
############################################################################
dirlayout=CUSTOM

#############
###<Notes>###
#############
# This script depends on screen.
# For the stop function to work, you must set an
# explicit session directory using ABSOLUTE paths (no, ~ is not absolute) in your rtorrent.rc.
# If you typically just start rtorrent with just "rtorrent" on the
# command line, all you need to change is the "user" option.
# Attach to the screen session as your user with
# "screen -dr rtorrent". Change "rtorrent" with srnname option.
# Licensed under the GPLv2 by lostnihilist: lostnihilist _at_ gmail _dot_ com
##############
###</Notes>###
##############

#######################
##Start Configuration##
#######################
# You can specify your configuration in a different file
# (so that it is saved with upgrades, saved in your home directory,
# or whateve reason you want to)
# by commenting out/deleting the configuration lines and placing them
# in a text file (say /home/user/.rtorrent.init.conf) exactly as you would
# have written them here (you can leave the comments if you desire
# and then uncommenting the following line correcting the path/filename
# for the one you used. note the space after the ".".
# . /etc/rtorrent.init.conf

#Do not put a space on either side of the equal signs e.g.
# user = user
# will not work
# system user to run as
user="root"

# the system group to run as, not implemented, see d_start for beginning implementation
# group=`id -ng "$user"`

prefix="/opt"

# the full path to the filename where you store your rtorrent configuration
if [ "${dirlayout}" = "RTORRENT_DEFAULT" ] ; then
  config="${prefix}/home/${user}/.rtorrent.rc"
else
  config="/opt/etc/rtorrent.conf"
fi

# set of options to run with
if [ "${dirlayout}" = "RTORRENT_DEFAULT" ] ; then
  options=""
else
  options="-n -o import=${config}"
fi

# default directory for screen, needs to be an absolute path
if [ "${dirlayout}" = "RTORRENT_DEFAULT" ] ; then
  base="${prefix}/home/${user}"
else
  base="/opt/share/torrent"
fi

# name of screen session
srnname="rtorrent"

# file to log to (makes for easier debugging if something goes wrong)
logfile="/opt/var/log/rtorrentInit.log"

#######################
###END CONFIGURATION###
#######################
PATH=/opt/bin:/opt/sbin:/usr/bin:/sbin:/bin:/usr/sbin
DESC="rtorrent"
NAME=rtorrent
DAEMON=$NAME
SCRIPTNAME=/etc/init.d/$NAME

# Do not proceed unless some apps are available.
test -x /opt/bin/screen || ( echo "screen not found." | tee -a "$logfile" >&2 ; exit 2 )
test -x /opt/bin/su -o -x /bin/su || ( echo "su not found." | tee -a "$logfile" >&2 ; exit 2 )

checkcnfg() {
   exists=0
   #for i in `echo "$PATH" | tr ':' '\n'` ; do
   #   if [ -f "$i/$NAME" ] ; then
         exists=1
   #      break
   #   fi
   #done


   if [ $exists -eq 0 ] ; then
      echo "cannot find rtorrent binary in PATH $PATH" | tee -a "$logfile" >&2
      exit 3
   fi
   if ! [ -r "${config}" ] ; then
      echo "cannot find readable config ${config}. check that it is there and permissions are appropriate" | tee -a "$logfile" >&2
      exit 3
   fi
   session=`getsession "$config"`
   if ! [ -d "${session}" ] ; then
      echo "cannot find readable session directory ${session} from config ${config}. check permissions" | tee -a "$logfile" >&2
      exit 3
   fi
}

d_start() {
  [ -d "${base}" ] && cd "${base}"

  stty stop undef && stty start undef
  #su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "screen -dm -S ${srnname} 2>&1 1>/dev/null" ${user} | tee -a "$logfile" >&2
  # this works for the screen command, but starting rtorrent below adopts screen session gid
  # even if it is not the screen session we started (e.g. running under an undesirable gid
  #su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "sg \"$group\" -c \"screen -fn -dm -S ${srnname} 2>&1 1>/dev/null\"" ${user} | tee -a "$logfile" >&2
  #su -c "screen -S "${srnname}" -X screen rtorrent ${options} 2>&1 1>/dev/null" ${user} | tee -a "$logfile" >&2
   su -c "screen -dmS ${srnname} rtorrent ${options} 2>$logfile"
}

d_stop() {
   session=`getsession "$config"`
   if ! [ -s ${session}/rtorrent.lock ] ; then
      return
   fi
   pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed "s/[^0-9]//g"`
   if ps | grep -sq ${pid}.*rtorrent ; then # make sure the pid doesn't belong to another process
      kill -s INT ${pid}
   fi
}

getsession() {
   session=`awk '/^[[:space:]]*session[[:space:]]*=[[:space:]]*/{print($3)}' "$config"`
   echo $session
}

checkcnfg

case "$1" in
  start)
   echo -n "Starting $DESC: $NAME"
   d_start
   echo "."
   ;;
  stop)
   echo -n "Stopping $DESC: $NAME"
   d_stop
   echo "."
   ;;
  restart|force-reload)
   echo -n "Restarting $DESC: $NAME"
   d_stop
   sleep 1
   d_start
   echo "."
   ;;
  *)
   echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
   exit 1
   ;;
esac

exit 0
Mosscow
I'm New!
I'm New!
 
Posts: 3
Joined: Sun Jun 26, 2011 11:43 am

Re: rTorrent + ruTorrent

Postby Paktas » Sun Jun 26, 2011 7:54 pm

Not sure if this will help, but from what I've found on google, seems that there could be a problem with a stray CR (new line) character. Don't edit the file on Windows, rtorrent accepts only LF as line ending.

Try to re-edit the same file with VIM, MC or similar CLI editor and see if that helps in starting rtorrent.
Synology DS409 + 4 x WD CAVIAR GREEN 2TB
Paktas
Experienced
Experienced
 
Posts: 116
Joined: Wed Feb 17, 2010 10:45 pm
Location: Vilnius, Lithuania

Re: rTorrent + ruTorrent

Postby DavidA » Thu Sep 01, 2011 9:34 pm

I have rtorrent and rutorrent working on my DS411+.

I'd like to upgrade to the latest version of rtorrent (0.8.9) and rutorrent (3.2) but I'm worried about losing my settings and/or breaking it. Can anyone give me an idiots guide please?
DavidA
I'm New!
I'm New!
 
Posts: 2
Joined: Thu Sep 01, 2011 9:28 pm

Re: rTorrent + ruTorrent

Postby timurka » Thu Jan 05, 2012 12:22 am

My rutorrent will not show the active/completed torrent files. Its empty but the rtorrent states that my test torrent file is downloaded.
In the log of the rutorrent I've got those messages:
Code: Select all
[04.01.2012 18:17:23] WebUI started.
[04.01.2012 18:17:25] mediainfo: Plugin will not work. rTorrent user can't access external program (mediainfo).
[04.01.2012 18:17:25] screenshots: Plugin will not work. rTorrent user can't access external program (ffmpeg).
[04.01.2012 18:17:27] JS error: [http://192.168.0.103:8081/rutorrent/js/webui.js : 2292] Uncaught TypeError: Object #<rPlugin> has no method 'getTable'
[04.01.2012 18:17:27] JS error: [http://192.168.0.103:8081/rutorrent/js/webui.js : 2292] Uncaught TypeError: Object #<rPlugin> has no method 'getTable'
[04.01.2012 18:17:27] JS error: [http://192.168.0.103:8081/rutorrent/js/webui.js : 2292] Uncaught TypeError: Object #<rPlugin> has no method 'getTable'


Can someone advice me?
timurka
I'm New!
I'm New!
 
Posts: 8
Joined: Tue Mar 08, 2011 5:50 am

Re: rTorrent + ruTorrent

Postby timurka » Tue Jan 17, 2012 4:56 am

This issue is fixed by updating rutorrent and plugins from svn.
timurka
I'm New!
I'm New!
 
Posts: 8
Joined: Tue Mar 08, 2011 5:50 am

Re: rTorrent + ruTorrent

Postby jenskristian » Tue Jan 17, 2012 10:16 pm

Has anyone tried updating to DSM 4.0 Beta? How does it affect rTorrent and ruTorrent?
Synology DS1511+ | 5 x Seagate Barracuda XT 3TB | DSM 5.0-4458
jenskristian
I'm New!
I'm New!
 
Posts: 6
Joined: Sat Jul 02, 2011 9:07 am
Location: Norway

Re: rTorrent + ruTorrent

Postby TRiPgod » Sun Mar 11, 2012 4:38 am

jenskristian wrote:Has anyone tried updating to DSM 4.0 Beta? How does it affect rTorrent and ruTorrent?

My same setup that worked with DSM 3.1 works with the new 4.0.

rtorrent 0.8.6
libtorrent 0.12.6
rutorrent 3.2
xmlrpc 1.25.14 (a little newer)
TRiPgod
Novice
Novice
 
Posts: 46
Joined: Wed May 20, 2009 3:18 pm

Re: rTorrent + ruTorrent

Postby Paktas » Sun Mar 11, 2012 5:57 pm

timurka, not sure but I think you are getting rutorrent Javascript errors. Try updating rutorrent or report the error/behavior to them.
It doesn't seem to be Synology issue.

The other to plugin errors - simply disable mediainfo and screenshots plugins.
Synology DS409 + 4 x WD CAVIAR GREEN 2TB
Paktas
Experienced
Experienced
 
Posts: 116
Joined: Wed Feb 17, 2010 10:45 pm
Location: Vilnius, Lithuania

Re: rTorrent + ruTorrent

Postby Phocea » Mon Mar 12, 2012 4:33 pm

Is there any plan or way to update rtorrent to the latest stable version.
Mainly to be able to handle magnet url. Without this the rss plugin of rutorrent is becoming totally useless on P.bay for example.

Latest version of rutorrent handle them, but libtrorrent and rtorrent also need to be updated for it to work.
Phocea
I'm New!
I'm New!
 
Posts: 2
Joined: Thu Aug 11, 2011 9:20 am

PreviousNext

Return to Torrent Engines/Download Station Mods

Who is online

Users browsing this forum: No registered users and 1 guest