Help with nZEDb

Status
Not open for further replies.

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
  • FreeNAS 9.10.2.U2 STABLE
  • Supermicro X10SLM-F-O uATX
  • Intel G3420
  • Kingston 16GB (8GB x 2) ECC w/Hynix DRAM, 1333MHz, 1.5V - KVR1333D3E9SK2/16G
  • (4) WD Red 2TB in RaidZ2
  • (2) Supermicro 16GB SATADOM boot drives in mirror - SSD-DM016-PHI

Issue: I'm getting a 502 Bad Gateway error on the http://192.168.1.51 jail address. I need some fresh eyes on this, please.
Code:
service nginx restart
and
Code:
service php-fpm restart
do not produce any errors. Here are my nginx.conf and nzedb.conf files:
Code:
load_module /usr/local/libexec/nginx/ngx_mail_module.so;
load_module /usr/local/libexec/nginx/ngx_stream_module.so;

#user  nobody;
worker_processes  1;

# This default error log path is compiled-in to make sure configuration parsing
# errors are logged somewhere, especially during unattended boot when stderr
# isn't normally logged anywhere. This path will be touched on every nginx
# start regardless of error log location configured here. See
# https://trac.nginx.org/nginx/ticket/147 for more info.
#
error_log  /var/log/nginx/error.log;
#

#pid  logs/nginx.pid;


events {
  worker_connections  1024;
}


http {
  include  mime.types;
  default_type  application/octet-stream;

  #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  #  '$status $body_bytes_sent "$http_referer" '
  #  '"$http_user_agent" "$http_x_forwarded_for"';

  #access_log  logs/access.log  main;

  sendfile  on;
  #tcp_nopush  on;

  #keepalive_timeout  0;
  keepalive_timeout  65;

  #gzip  on;

  include nzedb.conf;


  # another virtual host using mix of IP-, name-, and port-based configuration
  #
  #server {
  #  listen  8000;
  #  listen  somename:8080;
  #  server_name  somename  alias  another.alias;

  #  location / {
  #  root  html;
  #  index  index.html index.htm;
  #  }
  #}


  # HTTPS server
  #
  #server {
  #  listen  443 ssl;
  #  server_name  localhost;

  #  ssl_certificate  cert.pem;
  #  ssl_certificate_key  cert.key;

  #  ssl_session_cache  shared:SSL:1m;
  #  ssl_session_timeout  5m;

  #  ssl_ciphers  HIGH:!aNULL:!MD5;
  #  ssl_prefer_server_ciphers  on;

  #  location / {
  #  root  html;
  #  index  index.html index.htm;
  #  }
  #}

}
Code:
server {
  # Change these settings to match your machine.
  listen 80;
  # server_name localhost;

  # These are the log locations, you should not have to change these.
  access_log /var/log/nginx-access.log;
  error_log /var/log/nginx-error.log;

  # This is the root web folder for nZEDb, you shouldn't have to change this.
  root /usr/local/www/nZEDb/www/;
  index index.php;

  # Everything below this should not be changed unless noted.
  location ~* \.(?:css|eot|gif|gz|ico|inc|jpe?g|js|ogg|oga|ogv|mp4|m4a|mp3|png|svg|ttf|txt|woff|xml)$ {
  expires max;
  add_header Pragma public;
  add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  }

  location / {
  try_files $uri $uri/ @rewrites;
  }

  location ^~ /covers/ {
  # This is where the nZEDb covers folder should be in.
  root /usr/local/www/nZEDb/resources;
  }

  location @rewrites {
  rewrite ^/([^/\.]+)/([^/]+)/([^/]+)/? /index.php?page=$1&id=$2&subpage=$3 last;
  rewrite ^/([^/\.]+)/([^/]+)/?$ /index.php?page=$1&id=$2 last;
  rewrite ^/([^/\.]+)/?$ /index.php?page=$1 last;
  }

  location ~ \.php$ {
  include /usr/local/etc/nginx/fastcgi_params;

  # Uncomment the following line and comment the .sock line if you want to use TCP.
  # fastcgi_pass 127.0.0.1:9000;
  fastcgi_pass unix:/var/run/php-fpm.sock;

  # The next two lines should go in your fastcgi_params
  fastcgi_index index.php;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
}
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
Standby. I am reading through the error logs and I'm seeing this blatant culprit. I'll let you know if I'm competent enough to solve this on my own. :)
Code:
2017/04/10 15:54:20 [crit] 39302#101586: *5 connect() to unix:/var/run/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 10.8.0.6, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "192.168.1.51"
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
Well, in nzedb.conf I commented
Code:
	   # fastcgi_pass unix:/var/run/php-fpm.sock;

and un-commented
Code:
fastcgi_pass 127.0.0.1:9000;

gives me a blank web page and this error
Code:
2017/04/10 16:54:51 [error] 53285#101484: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught exception 'lithium\core\ConfigException' with message 'The data connection `default` is not configured for model `app\models\Settings`.' in /usr/local/www/nZEDb/libraries/lithium/data/Model.php:1470
Stack trace:
#0 /usr/local/www/nZEDb/libraries/lithium/data/Model.php(659): lithium\data\Model::connection()
#1 /usr/local/www/nZEDb/app/models/Settings.php(176): app\models\Settings::lithium\data\{closure}(Array)
#2 /usr/local/www/nZEDb/libraries/lithium/data/Model.php(679): app\models\Settings::app\models\{closure}(Array, Object(Closure))
#3 /usr/local/www/nZEDb/libraries/lithium/aop/Filters.php(231): app\models\Settings::lithium\data\{closure}(Array)
#4 /usr/local/www/nZEDb/libraries/lithium/data/Model.php(682): lithium\aop\Filters::run('app\\models\\Sett...', 'find', Array, Object(Closure))
#5 /usr/local/www/nZEDb/app/models/Settings.php(252): lithium\data\Model::find('setting', Array)
#6 /usr/local/www/nZEDb/app/config/bootstrap/yenc.php(44): app\models\Settings::va" while reading response header from upstream, client: 10.8.0.6, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.51"

So yeah. I'm stuck. Help, please.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
hmm, I would check your settings in configuration/settings.php
 
Status
Not open for further replies.
Top