[SOLVED]Stream, Video, Thumbnails work. Frames/Stills dont

Forum for questions and support relating to the 1.30.x releases only.
DSchwarz
Posts: 13
Joined: Tue Jan 10, 2017 7:53 pm

[SOLVED]Stream, Video, Thumbnails work. Frames/Stills dont

Post by DSchwarz » Tue Jan 10, 2017 8:56 pm

Hi,

I recently upgraded from 1.29 to 1.30.0 and since then I have a small nuisance... I can't see individual frames in the frame view anymore.

Live Video works fine
so does view events
also when in the event list, thumbnails look just fine

BUT and here comes the but

once click on a thumbnail I get the the frame view (e.g. <host>/zm/index.php?view=frame&eid=34989&fid=27)
and the image is broken.

when tying to open the image seperately (e.g. <host>/zm/index.php?view=image&fid=5271416)
I get an empty page


So.... I am sure i missed something during the update process.... maybe someone could point me in the right direction?

Any help is being appreciated
Last edited by DSchwarz on Sat Feb 18, 2017 7:16 am, edited 1 time in total.

bbunge
Posts: 2660
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Stream, Video, Thumbnails work. Frames/Stills dont

Post by bbunge » Thu Jan 12, 2017 2:26 pm

Linux version?

DSchwarz
Posts: 13
Joined: Tue Jan 10, 2017 7:53 pm

Re: Stream, Video, Thumbnails work. Frames/Stills dont

Post by DSchwarz » Sat Jan 14, 2017 7:22 pm

$ cat /proc/version

Linux version 4.8.11-200.fc24.x86_64 (mockbuild@bkernel01.phx2.fedoraproject.org) (gcc version 6.2.1 20160916 (Red Hat 6.2.1-2) (GCC) ) #1 SMP Mon Nov 28 19:36:57 UTC 2016

rockedge
Posts: 1144
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Stream, Video, Thumbnails work. Frames/Stills dont

Post by rockedge » Sun Jan 15, 2017 9:41 pm

Try this.....
stop zoneminder
killall mysqld
restart mysqld
restart zoneminder
force an event to test stills and video.

DSchwarz
Posts: 13
Joined: Tue Jan 10, 2017 7:53 pm

Re: Stream, Video, Thumbnails work. Frames/Stills dont

Post by DSchwarz » Wed Jan 18, 2017 6:25 am

First of all sorry for the belated reply. We are in the process of renovating the house, so it took some time to find the time....

Anyways, I did as you asked, but it had no effect. Video works, stills don't. Same as before.

DSchwarz
Posts: 13
Joined: Tue Jan 10, 2017 7:53 pm

Re: Stream, Video, Thumbnails work. Frames/Stills dont

Post by DSchwarz » Wed Feb 01, 2017 12:51 pm

Oh well... Guess I have to live with that.

Should I find a solution on my own, I will be coming back to report.

rockedge
Posts: 1144
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Stream, Video, Thumbnails work. Frames/Stills dont

Post by rockedge » Thu Feb 02, 2017 4:02 am

check to see if the timestamps match. When I have had this problem my mysql data involving the event name and the URL being generated was off. The timestamps were not the same and the directory path to the event jpg's was not being generated to match the actual physical path.

DSchwarz
Posts: 13
Joined: Tue Jan 10, 2017 7:53 pm

Re: Stream, Video, Thumbnails work. Frames/Stills dont

Post by DSchwarz » Thu Feb 09, 2017 2:32 pm

Nope. Sorry. Files and SQL-Data correspond with the events shown.

http://imgur.com/a/pQTQo

Code: Select all

