Fresh install on buster 10 fails - nginx failure

per instructions I have installed bluecherry via

sudo bash -c “$(curl -s https://dl.bluecherrydvr.com/scripts/install-unstable)”

uname output

uname -a
Linux 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux

!!!

install failure snippit

Creating config file /etc/php/7.3/fpm/php.ini with new version
Created symlink /etc/systemd/system/multi-user.target.wants/php7.3-fpm.service → /lib/systemd/system/php7.3-fpm.service.
Setting up libpython3.7-dev:amd64 (3.7.3-2+deb10u3) …
Setting up libnginx-mod-http-image-filter (1.14.2-2+deb10u4) …
Setting up nginx-full (1.14.2-2+deb10u4) …
Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xe” for details.
invoke-rc.d: initscript nginx, action “start” failed.
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2021-06-13 17:42:50 CDT; 6ms ago
Docs: man:nginx(8)
Process: 16605 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Jun 13 17:42:50 apl-srv-nvr systemd[1]: Starting A high performance web server and a reverse proxy server…
Jun 13 17:42:50 apl-srv-nvr nginx[16605]: nginx: [emerg] open() “/usr/share/bluecherry/nginx-includes/.conf” failed (2: No such file or directory) in /etc/nginx/sites-enabled/bluecherry.conf:12
Jun 13 17:42:50 apl-srv-nvr nginx[16605]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 13 17:42:50 apl-srv-nvr systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jun 13 17:42:50 apl-srv-nvr systemd[1]: nginx.service: Failed with result ‘exit-code’.
Jun 13 17:42:50 apl-srv-nvr systemd[1]: Failed to start A high performance web server and a reverse proxy server.
dpkg: error processing package nginx-full (–configure):
installed nginx-full package post-installation script subprocess returned error exit status 1
Setting up python3.7-dev (3.7.3-2+deb10u3) …
Setting up php-mail-mime (1.10.2-0.1) …
Setting up va-driver-all:amd64 (2.4.0-1) …
Setting up vainfo (2.4.0+ds1-1) …
Setting up php-fpm (2:7.3+69) …
Setting up php-cli (2:7.3+69) …
Setting up g++ (4:8.3.0-1) …
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.6) …
Setting up php-gd (2:7.3+69) …
Setting up php-auth-sasl (1.0.6-3) …
Setting up libpython3-dev:amd64 (3.7.3-1) …
dpkg: dependency problems prevent configuration of nginx:
nginx depends on nginx-full (<< 1.14.2-2+deb10u4.1~) | nginx-light (<< 1.14.2-2+deb10u4.1~) | nginx-extras (<< 1.14.2-2+deb10u4.1~); however:
Package nginx-full is not configured yet.
Package nginx-light is not installed.
Package nginx-extras is not installed.
nginx depends on nginx-full (>= 1.14.2-2+deb10u4) | nginx-light (>= 1.14.2-2+deb10u4) | nginx-extras (>= 1.14.2-2+deb10u4); however:
Package nginx-full is not configured yet.
Package nginx-light is not installed.
Package nginx-extras is not installed.

dpkg: error processing package nginx (–configure):
dependency problems - leaving unconfigured
Setting up python3-dev (3.7.3-1) …
dpkg: dependency problems prevent configuration of bluecherry:
bluecherry depends on nginx; however:
Package nginx is not configured yet.
Package nginx-full which provides nginx is not configured yet.

dpkg: error processing package bluecherry (–configure):
dependency problems - leaving unconfigured
Setting up odbcinst (2.3.6-0.1) …
Setting up odbcinst1debian2:amd64 (2.3.6-0.1) …
Setting up libgdal20 (2.4.0+dfsg-1+b1) …
Setting up libopencv-imgcodecs3.2:amd64 (3.2.0+dfsg-6) …
Processing triggers for libc-bin (2.28-10) …
Processing triggers for rsyslog (8.1901.0-1) …
Processing triggers for systemd (241-7~deb10u7) …
Processing triggers for man-db (2.8.5-2) …
Errors were encountered while processing:
nginx-full
nginx
bluecherry
E: Sub-process /usr/bin/dpkg returned an error code (1)

!!!

systemctl status nginx

● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2021-06-13 17:42:50 CDT; 51s ago
Docs: man:nginx(8)

