SOLVED Newznab With FreeNAS

Status
Not open for further replies.

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Update:
It seems like tmdb works but others have experienced the same error occassionally.

Tmux successful downgraded to 2.0 see .

I tried to create a fresh jail for nzedb to test it without messing up my older version that now sees to be working, but I get errors:

Code:
2016/05/05 21:49:14 [emerg] 16878#101553: dlopen() "/usr/local/etc/nginx/modules/ngx_mail_module.so" failed (Cannot open "/usr/local/etc/nginx/modules/ngx_mail_module.so") in /usr/local/etc/nginx/nginx.conf:1
2016/05/05 22:03:31 [error] 17157#101480: *1 FastCGI sent in stderr: "PHP message: PHP Warning:  require_once(app/libraries/autoload.php): failed to open stream: No such file or directory in /usr/local/www/nZEDb/autoloader.php on line 39
PHP message: PHP Fatal error:  require_once(): Failed opening required 'app/libraries/autoload.php' (include_path='.:/usr/local/share/pear') in /usr/local/www/nZEDb/autoloader.php on line 39" while reading response header from upstream, client: 192.168.1.6, server: 192$


My guess is it has something to do with the upgrade of nginx to version to
2016-04-26 nginx-1.10.0 stable version has been released.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I can ping the router from the jail
--- 192.168.1.1 ping statistics ---
21 packets transmitted, 21 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.349/0.904/7.123/1.402 ms

Seems like tmdb works and then craps out hrs later.
http://imgur.com/oA6t65n

Also got this error with multiple terminal windows up in the jail 1 doing update_releases, 2 doing backfill
[root@nzedb_1 /usr/local/www/nZEDb/misc/update]# php backfill alt.binaries.teevee 100000000
Could not open input file: backfill

Suggestions I've gotten in the IRC channel is freenas is unstable and I should reinstall, Install Ubuntu as a VM in a jail to run nzedb.

I know your setup is running fine on freenas but they don't support it.
Lol, trust me you can run a stable nZEDb server on FreeNAS / FreeBSD. I've had a pretty large operation running on my FreeBSD server for the last year and a half.

But, it is a fairly complicated program, and you will hit alot of issues because it is uncharted territory. It takes time to be proficient with FreeBSD, the little issues you hit here and there like running 'php backfill' instead of 'php backfill.php' seem simple to solve to me, but I've also spent alot of time messing around with FreeBSD the last few years, so I've hit these issues and learned from them already.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Update:
It seems like tmdb works but others have experienced the same error occassionally.

Tmux successful downgraded to 2.0 see .

I tried to create a fresh jail for nzedb to test it without messing up my older version that now sees to be working, but I get errors:

Code:
2016/05/05 21:49:14 [emerg] 16878#101553: dlopen() "/usr/local/etc/nginx/modules/ngx_mail_module.so" failed (Cannot open "/usr/local/etc/nginx/modules/ngx_mail_module.so") in /usr/local/etc/nginx/nginx.conf:1
2016/05/05 22:03:31 [error] 17157#101480: *1 FastCGI sent in stderr: "PHP message: PHP Warning:  require_once(app/libraries/autoload.php): failed to open stream: No such file or directory in /usr/local/www/nZEDb/autoloader.php on line 39
PHP message: PHP Fatal error:  require_once(): Failed opening required 'app/libraries/autoload.php' (include_path='.:/usr/local/share/pear') in /usr/local/www/nZEDb/autoloader.php on line 39" while reading response header from upstream, client: 192.168.1.6, server: 192$


My guess is it has something to do with the upgrade of nginx to version to
2016-04-26 nginx-1.10.0 stable version has been released.
NGINX related error looks like you don't have a proper nginx config, and it's trying to load mail for some reason.

As for the PHP error, it looks like something to do with 'composer'
See https://github.com/nZEDb/nZEDb/blob/0.x/Changelog#L102
I've never used this, haven't updated since last month, but I'll look into this soon and see if I can figure out what's going on.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I think both errors are related to composer and any new install will have the same problem from the latest nZEDb version. I mistakenly installed composer in a working nzedb jail and I got the same error and can't access it from the web interface (to many terminal tabs open and was in the wrong one). I think the lasted version of nzedb requires composer as I can't make a new jail with it that doesn't give :
The 192.168.1.160 page isn’t working

192.168.1.160 is currently unable to handle this request.
500

When I run the composer install command-line installation it gives these errors:
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The filter extension is missing.
Install it or recompile php without --disable-filter

The iconv OR mbstring extension is required and both are missing.
Install either of them or recompile php without --disable-iconv

Thanks for trying to figure it out.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I think both errors are related to composer and any new install will have the same problem from the latest nZEDb version. I mistakenly installed composer in a working nzedb jail and I got the same error and can't access it from the web interface (to many terminal tabs open and was in the wrong one). I think the lasted version of nzedb requires composer as I can't make a new jail with it that doesn't give :


When I run the composer install command-line installation it gives these errors:


Thanks for trying to figure it out.
the ReleaseNotes explain what you need to do. I'm working through 2 issues right now that cause it not to work on freebsd. should be fixed soon
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
the ReleaseNotes explain what you need to do.
From the release notes 'We recommend the global method, as we do not provide the composer.phar file in our repo.'
This is the global method:
Code:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '92102166af5abdb03f49ce52a40591073a7b859a86e8ff13338cf7db58a19f7844fbc0bb79b2773bf30791e935dbd938') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