[root@nostromo ~]# dir /usr/share/zoneminder/www/events/SriCam/17/02/09/09/03/27/
00001-capture.jpg  00012-capture.jpg  00023-capture.jpg  00031-capture.jpg  00042-capture.jpg  00053-capture.jpg  00064-capture.jpg  00075-capture.jpg
00002-capture.jpg  00013-capture.jpg  00024-capture.jpg  00032-capture.jpg  00043-capture.jpg  00054-capture.jpg  00065-capture.jpg  00076-capture.jpg
00003-capture.jpg  00014-capture.jpg  00025-capture.jpg  00033-capture.jpg  00044-capture.jpg  00055-capture.jpg  00066-capture.jpg  00077-capture.jpg
00004-capture.jpg  00015-capture.jpg  00026-analyse.jpg  00034-capture.jpg  00045-capture.jpg  00056-capture.jpg  00067-capture.jpg  00078-capture.jpg
00005-capture.jpg  00016-capture.jpg  00026-capture.jpg  00035-capture.jpg  00046-capture.jpg  00057-capture.jpg  00068-capture.jpg
00006-capture.jpg  00017-capture.jpg  00027-analyse.jpg  00036-capture.jpg  00047-capture.jpg  00058-capture.jpg  00069-capture.jpg
00007-capture.jpg  00018-capture.jpg  00027-capture.jpg  00037-capture.jpg  00048-capture.jpg  00059-capture.jpg  00070-capture.jpg
00008-capture.jpg  00019-capture.jpg  00028-analyse.jpg  00038-capture.jpg  00049-capture.jpg  00060-capture.jpg  00071-capture.jpg
00009-capture.jpg  00020-capture.jpg  00028-capture.jpg  00039-capture.jpg  00050-capture.jpg  00061-capture.jpg  00072-capture.jpg
00010-capture.jpg  00021-capture.jpg  00029-capture.jpg  00040-capture.jpg  00051-capture.jpg  00062-capture.jpg  00073-capture.jpg
00011-capture.jpg  00022-capture.jpg  00030-capture.jpg  00041-capture.jpg  00052-capture.jpg  00063-capture.jpg  00074-capture.jpg

Code: Select all

MariaDB [zm]> select * from Events where Id = 36099;
+-------+-----------+-------------+--------+---------------------+---------------------+-------+--------+--------+--------+-------------+----------+----------+----------+----------+---------+----------+---------+----------+----------+-------------+
| Id    | MonitorId | Name        | Cause  | StartTime           | EndTime             | Width | Height | Length | Frames | AlarmFrames | TotScore | AvgScore | MaxScore | Archived | Videoed | Uploaded | Emailed | Messaged | Executed | Notes       |
+-------+-----------+-------------+--------+---------------------+---------------------+-------+--------+--------+--------+-------------+----------+----------+----------+----------+---------+----------+---------+----------+----------+-------------+
| 36099 |         3 | Event-36099 | Motion | 2017-02-09 09:03:27 | 2017-02-09 09:03:41 |   640 |    480 |  14.48 |     78 |           3 |       70 |       23 |       47 |        0 |       0 |        0 |       0 |        0 |        0 | Motion: New |
+-------+-----------+-------------+--------+---------------------+---------------------+-------+--------+--------+--------+-------------+----------+----------+----------+----------+---------+----------+---------+----------+----------+-------------+

kylejohnson
Posts: 260
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD
Contact:

Re: Stream, Video, Thumbnails work. Frames/Stills dont

Post by kylejohnson » Sat Feb 11, 2017 5:42 am

Hi there.
I'd like to see the web server logs while accessing the frame and image views.
Also try copying the broken image link and then opening it directly in your browser, and then the web server log for that too.
Idling as gnulnx in #zoneminder on freenode. Come say hi!

DSchwarz
Posts: 13
Joined: Tue Jan 10, 2017 7:53 pm

Re: Stream, Video, Thumbnails work. Frames/Stills dont

Post by DSchwarz » Fri Feb 17, 2017 8:24 pm

Code: Select all

