Paths and disappearing events

Forum for questions and support relating to the 1.29.x releases only.
jHeron
Posts: 70
Joined: Sun Jun 16, 2013 5:06 pm

Paths and disappearing events

Post by jHeron » Sun Feb 14, 2016 6:13 pm

Just upgraded to 1.29 on F23_64.
I record the events to a separate drive so I followed the instructions here: https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive
When I force an event it gets recorded on the correct drive and everything is hunky dory...
Except after 5 or 10 minutes the event counter in the gui goes to zero again? When I look in the actual events folder I can see the events are still there...
Once they disapear I have no way of viewing the events.
Here some log entries, not sure what direction to go yet..

Code: Select all

2016-02-14 12:36:08.675003	zma_m1		3599	ERR	Shared data not initialised by capture daemon for monitor Shed	zm_monitor.cpp	442
2016-02-14 12:37:17.949779	web_js		3704	ERR	getCmdResponse stream error: socket_sendto( /var/lib/zoneminder/sock/zms-767790s.sock ) failed: No such file or directory - checkStreamForErrors()	?view=event	
2016-02-14 12:37:17.921938	web_php		1744	ERR	socket_sendto( /var/lib/zoneminder/sock/zms-767790s.sock ) failed: No such file or directory	/usr/share/zoneminder/www/includes/functions.php	2371
I verified that functions.php is indeed where it should be.
I am not sure what is going on, any direction would be appreciated!
Cheers,
Jon

jHeron
Posts: 70
Joined: Sun Jun 16, 2013 5:06 pm

Re: Paths and disappearing events

Post by jHeron » Sun Feb 14, 2016 6:21 pm

I forgot to mention, the Disk space indicator in the GUI shows 94% full but the disk is empty.
Perhaps related to the above issue?
Cheers,
Jon

linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: Paths and disappearing events

Post by linuxsense » Sun Feb 14, 2016 7:19 pm

What do you see in the Apache error log if you wail it while repeating your actions? That error can be caused by a few things but its often related to the Apache config for the cgi-bin path although it sounds like you might have a couple issues. The Apache log is a good place to start though.

jHeron
Posts: 70
Joined: Sun Jun 16, 2013 5:06 pm

Re: Paths and disappearing events

Post by jHeron » Mon Feb 15, 2016 3:36 pm

OK thank you. I had a look at the log but not sure what to make of these alias warnings?

Code: Select all

[Sun Feb 07 10:17:26.828830 2016] [alias:warn] [pid 1318] AH00671: The Alias directive in /etc/httpd/conf.d/mythweb.conf at line 14 will probably never match because it overlaps an earlier Alias.
[Sun Feb 07 10:17:26.828868 2016] [alias:warn] [pid 1318] AH00671: The Alias directive in /etc/httpd/conf.d/welcome.conf at line 18 will probably never match because it overlaps an earlier Alias.
[Sun Feb 07 10:17:26.828871 2016] [alias:warn] [pid 1318] AH00671: The Alias directive in /etc/httpd/conf.d/zoneminder.conf at line 15 will probably never match because it overlaps an earlier Alias.
[Sun Feb 07 10:17:26.828875 2016] [alias:warn] [pid 1318] AH00671: The ScriptAlias directive in /etc/httpd/conf.d/zoneminder.conf at line 32 will probably never match because it overlaps an earlier ScriptAlias.
[Sun Feb 07 10:17:26.829032 2016] [auth_digest:notice] [pid 1318] AH01757: generating secret for digest authentication ...
Other than that I dont see much else as far as errors in the error log.
Here is a snippet from the SSL error log:

Code: Select all

