another socket_sendto issue

Forum for questions and support relating to the 1.28.x releases only.
Locked
_saiko
Posts: 16
Joined: Wed Apr 04, 2012 8:48 pm

another socket_sendto issue

Post by _saiko »

Basically I added a new camera and did a dist-upgrade somewhere in between on my Ubuntu 14.04 system.
I'm using the PPA from Isaac Connor and there was also an upgrade from zoneminder:amd64 (1.28.1-trusty-1, 1.28.1-trusty-2).
Now Im getting my logs filled with 'socket_sendto( /var/run/zm/zms-xxxxxxs.sock ) failed: No such file or directory'.
I can't swear that they didn't appear before though.

Am AM able to view both my saved and live captures except everything is very slow.

System

Code: Select all

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"

Code: Select all

PATH_ZMS /cgi-bin/nph-zms

Code: Select all

$ cat /etc/zm/apache.conf
Alias /cctv /usr/share/zoneminder


php_flag register_globals off
Options Indexes FollowSymLinks

DirectoryIndex index.php

Code: Select all

$ cat /etc/zm/zm.conf

# Path to installed data directory, used mostly for finding DB upgrade scripts
ZM_PATH_DATA=/usr/share/zoneminder

# Path to ZoneMinder binaries
ZM_PATH_BIN=/usr/bin

# Path to ZoneMinder libraries (none at present, for future use)
ZM_PATH_LIB=/usr/lib/x86_64-linux-gnu

# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/etc/zm

# Path to ZoneMinder web files
ZM_PATH_WEB=/usr/share/zoneminder

# Path to ZoneMinder cgi files
ZM_PATH_CGI=/usr/lib/cgi-bin

# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=www-data
ZM_WEB_GROUP=www-data

# ZoneMinder database type: so far only mysql is supported
ZM_DB_TYPE=mysql

# ZoneMinder database hostname or ip address
ZM_DB_HOST=localhost

# ZoneMinder database name
ZM_DB_NAME=zm

# ZoneMinder database user
ZM_DB_USER=zmuser

# ZoneMinder database password
ZM_DB_PASS=

# Host of this machine
ZM_SERVER_HOST=
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: another socket_sendto issue

Post by knight-of-ni »

A search of the forum will reveal we get asked the "socket_sendto" question frequently, and the answer always comes back to following the documentation.

We understand that setting up ZoneMinder can be tricky, and we are working on improving that. However, you should get into the habit of seeking out and reading the latest documentation for your distro before you upgrade. The proper method to install ZoneMinder may change when the version of ZoneMinder or the version of your distro changes. You need to be aware of what those changes are.

Here are the instructions for installing or upgrading to ZoneMinder 1.28.1 on Ubuntu 14.04:
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

Here is the supplemental documentation for common issues on Ubuntu:
https://wiki.zoneminder.com/Common_Issu ... _on_Ubuntu

Read through those, and verify all the steps were followed.
The two most likely causes of your issue are that cgi-bin is not enabled and/or your PATH_ZMS is not correct.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
_saiko
Posts: 16
Joined: Wed Apr 04, 2012 8:48 pm

Re: another socket_sendto issue

Post by _saiko »

the thing is I had a working setup with the config from above.
After the upgrade i encountered those errors and just now I was able to find a workaround.

Now I have changed the Alias line in apache.config:

Code: Select all

  ScriptAlias /zm/cgi-bin "/usr/lib/cgi-bin"
  <Directory "/usr/lib/cgi-bin">
      Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
      AllowOverride All
      Require all granted
  </Directory>
    Alias /zm/usr/share/zoneminder
   <Directory /usr/share/zoneminder>
    php_flag register_globals off
    Options Indexes FollowSymLinks
    <IfModule mod_dir.c>
      DirectoryIndex index.php
    </IfModule>
  </Directory>
and

Code: Select all

PATH_ZMS /zm/cgi-bin/nph-zms
No more errors in the log.

But I want to have /cctv as my alias.
So i've changed the apache.conf and PATH_ZMS accordingly but the errors are still there.
Could there be still something hardcoded so that only with "/zm" alias its working properly?
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: another socket_sendto issue

Post by knight-of-ni »

ZoneMinder can be a complicated beast, and it is very easy to get off track, even for advanced users. This is why we've taken steps to make packages available for the masses. The packages remove the burden of having to know the inner workings of ZoneMinder, mysql, Apache, etc for the average user.

We recommend you stay with the default configuration that ships with these packages because it makes for a better, easier end user experience. It also minimizes the amount of time the development team has to spend answering questions when the end user has broken something, which is what you've done here. It is win-win for both of us.

You are certainly free to change this configuration, but as you've discovered, doing it correctly requires a good understanding of Apache's Alias and ScriptAlias directives. It also requires an understanding of the relationship between the Alias directive, the ScriptAlias directive, and ZoneMinder's PATH_ZMS variable. You cannot change one without affecting the other two.

You should read through and understand the Apache documentation here:
http://httpd.apache.org/docs/2.4/mod/mod_alias.html

Then, when you've got a live monitor open (working or not), look at the link for the video stream and observe how it relates to PATH_ZMS and the Alias directives.

This is as far as I'm willing to take this because I don't believe that just giving you the answer is going to help you in the long run. If you change the Apache configuration without truly understanding what is going on, then you will find yourself right back here in the forum the next time a package or distro upgrade triggers breakage again, which is exactly what we, the development team, are striving to get away from.

So you've got a decision to make. You could take the easy path, and just go with the configuration that ships with the package you are using. This is the recommended way and there is certainly no shame in that. On the other hand, you could take what I've said as a challenge to learn something a little better. This would almost certainly benefit you down the road if, like me, you've chosen to spend life in the open source world.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked