OpenWrt Forum Archive

Topic: Please help Running nzbget.

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi there!

I am using latest Trunk on 1024nd from tplink. (R27340)
I sucessfully conected an external Harddisk on active USB Hub.
Now is want to use nzbget.

For that i installed nzbget and nzbgetweb.
Luci is also installed.

When i Run Top then uhttpd is up with /www/nzbgetweb, the nzbget deamon is also up.
But if i try to connect to the webinterface using Browser at http://192.168.1.1:8008
i get an empty page displayed with One sentence "No input file specified"

Is there an Solution for that? What i am doing wring?

Thanks for your reply!

What do you mean with specify a Source?

I edited The /etc/nzbget.conf as described in the wiki_

- added the maindir and created it using mkdir
- same for tmp, queue and other dirs
- configured my newsserver

i tried wit running Deamon -> Same result
itried without Deamon running -> Same Result

EDIT:

it seems to somethimg with the webinterface,
in terminal nzbget is running fine!! (nzbget -s)

(Last edited by derdigge on 15 Jul 2011, 20:24)

So far so good!

I have now more information about the problem.

reason could be something wit uhttpd or php interpreter
- i tried apache - looks terrible, but page is been displayed (somekind of html screwup)


My uhttpd.conf:

config 'uhttpd' 'main'
        list 'listen_http' '0.0.0.0:80'
        list 'listen_https' '0.0.0.0:443'
        option 'home' '/www'
        option 'rfc1918_filter' '1'
        option 'cert' '/etc/uhttpd.crt'
        option 'key' '/etc/uhttpd.key'
        option 'cgi_prefix' '/cgi-bin'
        option 'script_timeout' '60'
        option 'network_timeout' '30'
        option 'tcp_keepalive' '1'

config 'cert' 'px5g'
        option 'days' '730'
        option 'bits' '1024'
        option 'country' 'DE'
        option 'state' 'Berlin'
        option 'location' 'Berlin'
        option 'commonname' 'OpenWrt'

config 'uhttpd' 'nzbgetweb'
        option 'listen_http' '0.0.0.0:8008'
        option 'script_timeout' '60'
        option 'network_timeout' '30'
        option 'home' '/www/nzbgetweb'
        option 'index_page' 'index.php'
        option 'interpreter' '.php=/usr/bin/php-cgi'

any Suguestions?

OK Next Update!

It is the PHP interpreter!!

Just Edit /etc/php.ini

; Paths and Directories

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
doc_root = "/www"                <- This line has to be changes to : doc_root = "/www/nzbgetweb"
user_dir =
extension_dir = "/usr/lib/php"
enable_dl = On
;cgi.force_redirect = 1
;cgi.nph = 1
;cgi.redirect_status_env = ;
cgi.fix_pathinfo=1
;fastcgi.impersonate = 1;
;fastcgi.logging = 0
;cgi.rfc2616_headers = 0

An Taaadddaaa Webinterface came up as excpected!

But now we are at Current State :
Web Interface told me:

ERROR: Could not detect available RPC-API: old PHP version or modules missing. See README for details.

the final solution was to install the json_rpc package.
nzbgetweb works now.

But believe me, you dont want it to run it on your router.
I tested it with an 200mb file to download. It hoggs the cpu
and ram of the router like hell. added 128mb swap.

you cant access luci at all! cpu is permanent at 100%. (running top)
as a result of that the download is becomming slow ~ 200kb/s.

for me it makes no sense running such a service on a mips plattform.

Maybe you intended to say that you have WR1043ND? There is no model 1024nd on TP-Link's site.

Anyway, I have WR1043ND, and use both nzbget and nzbgetweb. This combination works works very well, and while nzbget uses a lot of RAM, it almost doesn't use CPU (usage is 4-5%) and downloads max out my connection speeds ( ~320Kb/s).

The reason why you get different result may be related to a configuration. In the beginning I also had severe performance issues, but some tweaking resolved them.

It is very important to change value of WriteBufferSize. By default it is set to 0. As the result, I/O is very high - on my router I/O usage was constantly above 90%, which caused both significant drop in download speed (which reached 100Kb/s at it's peaks) and overloaded the machine so that it barely responded. After I changed buffer size to 2Mb I/O dropped to 6-8%, machine became responsive and download speeds reached maximum levels. BTW, setting buffer size to -1 will probably be even a better idea, since automatic cache management may use RAM more efficiently, but I am pleased enough with the current results.


In addition, related to your earlier posts: I just unset doc_root, otherwise it seems that if you install additional web server components which use PHP they may not work properly, since setting doc_root to a particular directory will prevent serving files outside this directory (see PHP documentation for doc_root). Also, I installed php5-mod-json instead of json_rpc (there is no such package in openwrt repository for the device).

The discussion might have continued from here.