[root@nostromo ~]# tail -10  /var/log/zoneminder/web_js.log
02/09/17 15:54:51.676279 web_js[9766].ERR [Uncaught TypeError: Cannot read property 'focus' of null] at http://nostromo:8082/zm/skins/classic/js/skin.js line 117
02/09/17 15:59:54.797629 web_js[10503].ERR [Uncaught TypeError: Cannot read property 'focus' of null] at http://nostromo:8082/zm/skins/classic/js/skin.js line 117
02/09/17 16:04:57.762073 web_js[24808].ERR [Uncaught TypeError: Cannot read property 'focus' of null] at http://nostromo:8082/zm/skins/classic/js/skin.js line 117
02/09/17 16:14:10.714582 web_js[2627].ERR [Uncaught TypeError: Cannot read property 'focus' of null] at http://nostromo:8082/zm/skins/classic/js/skin.js line 117
02/09/17 16:19:13.173040 web_js[24808].ERR [Uncaught TypeError: Cannot read property 'focus' of null] at http://nostromo:8082/zm/skins/classic/js/skin.js line 117
02/09/17 16:24:15.650676 web_js[10503].ERR [Uncaught TypeError: Cannot read property 'focus' of null] at http://nostromo:8082/zm/skins/classic/js/skin.js line 117
02/09/17 16:29:18.613536 web_js[9766].ERR [Uncaught TypeError: Cannot read property 'focus' of null] at http://nostromo:8082/zm/skins/classic/js/skin.js line 117
02/09/17 16:34:21.694428 web_js[11930].ERR [Uncaught TypeError: Cannot read property 'focus' of null] at http://nostromo:8082/zm/skins/classic/js/skin.js line 117

Code: Select all

[root@nostromo ~]# tail -10  /var/log/zoneminder/web_php.log
01/07/17 09:01:03.411634 web_php[1958].ERR [No image path] at /usr/share/zoneminder/www/views/image.php line 129
01/07/17 09:15:39.372614 web_php[2662].ERR [socket_sendto( /var/lib/zoneminder/sock/zms-255694s.sock ) failed: No such file or directory] at /usr/share/zoneminder/www/includes/functions.php line 1993
01/07/17 09:42:10.728475 web_php[2609].ERR [No image path] at /usr/share/zoneminder/www/views/image.php line 129
01/08/17 10:57:57.431306 web_php[2662].ERR [No image path] at /usr/share/zoneminder/www/views/image.php line 129
01/08/17 11:04:00.107286 web_php[2627].ERR [socket_sendto( /var/lib/zoneminder/sock/zms-638563s.sock ) failed: No such file or directory] at /usr/share/zoneminder/www/includes/functions.php line 1993
01/08/17 11:04:12.224367 web_php[1958].ERR [socket_sendto( /var/lib/zoneminder/sock/zms-638563s.sock ) failed: No such file or directory] at /usr/share/zoneminder/www/includes/functions.php line 1993
01/08/17 11:04:24.327631 web_php[2646].ERR [socket_sendto( /var/lib/zoneminder/sock/zms-638563s.sock ) failed: No such file or directory] at /usr/share/zoneminder/www/includes/functions.php line 1993
01/08/17 11:04:36.426592 web_php[2609].ERR [socket_sendto( /var/lib/zoneminder/sock/zms-638563s.sock ) failed: No such file or directory] at /usr/share/zoneminder/www/includes/functions.php line 1993
01/08/17 11:04:48.525681 web_php[1956].ERR [socket_sendto( /var/lib/zoneminder/sock/zms-638563s.sock ) failed: No such file or directory] at /usr/share/zoneminder/www/includes/functions.php line 1993
01/09/17 07:29:08.159256 web_php[2646].ERR [socket_sendto( /var/lib/zoneminder/sock/zms-800398s.sock ) failed: No such file or directory] at /usr/share/zoneminder/www/includes/functions.php line 1993

Code: Select all