This installer script will simply check some php.ini settings, warn you if they are set incorrectly, and then download the latest composer.phar in the current directory. The 4 lines above will, in order:
I guess I don't know how to fix those options in the php.ini
I'm working through 2 issues right now that cause it not to work on freebsd. should be fixed soon
Look forward to seeing your fix.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
you just install php-composer
then run the commands they gave.
the zed script won't work because it points to /bin/bash but that's already fixed in dev. then the git.php library they have won't work either because it hard codes Linux paths but that should be easy to fix upstream.

I personally was able to update my system by dealing with those 2 issues.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I'm not getting it. I thought the command for installing php composer was 'php composer-setup.php'. If I run install php-composer it seems to want addtional options
Code:
usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...


Can you expand on the fix for the other 2 steps? I can't get past the install so far.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
pkg install php-composer

edit zed and change bash to sh
search for and edit Git.php and change /usr/bin/git to /usr/local/bin/git

I'll get these changed upstream though, and we just need to add php-composer to the wiki
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
got the 1 and 2 done but can't locate Git.php. Sorry
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Looks like the locate command did it but which one should I edit?
Code:
locate Git.php
/usr/local/www/nZEDb/app/extensions/util/Git.php
/usr/local/www/nZEDb/nZEDb/libs/Git.php
/usr/local/www/nZEDb/nZEDb/libs/Git.php/Git.php
/usr/local/www/nZEDb/nZEDb/libs/Git.php/composer.json
/usr/local/www/nZEDb/nZEDb/libs/Git.php/license.txt
/usr/local/www/nZEDb/nZEDb/libs/Git.php/readme.md
/usr/local/www/nZEDb/nZEDb/libs/Git.php/test
/usr/local/www/nZEDb/nZEDb/libs/Git.php/test/test-suite.php
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/Git.php
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/composer.json
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/license.txt
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/readme.md
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/test
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/test/test-suite.php
/usr/local/www/nZEDb/nZEDb/nZEDb/nzedb/utility/Git.php
/usr/local/www/nZEDb/nZEDb/nzedb/utility/Git.php
/usr/local/www/nZEDb/nzedb/utility/Git.php
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Looks like the locate command did it but which one should I edit?
Code:
locate Git.php
/usr/local/www/nZEDb/app/extensions/util/Git.php
/usr/local/www/nZEDb/nZEDb/libs/Git.php
/usr/local/www/nZEDb/nZEDb/libs/Git.php/Git.php
/usr/local/www/nZEDb/nZEDb/libs/Git.php/composer.json
/usr/local/www/nZEDb/nZEDb/libs/Git.php/license.txt
/usr/local/www/nZEDb/nZEDb/libs/Git.php/readme.md
/usr/local/www/nZEDb/nZEDb/libs/Git.php/test
/usr/local/www/nZEDb/nZEDb/libs/Git.php/test/test-suite.php
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/Git.php
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/composer.json
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/license.txt
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/readme.md
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/test
/usr/local/www/nZEDb/nZEDb/nZEDb/libs/Git.php/test/test-suite.php
/usr/local/www/nZEDb/nZEDb/nZEDb/nzedb/utility/Git.php
/usr/local/www/nZEDb/nZEDb/nzedb/utility/Git.php
/usr/local/www/nZEDb/nzedb/utility/Git.php
the Git.php/Git.php has the hardcoded path
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I've tried so many things to get this working again and may have messed up the jail so I decided to start from scratch with a new jail.
Code:
find /usr/ -name 'Git.php'
/usr/local/www/nZEDb/app/extensions/util/Git.php
/usr/local/www/nZEDb/nzedb/utility/Git.php

Both of those don't have /usr/bin/git in the Git.php
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I've tried so many things to get this working again and may have messed up the jail so I decided to start from scratch with a new jail.
Code:
find /usr/ -name 'Git.php'
/usr/local/www/nZEDb/app/extensions/util/Git.php
/usr/local/www/nZEDb/nzedb/utility/Git.php

Both of those don't have /usr/bin/git in the Git.php
/usr/local/www/nZEDb/nZEDb/libs/Git.php/Git.php
how did you not see that when I put Git.php/Git.php?
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I guess I didn't understand the directions you gave. Did you want me to create the file @pirateghost referenced, because it doesn't exist currently.
Code:
nano /usr/local/www/nZEDb/libs/Git.php/Git.php

and edit the line
Code:
$binPath = $binPath ?: '/usr/bin/git';

to be
Code:
$binPath = $binPath ?: '/usr/local/bin/git';

Then when I run
Code:
./zed update nzedb

I get
Code:
./zed update nzedb
./zed: libraries/lithium/console/li3: not found
 
Last edited:

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I did some research and realize that the git clone command in the original instructions clones all the files in the git repository onto my system in the nZEDb directory. In the past you could git pull to get the updates. Now they have changed over to composer to track those updates.
pkg install composer- installs composer
./zed update nzedb
This will check and install all dependencies and then run the Db updater automatically.
You may have to set permissions on .../app/libraries and .../resources/smarty/templates_c
* We are now using the lithium (li3) framework to handle a number of tasks. The ./zed
command is an alias to the frameworks li3 console command added in the nZEDb directory for
convenience (always use this directory to run such commands in your shell).
So the file Git.php/Git.php should have been on my system when I did the git clone command on setup but it wasn't didn't put that file on my system? Did I have to do it manually?
Does chown -R www:www /usr/local/www/nZEDb change the permission appropriately for the .../app/libraries and .../resources/smarty/templates_c?
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Code:
pkg install php-composer
composer install
./zed update nzedb

Got it working new and old install of nzedb.
Thanks Johsua and pirateghost
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
welcome, the 'git clone' command wouldnt put the Git.php/Git.php file there, but it would put the lithium libraries there for you, which would then grab the stuff in libraries
 
Status
Not open for further replies.
Top