connortechnology / ZoneMinder

ZoneMinder is a free, open source Closed-circuit television software application developed for Linux which supports IP, USB and Analog cameras.
http://www.zoneminder.com/
GNU General Public License v2.0
9 stars 9 forks source link

Unable to view events, white screen and ERR logs #101

Closed shaun-ba closed 5 years ago

shaun-ba commented 5 years ago

Issue: Unable to view events, white screen and ERR logs Version: 1.32.0 Broke since version: 1.31.44

More info: Videos capture just fine, they can be downloaded from /var/cache/events/, but cannot be viewed in browser.


ZM logs:

2018-09-20 09:04:29 web_js   570 ERR getCmdResponse stream error: Socket /var/run/zm/zms-915680s.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/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors() ?view=event  
2018-09-20 09:04:29 web_php   570 ERR Socket /var/run/zm/zms-915680s.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/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. /usr/share/zoneminder/www/includes/functions.php 2042
2018-09-20 09:04:29 web_js   570 ERR Uncaught TypeError: Cannot read property 'getElement' of null http://192.168.1.104/zm/cache/skins_classic_views_js_event-base-1537401771.js

Apache error logs:

[Thu Sep 20 10:20:38.843418 2018] [:error] [pid 237] [client 192.168.1.35:39162] PHP Notice:  Use of undefined constant MonitorId - assumed 'MonitorId' in /usr/share/zoneminder/www/includes/Event.php on line 88, referer: http://192.168.1.104/zm/index.php?view=events&page=1&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Battr%5D=MonitorId&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bop%5D=%3D&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bval%5D=2&sort_field=StartTime&sort_asc=&limit=
[Thu Sep 20 10:20:38.937395 2018] [:error] [pid 237] [client 192.168.1.35:39162] PHP Notice:  Use of undefined constant MonitorId - assumed 'MonitorId' in /usr/share/zoneminder/www/includes/Event.php on line 88, referer: http://192.168.1.104/zm/index.php?view=events&page=1&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Battr%5D=MonitorId&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bop%5D=%3D&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bval%5D=2&sort_field=StartTime&sort_asc=&limit=
[Thu Sep 20 10:20:38.937469 2018] [:error] [pid 237] [client 192.168.1.35:39162] PHP Fatal error:  Uncaught Error: Call to a member function ServerId() on array in /usr/share/zoneminder/www/includes/Event.php:206\nStack trace:\n#0 /usr/share/zoneminder/www/skins/classic/views/event.php(141): Event->getStreamSrc(Array)\n#1 /usr/share/zoneminder/www/index.php(254): require_once('/usr/share/zone...')\n#2 {main}\n  thrown in /usr/share/zoneminder/www/includes/Event.php on line 206, referer: http://192.168.1.104/zm/index.php?view=events&page=1&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Battr%5D=MonitorId&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bop%5D=%3D&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bval%5D=2&sort_field=StartTime&sort_asc=&limit=
shaun-ba commented 5 years ago

@connortechnology Your latest PHP fixes worked, and now I can view individual events in browser, thanks!

However, the timeline doesn't work, a broken image icon is displayed and so far this is the only log i can see:

[Tue Sep 25 10:41:49.812572 2018] [:error] [pid 7731] [client 192.168.1.101:59220] PHP Notice:  ob_clean(): failed to delete buffer. No buffer to delete in /usr/share/zoneminder/www/views/image.php on line 238, referer: http://192.168.1.104/zm/index.php?view=timeline&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Battr%5D=StartDateTime&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bop%5D=%3E%3D&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bval%5D=-1+day&filter%5BQuery%5D%5Bterms%5D%5B1%5D%5Bcnj%5D=and&filter%5BQuery%5D%5Bterms%5D%5B1%5D%5Battr%5D=MonitorId&filter%5BQuery%5D%5Bterms%5D%5B1%5D%5Bop%5D=%3D&filter%5BQuery%5D%5Bterms%5D%5B1%5D%5Bval%5D=4

EDIT: May have spoke too soon, the event plays and then half way through it says "Event was not found." top left of the UI, and the same logs appear in DB logs.

shaun-ba commented 5 years ago

Latest fix within 1.32.0 fixes this.