[root@nostromo ~]# tail -10  /var/log/httpd/error_log
[Thu Feb 09 15:06:20.867017 2017] [:error] [pid 5120] [client 192.168.100.173:52944] PHP Notice:  Undefined property: Event::$StorageId in /usr/share/zoneminder/www/includes/Event.php on line 31, referer: http://nostromo:8082/zm/index.php?view=frame&eid=36099&fid=78&scale=100
[Thu Feb 09 15:06:20.867596 2017] [:error] [pid 5120] [client 192.168.100.173:52944] PHP Warning:  readfile(events/3/17/02/09/10/03/27/00078-capture.jpg): failed to open stream: No such file or directory in /usr/share/zoneminder/www/views/image.php on line 132, referer: http://nostromo:8082/zm/index.php?view=frame&eid=36099&fid=78&scale=100
[Thu Feb 09 15:09:14.489905 2017] [:error] [pid 2646] [client 192.168.100.173:52967] PHP Notice:  Undefined property: Event::$StorageId in /usr/share/zoneminder/www/includes/Event.php on line 31, referer: http://nostromo:8082/zm/index.php?view=frame&eid=.36099&fid=27&scale=100
[Thu Feb 09 15:09:14.490483 2017] [:error] [pid 2646] [client 192.168.100.173:52967] PHP Warning:  readfile(events/3/17/02/09/10/03/27/00027-capture.jpg): failed to open stream: No such file or directory in /usr/share/zoneminder/www/views/image.php on line 132, referer: http://nostromo:8082/zm/index.php?view=frame&eid=.36099&fid=27&scale=100
[Sun Feb 12 03:00:58.943348 2017] [autoindex:error] [pid 24808] [client 62.210.151.148:64929] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Sun Feb 12 03:00:59.036852 2017] [autoindex:error] [pid 25242] [client 62.210.151.148:49232] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Fri Feb 17 19:43:01.631722 2017] [:error] [pid 5189] [client 192.168.100.173:50201] PHP Notice:  Undefined property: Event::$StorageId in /usr/share/zoneminder/www/includes/Event.php on line 31, referer: http://nostromo:8082/zm/index.php?view=frame&eid=36427&fid=11
[Fri Feb 17 19:43:01.632925 2017] [:error] [pid 5189] [client 192.168.100.173:50201] PHP Warning:  readfile(events/4/17/02/17/14/15/26/00011-capture.jpg): failed to open stream: No such file or directory in /usr/share/zoneminder/www/views/image.php on line 132, referer: http://nostromo:8082/zm/index.php?view=frame&eid=36427&fid=11
[Fri Feb 17 19:43:49.240028 2017] [:error] [pid 2662] [client 192.168.100.173:50212] PHP Notice:  Undefined property: Event::$StorageId in /usr/share/zoneminder/www/includes/Event.php on line 31
[Fri Feb 17 19:43:49.240809 2017] [:error] [pid 2662] [client 192.168.100.173:50212] PHP Warning:  readfile(events/4/17/02/17/14/15/26/00011-capture.jpg): failed to open stream: No such file or directory in /usr/share/zoneminder/www/views/image.php on line 132
http://imgur.com/a/0JU4I

Ok.... we are getting somewhere. Seems to be a disconnted regarding the times. Event 36427 can be found under 13/15/26 NOT 14/15/26.
Timezone maybe? DaylightSavingTime?

Code: Select all

[root@nostromo ~]# ls -la /var/lib/zoneminder/events/4/17/02/17/
total 15
drwxr-xr-x  6 apache apache 11 Feb 17 16:37 .
drwxr-xr-x 11 apache apache 11 Feb 17 06:30 ..
drwxr-xr-x  3 apache apache  3 Feb 17 06:30 06
drwxr-xr-x  3 apache apache  3 Feb 17 12:30 12
drwxr-xr-x  4 apache apache  4 Feb 17 13:33 13
drwxr-xr-x  3 apache apache  3 Feb 17 16:37 16
lrwxrwxrwx  1 apache apache  8 Feb 17 06:30 .36416 -> 06/30/26
lrwxrwxrwx  1 apache apache  8 Feb 17 12:30 .36424 -> 12/30/46
lrwxrwxrwx  1 apache apache  8 Feb 17 13:15 .36427 -> 13/15/26
lrwxrwxrwx  1 apache apache  8 Feb 17 13:33 .36428 -> 13/32/59
lrwxrwxrwx  1 apache apache  8 Feb 17 16:37 .36432 -> 16/37/48
I just tiggered an alarm and it gets registered for 20:09:55. This corresponds to the server time which is:

