Another Socket error

Forum for questions and support relating to the 1.30.x releases only.
Locked
epicfatigue
Posts: 14
Joined: Sun Jan 15, 2017 1:15 am

Another Socket error

Post by epicfatigue »

Hey Guys,


So i am having a little issue.
I am not getting any streaming from the web GUI.

I had a look at
https://zoneminder.readthedocs.io/en/st ... -streaming

I am running on FREENAS 9.10
And i am using NGINX not Apache like the GitHub suggested .

Since i am running NGINX the guide doesnt really apply.
Should i switch to Apache?

Any Pointers or Direction would be awesome thanks guys

Code: Select all

user www;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid /var/run/nginx.pid;
events {
worker_connections 1024; ## Default: 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"';
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
server_tokens off;
gzip on;
gzip_comp_level 4;
gzip_min_length 1100;
Stopping mysql.
Waiting for PIDS: 1427.
Starting mysql.
Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Starting nginx.
gzip_buffers 64 8k;
gzip_http_version 1.1;
gzip_proxied any;
gzip_types text/plain application/xml application/x-javascript
text/css;
server {
root /usr/local/www/zoneminder;
try_files $uri $uri/ /index.php$is_args$args;
index index.php;
location = /cgi-bin/nph-zms {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php-fpm.sock;
}
location /api {
rewrite ^/api/(.+)$ /api/index.php?p=$1 last;
}
}
}
Attachments
Capture.PNG
Capture.PNG (29.71 KiB) Viewed 2567 times
Capture.PNG
Capture.PNG (45.99 KiB) Viewed 2567 times
epicfatigue
Posts: 14
Joined: Sun Jan 15, 2017 1:15 am

Re: Another Socket error

Post by epicfatigue »

Any Ideas Guys ?

I see the socket being created in the directory it is looking for? however it can not seem to bind to it....
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Another Socket error

Post by bbunge »

Do not know of any folks running Zoneminder on a NAS package. You might have better luck getting an answer if you ran a regular Linux distro. Sorry...
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Another Socket error

Post by rockedge »

the /cgi-bin needs to be configured in NGINX similar to setting up ZM on a Hiawatha server. alias the cgi-bin to match your path PATH_ZMS and that the cgi-bin is reachable. In Hiawatha there is a config to specify what to do with files with no extension so they run as CGI which is the case with ZMS and NPH-ZMS. Simply put you need to tell NGINX where the streaming components are in the cgi-bin and have the correct permissions.
I think..........
epicfatigue
Posts: 14
Joined: Sun Jan 15, 2017 1:15 am

Re: Another Socket error

Post by epicfatigue »

Thanks for the Help Guys,

Sadily none of those worked.

However i did manage to solve it.
It was a NGINX config error as suggested.


My Server block needed to be configured this way.

server {
root /usr/local/www/zoneminder;
try_files $uri $uri/ /index.php$is_args$args;
index index.php;

location = /cgi-bin/nph-zms {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock;

}
Locked