[Sun Feb 14 12:36:00.771043 2016] [:error] [pid 3349] [client 127.0.0.1:47350] PHP Notice:  Undefined index: User in /usr/share/zoneminder/www/skins/classic/views/monitor.php on line 556, referer: https://localhost/zm/index.php
[Sun Feb 14 12:36:00.795208 2016] [:error] [pid 3349] [client 127.0.0.1:47350] PHP Notice:  Undefined index: Pass in /usr/share/zoneminder/www/skins/classic/views/monitor.php on line 557, referer: https://localhost/zm/index.php
[Sun Feb 14 12:36:00.795237 2016] [:error] [pid 3349] [client 127.0.0.1:47350] PHP Notice:  Undefined index: RTSPDescribe in /usr/share/zoneminder/www/skins/classic/views/monitor.php on line 573, referer: https://localhost/zm/index.php
[Sun Feb 14 12:36:05.566788 2016] [:error] [pid 3349] [client 127.0.0.1:47350] PHP Notice:  Undefined index: Controllable in /usr/share/zoneminder/www/skins/classic/views/monitor.php on line 599, referer: https://localhost/zm/index.php
[Sun Feb 14 12:36:05.566805 2016] [:error] [pid 3349] [client 127.0.0.1:47350] PHP Notice:  Undefined index: TrackMotion in /usr/share/zoneminder/www/skins/classic/views/monitor.php on line 604, referer: https://localhost/zm/index.php
[Sun Feb 14 12:37:03.557407 2016] [:error] [pid 2938] [client 127.0.0.1:47390] ERR [socket_sendto( /var/lib/zoneminder/sock/zms-843367s.sock ) failed: No such file or directory], referer: https://localhost/zm/index.php?view=event&eid=1&filter[terms][0][attr]=MonitorId&filter[terms][0][op]=%3D&filter[terms][0][val]=1&sort_field=StartTime&sort_asc=1&page=1
[Sun Feb 14 12:37:17.938817 2016] [:error] [pid 1744] [client 127.0.0.1:47418] ERR [socket_sendto( /var/lib/zoneminder/sock/zms-767790s.sock ) failed: No such file or directory], referer: https://localhost/zm/index.php?view=event&eid=1&filter[terms][0][attr]=MonitorId&filter[terms][0][op]=%3D&filter[terms][0][val]=1&sort_field=StartTime&sort_asc=1&page=1
I am not sure what to make of this?
Could it be that the DB is failing some how?
Any assistance is appreciated!
Cheers,
Jon

jHeron
Posts: 70
Joined: Sun Jun 16, 2013 5:06 pm

Re: Paths and disappearing events

Post by jHeron » Mon Feb 15, 2016 3:51 pm

It records the event perfectly, where it should, and the event is accessible for about a minute before it disappears from the GUI...
What tells the GUI where the events are? This must be an issue with the DB right?
I am using MariaDB rather than mysql, if that could be the issue?
Cheers,
Jon

linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: Paths and disappearing events

Post by linuxsense » Mon Feb 15, 2016 6:18 pm

MariaDB is fine, no worry there.

Can you post the contents of /etc/httpd/conf.d/zoneminder.conf and any configs in /etc/apache2/sites-enabled/?

jHeron
Posts: 70
Joined: Sun Jun 16, 2013 5:06 pm

Re: Paths and disappearing events

Post by jHeron » Mon Feb 15, 2016 9:55 pm

Code: Select all

#
# ZoneMinder Apache configuration file
# With SSLRequire and HTTPS auto redirect
# Modify this configuration to suit your requirements
#

# Auto Redirect HTTP requests to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(zm)(.*) https://%{SERVER_NAME}/$1$2 [R,L]

Alias /zm "/usr/share/zoneminder/www"
<Directory "/usr/share/zoneminder/www">
    SSLRequireSSL
    Options -Indexes +MultiViews +FollowSymLinks
    AllowOverride All
    <IfModule mod_authz_core.c>
       # Apache 2.4
       Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order deny,allow
        Allow from all
    </IfModule>
</Directory>

ScriptAlias /cgi-bin-zm "/usr/libexec/zoneminder/cgi-bin"
<Directory "/usr/libexec/zoneminder/cgi-bin">
    SSLRequireSSL
    AllowOverride All
    Options +ExecCGI +FollowSymLinks
    <IfModule mod_authz_core.c>
       # Apache 2.4
       Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order deny,allow
        Allow from all
    </IfModule>
</Directory>
I dont have anything for apache in /etc/
Thank you for your help!
Jon

linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: Paths and disappearing events

Post by linuxsense » Mon Feb 15, 2016 10:14 pm

Change this:

Code: Select all

ScriptAlias /cgi-bin-zm "/usr/libexec/zoneminder/cgi-bin"
To this:

Code: Select all

ScriptAlias /zm/cgi-bin "/usr/libexec/zoneminder/cgi-bin"
At least as a start...at lunch now so I didn't take a very close look, I can look again in a bit. Be sure to reload or restart apache once you make the change.

edited: added /zm/ to the scriptalias.

linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: Paths and disappearing events

Post by linuxsense » Mon Feb 15, 2016 10:51 pm

You dont have anything in /etc/apache2/sites-enabled/ ?