Code: Select all

[root@nostromo ~]# date
Fri Feb 17 20:09:55 UTC 2017
local time is 21:09:55 CET, however. Which is where the frame view expects the images to be.



Edit: Sorry for the late reply. As stated above we are still in the process of renovating the house.

DSchwarz
Posts: 13
Joined: Tue Jan 10, 2017 7:53 pm

Re: Stream, Video, Thumbnails work. Frames/Stills dont

Post by DSchwarz » Fri Feb 17, 2017 8:38 pm

php seems to be set the correct timezone.


vi /etc/php.ini

Code: Select all

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/Berlin

rockedge
Posts: 1144
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Stream, Video, Thumbnails work. Frames/Stills dont

Post by rockedge » Fri Feb 17, 2017 11:13 pm

Find and look in the my.conf file if any default timezone or time is being set. That is why I suggested earlier stopping and restarting mysql to attempt to sync the time. You may have to delete all the current events in the db and test with a fresh new event.

DSchwarz
Posts: 13
Joined: Tue Jan 10, 2017 7:53 pm

Re: [SOLVED]Stream, Video, Thumbnails work. Frames/Stills dont

Post by DSchwarz » Sat Feb 18, 2017 7:29 am

Changing the default timezone in the mysql server did the trick. Even the old events work now.


However, it wasn't quite as trivial as JUST setting a timezone in the /etc/my.cnf....

Trying that led to the service crash upon start. REASON: the timezone tables in the mysql weren't populated yet. To fix this I had to run the following line in the shell:

Code: Select all

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p
Also /etc/my.cnf was not quite the right place to set the timezone. I had to edit /etc/my.cnf.d/mariadb-server.cnf and add the following line in the mysqld section of te config file.

Code: Select all

[mysqld]
default_time_zone=Europe/Berlin


On a side note: I also had to reset my root password for the mysql server since none of my usually used password/patterns worked. I must have had a real brain fart when I was setting up the system. Anyhow... for anyone with the same problem, here is how the reset your root password, should you ever have the need to.
http://tecadmin.net/steps-to-reset-mari ... -in-linux/


Thanks to everyone who help me solving this problem. Thanks a bunch!

DSchwarz
Posts: 13
Joined: Tue Jan 10, 2017 7:53 pm

Re: [SOLVED]Stream, Video, Thumbnails work. Frames/Stills dont

Post by DSchwarz » Sat Feb 18, 2017 5:54 pm

Spoke too soon... now neither tumbnails, nor frames work for new events.
For old Events both do indeed work.

I am contenplating either going full UTC with System, Php and Mysql or setting the system the Europe/Berlin as well.

On the one hand I wold prefer to have lokal times, on the other DST can be quite the pain in the butt...

DSchwarz
Posts: 13
Joined: Tue Jan 10, 2017 7:53 pm

Re: [SOLVED]Stream, Video, Thumbnails work. Frames/Stills dont

Post by DSchwarz » Sat Feb 18, 2017 6:42 pm

Going full UTC did not work...

Setting Europe/Berlin for the system did the trick however. Here is how to do that on a Fedora machine

Code: Select all

timedatectl set-timezone Europe/Berlin

Even though this works for me now as intended, I feel that this coul dhave been handled a little better by Zoneminder. Not complaining. Just saying a sound system could be a tad better. ;-)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests