Qnap TS-239 Pro II and RTorrent++ (RSS Problem)

saroos1

Member
May 25, 2018
718
0
16
Hey guys,
I really don't know if it's the right place for "support", but since rTorrent++ is based on rtorrent 0.8.6 and rutorrent 3.2, i thought someone here might/can help me.

My Problem:
RSS won't update. It only works manually, but i want it to update even when i'm not logged in or have the webui open.

Here are my configs:
rtorrent.conf
Code:
# rtorrent++ project for QNAP NAS devices

min_peers = 40
max_peers = 200

min_peers_seed = 10
max_peers_seed = 50

max_uploads = 30

download_rate = 0
upload_rate = 60

max_downloads_global = 300
send_buffer_size = 2097152
receive_buffer_size = 2097152

directory = /share/Qdownload/rtorrent/downloads/

schedule = watch_directory,10,10,load_start=/share/Qdownload/rtorrent/watch/*.torrent
schedule = untied_directory,10,10,stop_untied=
schedule = tied_directory,10,10,start_tied=

schedule = low_diskspace,5,60,close_low_diskspace=100M

session = /share/Qdownload/rtorrent/session

execute={sh,-c,/opt/bin/php /share/HDA_DATA/.qpkg/rtorrent/root/.rtorrent++/www/rtorrent/php/initplugins.php &}



port_range = 50000-50010
port_random = yes

check_hash = yes
safe_sync = no

use_udp_trackers = yes

umask = 0022

max_memory_usage = 524288000

ratio.enable=
ratio.min.set=200
ratio.max.set=2000
ratio.upload.set=200M
system.method.set = group.seeding.ratio.command, d.close=, d.erase=

encryption = allow_incoming,try_outgoing,enable_retry

dht = off

dht_port = 6881

peer_exchange = no

system.method.set_key = event.download.finished,move_complete,"execute=mv,-f,$d.get_base_path=,/share/Qdownload/rtorrent/complete/ ;d.set_directory=/share/Qdownload/rtorrent/complete/"
scgi_port = :5000
encoding_list = UTF-8

lighttpd.conf
Code:
# lighttpd configuration file
#
# use it as a base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf 8127 2008-04-03 05:13:22Z rwhitby $

############ Options you really have to take care of ####################

## modules to load
# at least mod_access and mod_accesslog should be loaded
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_access",
# "mod_cml",
# "mod_trigger_b4_dl",
"mod_auth",
# "mod_status",
# "mod_setenv",
"mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
# "mod_cgi",
# "mod_compress",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
"mod_scgi",
"mod_accesslog" )

## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root = "/root/.rtorrent++/www/"

## where to send error-messages to
#server.errorlog = "/root/.rtorrent++/log/error.log"

# files to check for if .../ is requested
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
"lighttpd/index.html" )

## set the event-handler (read the performance section in the manual)
# server.event-handler = "freebsd-kqueue" # needed on OS X

# mimetype mapping
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar"
)

# Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetype.use-xattr = "enable"


## send a different Server: header
## be nice and keep it at lighttpd
# server.tag = "lighttpd"

#### accesslog module
#accesslog.filename = "/root/.rtorrent++/log/access.log"

## deny access the file-extensions
#
# ~ is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
# of the document-root
url.access-deny = ( "~", ".inc" )

$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}

##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".fcgi", ".php", ".pl", ".py", ".rb" )

######### Options that are good to be but not neccesary to be changed #######

## bind to port (default: 80)
server.port = 8081

## bind to localhost (default: all interfaces)
#server.bind = "grisu.home.kneschke.de"

## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"

## to help the rc.scripts
server.pid-file = "/root/.rtorrent++/run/lighttpd.pid"


###### virtual hosts
##
## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot
## or
## virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
#simple-vhost.default-host = "grisu.home.kneschke.de"
#simple-vhost.document-root = "/pages/"


##
## Format: <errorfile-prefix><status-code>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"

## virtual directory listings
#dir-listing.activate = "enable"

## enable debugging
#debug.log-request-header = "enable"
#debug.log-response-header = "enable"
#debug.log-request-handling = "enable"
#debug.log-file-not-found = "enable"

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"

## change uid to <uid> (default: don't care)
#server.username = "nobody"

## change uid to <uid> (default: don't care)
#server.groupname = "nobody"

#### compress module
#compress.cache-dir = "/tmp/lighttpd/cache/compress/"
#compress.filetype = ("text/plain", "text/html")

#### proxy module
## read proxy.txt for more info
#proxy.server = ( ".php" =>
# ( "localhost" =>
# (
# "host" => "192.168.0.101",
# "port" => 80
# )
# )
# )

#### fastcgi module
## read fastcgi.txt for more info
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fcgi.sock",
"bin-path" => "/usr/bin/rtorrent/bin/php",
"max-procs" => 1,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "2",
"PHP_FCGI_MAX_REQUESTS" => "4000"
)
)
)
)

#### CGI module
#cgi.assign = ( ".pl" => "/opt/bin/perl",
# ".cgi" => "/opt/bin/perl" )
#

#### SSL engine
#ssl.engine = "enable"
#ssl.pemfile = "server.pem"
#ssl.ca-file = "ca.crt"
#ssl.verifyclient.activate = "enable"
#ssl.verifyclient.enforce = "enable"
#ssl.verifyclient.depth = 1

#### status module
#status.status-url = "/server-status"
#status.config-url = "/server-config"

#### auth module
## read authentication.txt for more info
auth.backend = "plain"
auth.backend.plain.userfile = "/root/.rtorrent++/lighttpd.user"
#auth.backend.plain.groupfile = "lighttpd.group"

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

#auth.backend.ldap.hostname = "localhost"
#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
#auth.backend.ldap.filter = "(uid=$)"

#auth.require = ( "/server-status" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "user=jan"
# ),
# "/server-config" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "valid-user"
# )
# )

#### url handling modules (rewrite, redirect, access)
#url.rewrite = ( "^/$" => "/server-status" )
#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#### both rewrite/redirect support back reference to regex conditional using %n
#$HTTP["host"] =~ "^www\.(.*)" {
# url.redirect = ( "^/(.*)" => "http://%1/$1" )
#}

#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
#evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"

#### expire module
#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")

#### ssi
#ssi.extension = ( ".shtml" )

#### rrdtool
#rrdtool.binary = "/opt/bin/rrdtool"
#rrdtool.db-name = "/var/www/lighttpd.rrd"

#### setenv
#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
#setenv.add-response-header = ( "X-Secret-Message" => "42" )

## for mod_trigger_b4_dl
# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
# trigger-before-download.trigger-url = "^/trigger/"
# trigger-before-download.download-url = "^/download/"
# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
# trigger-before-download.trigger-timeout = 10

## for mod_cml
## don't forget to add index.cml to server.indexfiles
# cml.extension = ".cml"
# cml.memcache-hosts = ( "127.0.0.1:11211" )

#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"

## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")

#### include
#include /etc/lighttpd/lighttpd-inc.conf
## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
#include "lighttpd-inc.conf"

#### include_shell
#include_shell "echo var.a=1"
## the above is same as:
#var.a=1

# Configuration from other optware packages
#include_shell "cat /opt/etc/lighttpd/conf.d/*.conf"

scgi.server = (
"/RPC2" =>
( "127.0.0.1" =>
(
"host" => "127.0.0.1", # Ip where rtorrent is listening
"port" => 5000, # Port specified in .rtorrent.rc
# or use native unix socket
# "socket" => "/opt/var/run/rpc.socket",
"check-local" => "disable",
"disable-time" => 0 # don't disable scgi if connection fails
)
)
)

Where exactly is the Problem?
 

randac56

Member
May 25, 2018
915
0
16
a couple things to check:


first of all, make sure the rutorrent/share directory is owned by the webuser. (user running your webserver)

and in .rtorrent.rc make sure the execute line is correct. Here is mine:
Code:
execute = {sh,-c,/opt/webstack/bin/php /opt/webstack/http/php/initplugins.php wonslung &}


now, you'll notice that the format of this line is as follows:

execute = {sh,-c,

Then:
/path/to/php/binary

Then:
/path/to/rutorrent/base/

Then:
php/initplugins.php

Then:

username

closed off with:

&}

so let's assume you have rutorrent installed at /var/www/rutorrent and your php binary is /usr/bin/php and the username is jesus

your execute line would be:


Code:

execute = {sh,-c,/usr/bin/php /var/www/rutorrent/php/initplugins.php jesus &}
 

saroos1

Member
May 25, 2018
718
0
16
Okay, the only user running websever/rtorrent would be "admin". Can't change it thanks to Qnap :/ But the whole /share/ folder is owned by "admin" and chmod 755 running.

In my rtorrent.conf i have the following line allready edited:

Code:
execute={sh,-c,/opt/bin/php /share/HDA_DATA/.qpkg/rtorrent/root/.rtorrent++/www/rtorrent/php/initplugins.php &}
I checked by typing
Code:
[/] # which php
/opt/bin/php
[/] #

and by typing
Code:
[/] # find . | grep initplugins.php
./share/HDA_DATA/.qpkg/Optware/share/www/rutorrent/php/initplugins.php
./share/HDA_DATA/.qpkg/rtorrent/root/.rtorrent++/www/rtorrent/php/initplugins.php
[/] #
I think the last one is the right one?!
 

saroos1

Member
May 25, 2018
718
0
16
Maybe this helps you.

This is from the error.log:
Quote
2010-12-18 00:44:36: (log.c.166) server started
2010-12-18 01:01:00: (log.c.166) server started
2010-12-18 01:02:05: (server.c.1512) server stopped by UID = 0 PID = 6192
2010-12-18 01:02:04: (server.c.1502) unlink failed for: /var/run/lighttpd.pid 2 No such file or directory
2010-12-18 01:02:04: (server.c.1512) server stopped by UID = 0 PID = 6192
2010-12-18 01:08:56: (log.c.166) server started
2010-12-18 01:20:47: (server.c.1512) server stopped by UID = 0 PID = 7025
2010-12-18 01:20:50: (log.c.166) server started
2010-12-18 01:22:12: (server.c.1512) server stopped by UID = 0 PID = 7092
2010-12-18 01:22:14: (log.c.166) server started
2010-12-18 01:22:14: (mod_fastcgi.c.1104) the fastcgi-backend /opt/bin/php-fcgi failed to start:
2010-12-18 01:22:14: (mod_fastcgi.c.1108) child exited with status 2 /opt/bin/php-fcgi
2010-12-18 01:22:14: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2010-12-18 01:22:14: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2010-12-18 01:22:14: (server.c.938) Configuration of plugins failed. Going down.
2010-12-18 01:24:03: (log.c.166) server started
2010-12-18 01:24:03: (mod_fastcgi.c.1104) the fastcgi-backend /opt/bin/php failed to start:
2010-12-18 01:24:03: (mod_fastcgi.c.1108) child exited with status 0 /opt/bin/php
2010-12-18 01:24:03: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2010-12-18 01:24:03: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2010-12-18 01:24:03: (server.c.938) Configuration of plugins failed. Going down.
2010-12-18 01:24:52: (log.c.166) server started
2010-12-18 01:30:59: (server.c.1512) server stopped by UID = 0 PID = 7868
2010-12-18 01:31:02: (log.c.166) server started
2010-12-18 01:31:02: (mod_fastcgi.c.1104) the fastcgi-backend /opt/bin/php failed to start:
2010-12-18 01:31:02: (mod_fastcgi.c.1108) child exited with status 0 /opt/bin/php
2010-12-18 01:31:02: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2010-12-18 01:31:02: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2010-12-18 01:31:02: (server.c.938) Configuration of plugins failed. Going down.
2010-12-18 01:36:40: (log.c.166) server started
2010-12-18 01:36:40: (mod_fastcgi.c.1104) the fastcgi-backend /opt/bin/php failed to start:
2010-12-18 01:36:40: (mod_fastcgi.c.1108) child exited with status 0 /opt/bin/php
2010-12-18 01:36:40: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2010-12-18 01:36:40: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2010-12-18 01:36:40: (server.c.938) Configuration of plugins failed. Going down.
2010-12-18 01:36:42: (log.c.166) server started
2010-12-18 01:36:42: (mod_fastcgi.c.1104) the fastcgi-backend /opt/bin/php failed to start:
2010-12-18 01:36:42: (mod_fastcgi.c.1108) child exited with status 0 /opt/bin/php
2010-12-18 01:36:42: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2010-12-18 01:36:42: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2010-12-18 01:36:42: (server.c.938) Configuration of plugins failed. Going down.​