I've been reading through here extensively and I know there is a lot of discussion about the log message: "
Code: Select all
Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results for monitor mon1 zm_monitor.cpp 426
My issue is I have 3 monitors (2 are in use currently). I have good video from them and they capture events without a problem, I can review the captures. The only problem is when I click to add/edit the zones of the cameras from the console I get a blank image (with the chrome 'not found icon').
First off here is my setup:
Code: Select all
user@host:/var/log/apache2$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
Code: Select all
user@host:/$ sudo apt-cache policy zoneminder
zoneminder:
Installed: 1.28.1-trusty-1
Candidate: 1.28.1-trusty-1
Version table:
*** 1.28.1-trusty-1 0
500 offsite link amd64 Packages
100 /var/lib/dpkg/status
1.26.5-1ubuntu3 0
500 offsite link amd64 Packages
Code: Select all
user@host:/etc/zm$ cat zm.conf
# ==========================================================================
#
# ZoneMinder Base Configuration, $Date$, $Revision$
#
# ==========================================================================
#
# This file is generated by 'configure'. Care should be taken if manually
# editing this file as an changes may be overwritten by subsequent configuration
# or installations.
#
# 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=zmpass
# Host of this machine
ZM_SERVER_HOST=
Code: Select all
user@host:/etc/zm$ cat apache.conf
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>
Code: Select all
user@host:/usr/share/zoneminder$ ls -la
total 132
drwxr-xr-x 13 www-data www-data 4096 Apr 19 00:52 .
drwxr-xr-x 222 root root 12288 Mar 30 21:27 ..
drwxr-xr-x 2 www-data www-data 4096 Apr 19 00:52 ajax
-rwxrwxr-x 1 www-data www-data 62936 Jul 26 2014 cambozola.jar
lrwxrwxrwx 1 www-data www-data 17 Feb 17 10:31 cgi-bin -> ../../lib/cgi-bin
drwxr-xr-x 2 www-data www-data 4096 Apr 19 00:52 css
drwxr-xr-x 2 www-data www-data 4096 Apr 19 00:52 db
lrwxrwxrwx 1 www-data www-data 28 Feb 17 10:31 events -> /var/cache/zoneminder/events
drwxr-xr-x 2 www-data www-data 4096 Apr 19 00:52 graphics
lrwxrwxrwx 1 www-data www-data 28 Feb 17 10:31 images -> /var/cache/zoneminder/images
drwxr-xr-x 2 www-data www-data 4096 Apr 19 00:52 includes
-rw-r--r-- 1 www-data www-data 4543 Feb 17 10:31 index.php
drwxr-xr-x 2 www-data www-data 4096 Apr 19 00:52 js
drwxr-xr-x 2 www-data www-data 4096 Apr 19 00:52 lang
drwxr-xr-x 6 www-data www-data 4096 Apr 19 00:52 skins
drwxr-xr-x 2 www-data www-data 4096 Feb 17 10:31 sounds
lrwxrwxrwx 1 www-data www-data 26 Feb 17 10:31 temp -> /var/cache/zoneminder/temp
drwxr-xr-x 3 www-data www-data 4096 Apr 19 00:52 tools
drwxr-xr-x 2 www-data www-data 4096 Apr 19 00:52 views
Code: Select all
user@host:/var/cache/zoneminder$ ls -la
total 20
drwxr-xr-x 5 www-data www-data 4096 Apr 19 00:52 .
drwxr-xr-x 19 root root 4096 Mar 30 21:20 ..
drwxrwxr-x 5 www-data www-data 4096 Jan 25 17:40 events
drwxrwxr-x 2 www-data www-data 4096 Apr 12 22:03 images
drwxr-xr-x 2 www-data www-data 4096 Feb 17 10:31 temp
http://www.zoneminder.com/forums/viewto ... emon+zones
As soon as I click the zones link I get the following in the zoneminder log:
Code: Select all
2015-04-19 08:05:41.149088 zma_m1 1672 INF mon1: 3000 - Processing at 12.99 fps zm_monitor.cpp 1160
2015-04-19 08:05:40.988191 zmc_m1 1668 INF mon1: 3000 - Capturing at 12.99 fps zm_monitor.cpp 2907
2015-04-19 08:05:10.967813 zmu 2057 INF Terminating Logger zm_logger.cpp 235
2015-04-19 08:05:10.908114 zmu 2057 WAR Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results for monitor mon1 zm_monitor.cpp 426
2015-04-19 08:05:10.857818 zmu 2057 INF Authenticated user 'user' zm_user.cpp 241
Code: Select all
Apr 19 08:03:55 localhost zmu[2048]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results for monitor mon1]
Unable to post, due to "offsite links" but there didn't look like there was anything helpful in it. Let me know if this would make a difference for you and I'll figure out a way to post it.
This is reproducible with both cameras and happens every time. I don't THINK it is a permissions problem because I have made everything I can think of belong to the www-data user and group and even made the images director 777 which I would prefer not to do of course.
I'm a bit at a loss right now, I wish the logs were more detailed so I could pinpoint where it goes wrong. I looked through the source code but I am not very knowledgable in programming and minimally knowledgable in php. It seems the error is coming from this section in the zm_monitor.cpp:
Code: Select all
if ( ( ! mem_ptr ) || ! shared_data->valid )
{
if ( purpose != QUERY )
{
Error( "Shared data not initialised by capture daemon for monitor %s", name );
exit( -1 );
}
else
{
Warning( "Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results for monitor %s", name );
}
}
// Will this not happen everytime a monitor is instantiated? Seems like all the calls to the Monitor constructor pass a zero for n_zones, then load zones after..
if ( !n_zones ) {
Debug( 1, "Monitor %s has no zones, adding one.", name );
n_zones = 1;
zones = new Zone *[1];
Coord coords[4] = { Coord( 0, 0 ), Coord( width-1, 0 ), Coord( width-1, height-1 ), Coord( 0, height-1 ) };
zones[0] = new Zone( this, 0, "All", Zone::ACTIVE, Polygon( sizeof(coords)/sizeof(*coords), coords ), RGB_RED, Zone::BLOBS );
}
start_time = last_fps_time = time( 0 );
event = 0;
Thanks!
Cam