Jun 13 17:42:50 apl-srv-nvr systemd[1]: Starting A high performance web server and a reverse proxy server…
Jun 13 17:42:50 apl-srv-nvr nginx[16605]: nginx: [emerg] open() “/usr/share/bluecherry/nginx-includes/.conf” failed (2
Jun 13 17:42:50 apl-srv-nvr nginx[16605]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 13 17:42:50 apl-srv-nvr systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jun 13 17:42:50 apl-srv-nvr systemd[1]: nginx.service: Failed with result ‘exit-code’.
Jun 13 17:42:50 apl-srv-nvr systemd[1]: Failed to start A high performance web server and a reverse proxy server.
lines 1-11/11 (END)

!!!

bluecherry version

apt info bluecherry
Package: bluecherry
Version: 3:3.1.0-rc1

!!!
END


attempts to resolve

  • apt-install -f
  • reboot and re-install via apt install bluecherry
  • autoremove and re-install via apt install bluecherry
  • manually install missing nginx packages
  • nuke os and re-install 3 times
  • comment out IPv6 in /etc/nginx/sites-enabled/default.conf follwed by nginx -t (fails)
  • reload nginx via systemctl enable/start stop, start

edit 1: words

Edit /etc/nginx/sites-enabled/bluecherry.conf

Change: /usr/share/bluecherry/nginx-includes/.conf

to: /usr/share/bluecherry/nginx-includes/buster.conf

then run:

nginx -t

wow, thanks for the fast reply!

making progress:
nginx is now running but with a PID invalid argument and I am now getting a bad gateway (progress!)

#steps to resolve nginx

root@apl-srv-nvr:/home/apl-srv-nvr# vi /etc/nginx/sites-enabled/bluecherry.conf

changed /usr/share/bluecherry/nginx-includes/.conf to: /usr/share/bluecherry/nginx-includes/buster.conf

!!!

/usr/sbin/nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

!!!

root@apl-srv-nvr:/home/apl-srv-nvr# systemctl start nginx
root@apl-srv-nvr:/home/apl-srv-nvr# systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-06-13 18:21:20 CDT; 2s ago
Docs: man:nginx(8)
Process: 21994 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 21995 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 21996 (nginx)
Tasks: 3 (limit: 4701)
Memory: 3.9M
CGroup: /system.slice/nginx.service
├─21996 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
├─21997 nginx: worker process
└─21998 nginx: worker process

Jun 13 18:21:20 apl-srv-nvr systemd[1]: Starting A high performance web server and a reverse proxy server…
Jun 13 18:21:20 apl-srv-nvr systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
Jun 13 18:21:20 apl-srv-nvr systemd[1]: Started A high performance web server and a reverse proxy server.

!!!

root@apl-srv-nvr:/home/apl-srv-nvr# systemctl status bluecherry
● bluecherry.service - LSB: Bluecherry DVR Server
Loaded: loaded (/etc/init.d/bluecherry; generated)
Active: active (running) since Sun 2021-06-13 18:26:41 CDT; 3min 4s ago
Docs: man:systemd-sysv-generator(8)
Process: 428 ExecStart=/etc/init.d/bluecherry start (code=exited, status=0/SUCCESS)
Tasks: 6 (limit: 4701)
Memory: 58.4M
CGroup: /system.slice/bluecherry.service
└─455 /usr/sbin/bc-server -s -u bluecherry -g bluecherry

Jun 13 18:26:40 apl-srv-nvr systemd[1]: Starting LSB: Bluecherry DVR Server…
Jun 13 18:26:41 apl-srv-nvr systemd[1]: Started LSB: Bluecherry DVR Server.
Jun 13 18:26:40 apl-srv-nvr bc-server[455]: I(): Status reports are served at /tmp/bluecherry_status
Jun 13 18:26:40 apl-srv-nvr bc-server[455]: I(): Status reports are served at /tmp/bluecherry_trigger
Jun 13 18:26:40 apl-srv-nvr bc-server[455]: I(): Started bc-server 3.1.0 (toolchain 8.3.0) v2.7.6-537-g019fc2d3-dirty
Jun 13 18:26:40 apl-srv-nvr bc-server[455]: I(): HLS server started listen to port: 7003 (SSL=0)
Jun 13 18:26:41 apl-srv-nvr bc-server[455]: I(): SQL database connection opened
Jun 13 18:26:41 apl-srv-nvr bc-server[455]: I(): Database doesnot contain oldest media file entry
Jun 13 18:26:41 apl-srv-nvr bc-server[455]: I(): v3license server started
lines 1-19/19 (END)

!!!

web console bad gateway

https://ip:7001

502 BadGateway

nginx/1.14.2

!!!

attempts to resolve

  • systemctl restart nginx (status is good)
  • systemctl restart bluecherry (status is good)
  • apt install bluecherry
  • reboot

edit: formatting

Hi Echofox,

you need to edit the path to php7.3-fpm.sock in “/usr/share/bluecherry/nginx-includes/buster.conf”

#fastcgi_pass unix:/var/run/php7.3-fpm.sock;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;

hope this helps
Anthony

working! You may consider this topic resolved.

cat /usr/share/bluecherry/nginx-includes/buster.conf
location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
# fastcgi_pass unix:/var/run/php7.3-fpm.sock;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}

!!!

systemctl restart nginx

!!!

I now have access to https://ip:7001

!!!

Thank you both for the amazing and fast support, I’m looking forward to filling up the 8 licenses I bought this morning! I’m bummed I missed out on the indiegogo and stickers to support the mobile app though.

This has been resolved in a hotfix for 3.1.0-rc2, which is specific to Buster (Debian 10) only:

https://changelog.bluecherrydvr.com/server-3.1.0-rc2-(buster-fix)-32SFX2