jHeron
Posts: 70
Joined: Sun Jun 16, 2013 5:06 pm

Re: Paths and disappearing events

Post by jHeron » Mon Feb 15, 2016 11:09 pm

No nothing apache whatsoever under /etc/?
I wont be able to change the conf file for an hour or so...
Cheers,
Jon

linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: Paths and disappearing events

Post by linuxsense » Tue Feb 16, 2016 7:23 am

What Linux distribution are you running?

jHeron
Posts: 70
Joined: Sun Jun 16, 2013 5:06 pm

Re: Paths and disappearing events

Post by jHeron » Tue Feb 16, 2016 1:15 pm

OK, I tried changing the ScriptAlias path as you suggested above with no joy, after that I cant get an image from the camera so I changed it back.
I am running Fedora Workstation 23_64.
I found these in the zm log too;

Code: Select all

2016-02-14 12:36:08.675003	zma_m1		3599	ERR	Shared data not initialised by capture daemon for monitor Shed	zm_monitor.cpp	442
2016-02-14 12:37:17.949779	web_js		3704	ERR	getCmdResponse stream error: socket_sendto( /var/lib/zoneminder/sock/zms-767790s.sock ) failed: No such file or directory - checkStreamForErrors()	?view=event	
2016-02-14 12:37:17.921938	web_php		1744	ERR	socket_sendto( /var/lib/zoneminder/sock/zms-767790s.sock ) failed: No such file or directory	/usr/share/zoneminder/www/includes/functions.php	2371
Its baffling to me...
Cheers,
Jon

jHeron
Posts: 70
Joined: Sun Jun 16, 2013 5:06 pm

Re: Paths and disappearing events

Post by jHeron » Thu Feb 18, 2016 7:54 pm

Could it be that there is a bug with zmaudit.pl?
Here is a log of a forced event, it appears that zmaudit cant find the event in the DB so it deletes the entry from the GUI?
The event is in fact there where it should be, the audit just cant see it...

Code: Select all

2016-02-18 14:33:30.663589	zma_m1		3056	INF	Shed: 2077000 - Analysing at 9.62 fps	zm_monitor.cpp	1287
2016-02-18 14:33:27.316318	zmc_m1		3051	INF	Shed: 2079000 - Capturing at 9.62 fps	zm_monitor.cpp	3131
2016-02-18 14:32:36.438420	zmaudit		2949	INF	deleting	zmaudit.pl	
2016-02-18 14:32:36.380810	zmaudit		2949	INF	Filesystem event '1/1019' does not exist in database	zmaudit.pl	
2016-02-18 14:31:46.925489	zma_m1		3056	INF	Shed: 2076000 - Analysing at 9.62 fps	zm_monitor.cpp	1287
2016-02-18 14:31:43.509523	zmc_m1		3051	INF	Shed: 2078000 - Capturing at 9.62 fps	zm_monitor.cpp	3131
2016-02-18 14:30:02.653447	zma_m1		3056	INF	Shed: 2075000 - Analysing at 9.35 fps	zm_monitor.cpp	1287
2016-02-18 14:29:59.357023	zmc_m1		3051	INF	Shed: 2077000 - Capturing at 9.35 fps	zm_monitor.cpp	3131
2016-02-18 14:28:15.882228	zma_m1		3056	INF	Shed: 2074000 - Analysing at 9.62 fps	zm_monitor.cpp	1287
2016-02-18 14:28:12.208038	zmc_m1		3051	INF	Shed: 2076000 - Capturing at 9.62 fps	zm_monitor.cpp	3131
2016-02-18 14:26:31.777216	zma_m1		3056	INF	Shed: 2073000 - Analysing at 9.71 fps	zm_monitor.cpp	1287
2016-02-18 14:26:28.486997	zmc_m1		3051	INF	Shed: 2075000 - Capturing at 9.71 fps	zm_monitor.cpp	3131
2016-02-18 14:24:48.413859	zma_m1		3056	INF	Shed: 2072000 - Analysing at 9.43 fps	zm_monitor.cpp	1287
2016-02-18 14:24:45.120452	zmc_m1		3051	INF	Shed: 2074000 - Capturing at 9.52 fps	zm_monitor.cpp	3131
2016-02-18 14:24:07.074300	zmfilter		2941	INF	Deleting event 1019 from Monitor 1	zmfilter.pl	
2016-02-18 14:24:01.150312	zms		22328	INF	Got signal 15 (Terminated), exiting	zm_signal.cpp	40
2016-02-18 14:23:56.558823	undef		22328	INF	No Server ID or Name specified in config. Not using Multi-Server Mode.	zm_config.cpp	139
2016-02-18 14:23:48.786908	zms		22205	INF	Got signal 15 (Terminated), exiting	zm_signal.cpp	40
2016-02-18 14:23:46.045275	zma_m1		3056	INF	Shed: 2071401 - Closing event 1019, alarm end	zm_monitor.cpp	1707
2016-02-18 14:23:45.968297	zma_m1		3056	INF	Shed: 2071401 - Left alarm state (1019) - 144(94) images	zm_monitor.cpp	1702
2016-02-18 14:23:43.218137	zma_m1		3056	INF	Shed: 2071376 - Gone into alert state	zm_monitor.cpp	1695
2016-02-18 14:23:43.105665	undef		22292	INF	No Server ID or Name specified in config. Not using Multi-Server Mode.	zm_config.cpp	139
2016-02-18 14:23:31.547967	zma_m1		3056	INF	Shed: 2071282 - Opening new event 1019, alarm start	zm_monitor.cpp	1651
2016-02-18 14:23:31.445428	zma_m1		3056	INF	Shed: 2071282 - Gone into alarm state	zm_monitor.cpp	1605
2016-02-18 14:23:31.290289	undef		22226	INF	No Server ID or Name specified in config. Not using Multi-Server Mode.	zm_config.cpp	139
2016-02-18 14:23:27.600323	undef		22205	INF	No Server ID or Name specified in config. Not using Multi-Server Mode.	zm_config.cpp	139
2016-02-18 14:23:02.327938	zma_m1		3056	INF	Shed: 2071000 - Analysing at 9.62 fps	zm_monitor.cpp	1287
I figure it is either a path issue I have somewhere or perhaps a bug in zmaudit script?
Cheers,
Jon

