SOLVED: Ubuntu 18.04 + nginx cgi issue - no streaming
Posted: Sat Jun 23, 2018 7:29 pm
Hi All,
I know I'm beating a dead horse here, but even with all of the resources online about this exact issue, none of them have helped. I'm hoping to get a bit of assistance here because i am soooo close. So i have the typical no streaming issue, though stills exist as expected. I get the typical socket doesn't exsit error:
2018/06/23 13:50:18 [error] 6124#6124: *8 connect() to unix:/var/run/fcgiwrap.socket failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: host.duckdns.org, request: "GET /zm/cgi-bin/zms%20?mode=jpeg&scale=100&maxfps=5&buffer=1000&monitor=1&auth=b8b406fd18035c7181695ba1cc796c8e&connkey=679563&rand=1529779817 HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "host.duckdns.org", referrer: "http://host.duckdns.org/zm/index.php?view=watch&mid=1"
2018/06/23 13:50:21 [error] 6124#6124: *8 FastCGI sent in stderr: "PHP message: ERR [Socket /var/run/zm/zms-679563s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information.]" while reading response header from upstream, client: 127.0.0.1, server: host.duckdns.org, request: "POST /zm/index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "host.duckdns.org", referrer: "http://host.duckdns.org/zm/index.php?view=watch&mid=1"
I have ubuntu 18.04 and ZoneMinder 1.30.4 per isaac connor's ppa. Im using the nginx config provided in the zoneminder wiki with no variances. I updated the cgi_path to include /zm/, and even followed a few other forums to modify group of /var/run/fcgiwrap.socket.
After spending about a week trying to solve this one particular issue, Im finally seeking psychiatric and forum help.
Thank you.
cat /etc/nginx/host.duckdns.conf
location /zm/cgi-bin {
gzip off;
alias /usr/lib/zoneminder/cgi-bin;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
location /zm {
# if ($scheme ~ ^http:){
# rewrite ^(.*)$ https://$host$1 permanent;
# }
gzip off;
alias /usr/share/zoneminder/www;
index index.php;
location ~ \.php$ {
if (!-f $request_filename) { return 404; }
expires epoch;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
location ~ \.(jpg|jpeg|gif|png|ico)$ {
access_log off;
expires 33d;
}
location /zm/api/ {
alias /usr/share/zoneminder/www/api;
rewrite ^/zm/api(.+)$ /zm/api/index.php?p=$1 last;
}
}
I know I'm beating a dead horse here, but even with all of the resources online about this exact issue, none of them have helped. I'm hoping to get a bit of assistance here because i am soooo close. So i have the typical no streaming issue, though stills exist as expected. I get the typical socket doesn't exsit error:
2018/06/23 13:50:18 [error] 6124#6124: *8 connect() to unix:/var/run/fcgiwrap.socket failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: host.duckdns.org, request: "GET /zm/cgi-bin/zms%20?mode=jpeg&scale=100&maxfps=5&buffer=1000&monitor=1&auth=b8b406fd18035c7181695ba1cc796c8e&connkey=679563&rand=1529779817 HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "host.duckdns.org", referrer: "http://host.duckdns.org/zm/index.php?view=watch&mid=1"
2018/06/23 13:50:21 [error] 6124#6124: *8 FastCGI sent in stderr: "PHP message: ERR [Socket /var/run/zm/zms-679563s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information.]" while reading response header from upstream, client: 127.0.0.1, server: host.duckdns.org, request: "POST /zm/index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "host.duckdns.org", referrer: "http://host.duckdns.org/zm/index.php?view=watch&mid=1"
I have ubuntu 18.04 and ZoneMinder 1.30.4 per isaac connor's ppa. Im using the nginx config provided in the zoneminder wiki with no variances. I updated the cgi_path to include /zm/, and even followed a few other forums to modify group of /var/run/fcgiwrap.socket.
After spending about a week trying to solve this one particular issue, Im finally seeking psychiatric and forum help.
Thank you.
cat /etc/nginx/host.duckdns.conf
location /zm/cgi-bin {
gzip off;
alias /usr/lib/zoneminder/cgi-bin;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
location /zm {
# if ($scheme ~ ^http:){
# rewrite ^(.*)$ https://$host$1 permanent;
# }
gzip off;
alias /usr/share/zoneminder/www;
index index.php;
location ~ \.php$ {
if (!-f $request_filename) { return 404; }
expires epoch;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
location ~ \.(jpg|jpeg|gif|png|ico)$ {
access_log off;
expires 33d;
}
location /zm/api/ {
alias /usr/share/zoneminder/www/api;
rewrite ^/zm/api(.+)$ /zm/api/index.php?p=$1 last;
}
}