File source not working anymore
Posted: Sun Mar 03, 2019 4:20 am
I am not able to get file source monitors to work anymore. They used to work. My http monitors still work. I am on Ubuntu 16.04.5. I was on Zoneminder 1.32.2-xenial from iconnor ppa. I updated to 1.32.3 to try to fix this problem and that did not help.
Here is what I see. I put a jpeg file in /tmp as a test. It looks like this (for example):
# file /tmp/sj1.jpg
/tmp/sj1.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2019:03:01 19:28:53, width=0], baseline, precision 8, 1280x720, frames 3
I can display the file outside of Zoneminder just fine using imagemagick 'display' or 'eog' or another viewer tool and it seems fine.
In Zoneminder, I create a monitor with Source Type File and Source Path /tmp/sj1.jpg, 24 bit colour, 1280 width and 720 height, reasonable FPS etc.
I set the Function to Monitor and Enabled. When I view the monitor in Zoneminder web interface (low bandwidth), no image displays (or just a little broken image icon).
It looks like the zmc process is continually being killed and restarted because it isn't delivering images. See logs below.
I have enabled the extra debugging logs and nothing in them seemed helpful.
Again, this problem only appears for file sources. Http sources seem to work fine.
I've attached a portion of normal logs with no other monitors active. I notice that there is a Memory map file error, which sounds promising. Running ipcs -m does not seem to show any Zoneminder related share memory segments, however as I said, http monitors do work fine. All shared memory parameters seem good but it does seem odd that there are no shared memory segments owned by www-data or other Zoneminder related user.
Any suggestions for debugging this are appreciated!
Thanks,
Rich
----
Date/Time Component Server PID Level Message File Line
2019-03-02 19:48:26 zmdc 3449 INF Starting pending process, zmc -m 11 zmdc.pl
2019-03-02 19:48:26 zmdc 6733 INF 'zmc -m 11' started at 19/03/02 19:48:26 zmdc.pl
2019-03-02 19:48:26 zmdc 3449 INF 'zmc -m 11' starting at 19/03/02 19:48:26, pid = 6733 zmdc.pl
2019-03-02 19:48:26 zmc_m11 6733 INF Starting Capture version 1.32.3 zmc.cpp 223
2019-03-02 19:48:25 zmdc 3449 INF 'zmc -m 11' exited normally zmdc.pl
2019-03-02 19:48:25 zmc_m11 6557 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
2019-03-02 19:48:25 zmdc 3449 INF 'zmc -m 11' sending stop to pid 6557 at 19/03/02 19:48:25 zmdc.pl
2019-03-02 19:48:25 zmwatch 3503 INF Restarting capture daemon for Monitor-11, no image since startup. Startup time was 1551584895 - now 1551584905 > 5 zmwatch.pl
2019-03-02 19:48:23 web_js 2152 ERR Uncaught TypeError: Cannot read property 'split' of undefined blob:d5826278-83a0-48e7-b38b-bb54c2f7fa12 15
2019-03-02 19:48:23 web_js 2152 ERR undefined - getScriptLocation()
2019-03-02 19:48:15 zmwatch 3503 ERR Memory map file '/dev/shm/zm.mmap.11' does not exist. zmc might not be running. zmwatch.pl
2019-03-02 19:48:15 zmwatch 3503 INF Restarting capture daemon for Monitor-11, shared data not valid zmwatch.pl
2019-03-02 19:48:15 zmdc 3449 WAR Can't find process with command of 'zmc -m 11' zmdc.pl
2019-03-02 19:48:15 zmdc 3449 INF 'zmc -m 11' starting at 19/03/02 19:48:15, pid = 6557 zmdc.pl
2019-03-02 19:48:15 zmdc 6557 INF 'zmc -m 11' started at 19/03/02 19:48:15 zmdc.pl
2019-03-02 19:48:15 zmc_m11 6557 INF Starting Capture version 1.32.3 zmc.cpp 223
2019-03-02 19:48:05 zmdc 3449 INF Command 'zmc -m 11' removed from pending list at 19/03/02 19:48:05 zmdc.pl
2019-03-02 19:48:05 zmwatch 3503 INF Restarting capture daemon for Monitor-11, shared data not valid zmwatch.pl
2019-03-02 19:48:05 zmwatch 3503 ERR Memory map file '/dev/shm/zm.mmap.11' does not exist. zmc might not be running. zmwatch.pl
2019-03-02 19:47:55 zmwatch 3503 ERR Memory map file '/dev/shm/zm.mmap.11' does not exist. zmc might not be running. zmwatch.pl
2019-03-02 19:47:55 zmwatch 3503 INF Restarting capture daemon for Monitor-11, shared data not valid zmwatch.pl
2019-03-02 19:47:55 zmdc 3449 INF Starting pending process, zmc -m 11 zmdc.pl
2019-03-02 19:47:55 zmdc 3449 INF 'zmc -m 11' starting at 19/03/02 19:47:55, pid = 6512 zmdc.pl
2019-03-02 19:47:55 zmdc 6512 INF 'zmc -m 11' started at 19/03/02 19:47:55 zmdc.pl
2019-03-02 19:47:55 zmc_m11 6512 INF Starting Capture version 1.32.3 zmc.cpp 223
2019-03-02 19:47:55 zmdc 3449 INF 'zmc -m 11' sending stop to pid 6512 at 19/03/02 19:47:55 zmdc.pl
2019-03-02 19:47:55 zmc_m11 6512 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
2019-03-02 19:47:55 zmdc 3449 INF 'zmc -m 11' exited normally zmdc.pl
2019-03-02 19:47:51 web_js 2151 ERR Export request failed: 500 / Internal Server Error - exportFail() ?view=log
2019-03-02 19:47:48 zmfilter_2 3490 INF Checking filter Update DiskSpace update disk space returned 0 events zmfilter.pl
2019-03-02 19:47:47 zmfilter_1 3481 INF Checking filter PurgeWhenFull delete returned 0 events zmfilter.pl
2019-03-02 19:47:45 zmdc 3449 INF 'zmc -m 11' exited normally zmdc.pl
2019-03-02 19:47:45 zmc_m11 6305 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
2019-03-02 19:47:45 zmdc 3449 INF 'zmc -m 11' sending stop to pid 6305 at 19/03/02 19:47:45 zmdc.pl
2019-03-02 19:47:45 zmwatch 3503 INF Restarting capture daemon for Monitor-11, no image since startup. Startup time was 1551584850 - now 1551584865 > 5 zmwatch.pl
2019-03-02 19:47:30 zmc_m11 6305 INF Starting Capture version 1.32.3 zmc.cpp 223
2019-03-02 19:47:30 zmdc 6305 INF 'zmc -m 11' started at 19/03/02 19:47:30 zmdc.pl
2019-03-02 19:47:30 zmdc 3449 INF 'zmc -m 11' starting at 19/03/02 19:47:30, pid = 6305 zmdc.pl
2019-03-02 19:47:30 zmdc 3449 INF Starting pending process, zmc -m 11 zmdc.pl
2019-03-02 19:47:25 zmdc 3449 INF 'zmc -m 11' exited normally zmdc.pl
2019-03-02 19:47:25 zmc_m11 6276 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
2019-03-02 19:47:25 zmdc 3449 INF 'zmc -m 11' sending stop to pid 6276 at 19/03/02 19:47:25 zmdc.pl
2019-03-02 19:47:25 zmwatch 3503 INF Restarting capture daemon for Monitor-11, no image since startup. Startup time was 1551584836 - now 1551584845 > 5 zmwatch.pl
2019-03-02 19:47:16 zmc_m11 6276 INF Starting Capture version 1.32.3 zmc.cpp 223
Here is what I see. I put a jpeg file in /tmp as a test. It looks like this (for example):
# file /tmp/sj1.jpg
/tmp/sj1.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_ov5647, xresolution=156, yresolution=164, resolutionunit=2, datetime=2019:03:01 19:28:53, width=0], baseline, precision 8, 1280x720, frames 3
I can display the file outside of Zoneminder just fine using imagemagick 'display' or 'eog' or another viewer tool and it seems fine.
In Zoneminder, I create a monitor with Source Type File and Source Path /tmp/sj1.jpg, 24 bit colour, 1280 width and 720 height, reasonable FPS etc.
I set the Function to Monitor and Enabled. When I view the monitor in Zoneminder web interface (low bandwidth), no image displays (or just a little broken image icon).
It looks like the zmc process is continually being killed and restarted because it isn't delivering images. See logs below.
I have enabled the extra debugging logs and nothing in them seemed helpful.
Again, this problem only appears for file sources. Http sources seem to work fine.
I've attached a portion of normal logs with no other monitors active. I notice that there is a Memory map file error, which sounds promising. Running ipcs -m does not seem to show any Zoneminder related share memory segments, however as I said, http monitors do work fine. All shared memory parameters seem good but it does seem odd that there are no shared memory segments owned by www-data or other Zoneminder related user.
Any suggestions for debugging this are appreciated!
Thanks,
Rich
----
Date/Time Component Server PID Level Message File Line
2019-03-02 19:48:26 zmdc 3449 INF Starting pending process, zmc -m 11 zmdc.pl
2019-03-02 19:48:26 zmdc 6733 INF 'zmc -m 11' started at 19/03/02 19:48:26 zmdc.pl
2019-03-02 19:48:26 zmdc 3449 INF 'zmc -m 11' starting at 19/03/02 19:48:26, pid = 6733 zmdc.pl
2019-03-02 19:48:26 zmc_m11 6733 INF Starting Capture version 1.32.3 zmc.cpp 223
2019-03-02 19:48:25 zmdc 3449 INF 'zmc -m 11' exited normally zmdc.pl
2019-03-02 19:48:25 zmc_m11 6557 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
2019-03-02 19:48:25 zmdc 3449 INF 'zmc -m 11' sending stop to pid 6557 at 19/03/02 19:48:25 zmdc.pl
2019-03-02 19:48:25 zmwatch 3503 INF Restarting capture daemon for Monitor-11, no image since startup. Startup time was 1551584895 - now 1551584905 > 5 zmwatch.pl
2019-03-02 19:48:23 web_js 2152 ERR Uncaught TypeError: Cannot read property 'split' of undefined blob:d5826278-83a0-48e7-b38b-bb54c2f7fa12 15
2019-03-02 19:48:23 web_js 2152 ERR undefined - getScriptLocation()
2019-03-02 19:48:15 zmwatch 3503 ERR Memory map file '/dev/shm/zm.mmap.11' does not exist. zmc might not be running. zmwatch.pl
2019-03-02 19:48:15 zmwatch 3503 INF Restarting capture daemon for Monitor-11, shared data not valid zmwatch.pl
2019-03-02 19:48:15 zmdc 3449 WAR Can't find process with command of 'zmc -m 11' zmdc.pl
2019-03-02 19:48:15 zmdc 3449 INF 'zmc -m 11' starting at 19/03/02 19:48:15, pid = 6557 zmdc.pl
2019-03-02 19:48:15 zmdc 6557 INF 'zmc -m 11' started at 19/03/02 19:48:15 zmdc.pl
2019-03-02 19:48:15 zmc_m11 6557 INF Starting Capture version 1.32.3 zmc.cpp 223
2019-03-02 19:48:05 zmdc 3449 INF Command 'zmc -m 11' removed from pending list at 19/03/02 19:48:05 zmdc.pl
2019-03-02 19:48:05 zmwatch 3503 INF Restarting capture daemon for Monitor-11, shared data not valid zmwatch.pl
2019-03-02 19:48:05 zmwatch 3503 ERR Memory map file '/dev/shm/zm.mmap.11' does not exist. zmc might not be running. zmwatch.pl
2019-03-02 19:47:55 zmwatch 3503 ERR Memory map file '/dev/shm/zm.mmap.11' does not exist. zmc might not be running. zmwatch.pl
2019-03-02 19:47:55 zmwatch 3503 INF Restarting capture daemon for Monitor-11, shared data not valid zmwatch.pl
2019-03-02 19:47:55 zmdc 3449 INF Starting pending process, zmc -m 11 zmdc.pl
2019-03-02 19:47:55 zmdc 3449 INF 'zmc -m 11' starting at 19/03/02 19:47:55, pid = 6512 zmdc.pl
2019-03-02 19:47:55 zmdc 6512 INF 'zmc -m 11' started at 19/03/02 19:47:55 zmdc.pl
2019-03-02 19:47:55 zmc_m11 6512 INF Starting Capture version 1.32.3 zmc.cpp 223
2019-03-02 19:47:55 zmdc 3449 INF 'zmc -m 11' sending stop to pid 6512 at 19/03/02 19:47:55 zmdc.pl
2019-03-02 19:47:55 zmc_m11 6512 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
2019-03-02 19:47:55 zmdc 3449 INF 'zmc -m 11' exited normally zmdc.pl
2019-03-02 19:47:51 web_js 2151 ERR Export request failed: 500 / Internal Server Error - exportFail() ?view=log
2019-03-02 19:47:48 zmfilter_2 3490 INF Checking filter Update DiskSpace update disk space returned 0 events zmfilter.pl
2019-03-02 19:47:47 zmfilter_1 3481 INF Checking filter PurgeWhenFull delete returned 0 events zmfilter.pl
2019-03-02 19:47:45 zmdc 3449 INF 'zmc -m 11' exited normally zmdc.pl
2019-03-02 19:47:45 zmc_m11 6305 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
2019-03-02 19:47:45 zmdc 3449 INF 'zmc -m 11' sending stop to pid 6305 at 19/03/02 19:47:45 zmdc.pl
2019-03-02 19:47:45 zmwatch 3503 INF Restarting capture daemon for Monitor-11, no image since startup. Startup time was 1551584850 - now 1551584865 > 5 zmwatch.pl
2019-03-02 19:47:30 zmc_m11 6305 INF Starting Capture version 1.32.3 zmc.cpp 223
2019-03-02 19:47:30 zmdc 6305 INF 'zmc -m 11' started at 19/03/02 19:47:30 zmdc.pl
2019-03-02 19:47:30 zmdc 3449 INF 'zmc -m 11' starting at 19/03/02 19:47:30, pid = 6305 zmdc.pl
2019-03-02 19:47:30 zmdc 3449 INF Starting pending process, zmc -m 11 zmdc.pl
2019-03-02 19:47:25 zmdc 3449 INF 'zmc -m 11' exited normally zmdc.pl
2019-03-02 19:47:25 zmc_m11 6276 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
2019-03-02 19:47:25 zmdc 3449 INF 'zmc -m 11' sending stop to pid 6276 at 19/03/02 19:47:25 zmdc.pl
2019-03-02 19:47:25 zmwatch 3503 INF Restarting capture daemon for Monitor-11, no image since startup. Startup time was 1551584836 - now 1551584845 > 5 zmwatch.pl
2019-03-02 19:47:16 zmc_m11 6276 INF Starting Capture version 1.32.3 zmc.cpp 223