jHeron
Posts: 70
Joined: Sun Jun 16, 2013 5:06 pm

Re: Paths and disappearing events

Post by jHeron » Thu Feb 18, 2016 7:57 pm

Here is what the paths in options are set to:
Attachments
Screenshot from 2016-02-18 14-55-09.png
Screenshot from 2016-02-18 14-55-09.png (190.75 KiB) Viewed 4225 times

User avatar
knight-of-ni
Posts: 2241
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Paths and disappearing events

Post by knight-of-ni » Thu Feb 18, 2016 8:25 pm

linuxsense wrote:Change this:

Code: Select all

ScriptAlias /cgi-bin-zm "/usr/libexec/zoneminder/cgi-bin"
To this:

Code: Select all

ScriptAlias /zm/cgi-bin "/usr/libexec/zoneminder/cgi-bin"
At least as a start...at lunch now so I didn't take a very close look, I can look again in a bit. Be sure to reload or restart apache once you make the change.

edited: added /zm/ to the scriptalias.
No,do not do this. These steps are for Ubuntu, but the OP is using Fedora. The OP should be using the ScriptAlias and PATH_ZMS that shipped with the rpm.
jHeron wrote:

Code: Select all

[Sun Feb 07 10:17:26.828830 2016] [alias:warn] [pid 1318] AH00671: The Alias directive in /etc/httpd/conf.d/mythweb.conf at line 14 will probably never match because it overlaps an earlier Alias.
[Sun Feb 07 10:17:26.828868 2016] [alias:warn] [pid 1318] AH00671: The Alias directive in /etc/httpd/conf.d/welcome.conf at line 18 will probably never match because it overlaps an earlier Alias.
[Sun Feb 07 10:17:26.828871 2016] [alias:warn] [pid 1318] AH00671: The Alias directive in /etc/httpd/conf.d/zoneminder.conf at line 15 will probably never match because it overlaps an earlier Alias.
[Sun Feb 07 10:17:26.828875 2016] [alias:warn] [pid 1318] AH00671: The ScriptAlias directive in /etc/httpd/conf.d/zoneminder.conf at line 32 will probably never match because it overlaps an earlier ScriptAlias.
[Sun Feb 07 10:17:26.829032 2016] [auth_digest:notice] [pid 1318] AH01757: generating secret for digest authentication ...
This right here is the problem. You have installed ZoneMinder onto a system that was not clean. It's got other stuff on it, which is causing a ScriptAlias conflict. You should go through all of the config files under /etc/httpd/conf.d and find the Alias directive(s) that are conflicting. Fix that to make these errors go away.
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/

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests