[mythtv-users] Mythzmserver DB problems. Was: doesn't start:...

A. F. Cano afc54 at comcast.net
Mon Apr 26 20:02:19 UTC 2021


On Mon, Apr 26, 2021 at 07:29:45PM +0100, Paul Harrison wrote:
>...
>    OK so it's not that then. It does look like a query is failing for some
>    reason and that is cascading to other errors.
> 
>    Can you try adding -v or --verbose to the command line flags and start
>    mythzmserver like that. Maybe the extra debugging will give a clue.

Summary:

getZMSetting: ZM_SHM_KEY Result: 0x7a6d0000
Shared memory key is: 0x7a6d0000
Failed to get mysql row
...
Failed to open mmap file [/zm.mmap.2] for monitor: 2 : No such file or directory
Falling back to the legacy shared memory method
Failed to shmget for monitor: 2
ENOENT - no segment exists for the given key
...
getZMSetting: ZM_PATH_MAP Result: 
Memory path directory is: 

I wonder if this ZM_PATH_MAP needs to be set explicitly and if so what
needs to be the value.  Shared memory seems to be the problem.  Or is
this obtained from the mysql row that fails?

About the mysql row that fails, would it help to send the 
/usr/share/zoneminder/db/zm_create.sql?  It is quite large: 2874 lines.

If the shared memory area is where the video frames go, no wonder only
the test pattern is displayed, there is no picture to display that
mythzmserver can find.

These seem to be the only errors.  The complete log is below.

Start zm from web browser, then

# mythzmserver -v -c /etc/zm/zm.conf
loading zm config from /etc/zm/zm.conf
ZM is version '1.32.3'
Listening on port: 6548
Using server protocol version '11'
getZMSetting: ZM_SHM_KEY Result: 0x7a6d0000
Shared memory key is: 0x7a6d0000
Failed to get mysql row
getZMSetting: ZM_PATH_MAP Result: 
Memory path directory is: 
getZMSetting: ZM_EVENT_IMAGE_DIGITS Result: 5
Event file format is: %05d-capture.jpg
Analysis file format is: %05d-analyse.jpg
getZMSetting: ZM_USE_DEEP_STORAGE Result: 1
using deep storage directory structure
getZMSetting: ZM_CREATE_ANALYSIS_IMAGES Result: 1
using analysis images
Got 1 monitors
Failed to open mmap file [/zm.mmap.2] for monitor: 2 : No such file or directory
Falling back to the legacy shared memory method
Failed to shmget for monitor: 2
ENOENT - no segment exists for the given key
new connection from 127.0.0.1 on socket 5
Processing: 'HELLO'
Processing: 'GET_MONITOR_LIST'
We have 1 monitors
id:             2
name:           Desk-C600
width:          1280
height:         720
palette:        0
byte per pixel: 4
sub pixel order:2
-------------------
Processing: 'GET_ALARM_STATES'
Processing: 'GET_ALARM_STATES'
Processing: 'GET_ALARM_STATES'
...

These repeat every second

Then there is this:

...
Processing: 'GET_ALARM_STATES'
Processing: 'GET_ALARM_STATES'
Using server protocol version '11'
getZMSetting: ZM_SHM_KEY Result: 0x7a6d0000
Shared memory key is: 0x7a6d0000
Failed to get mysql row
getZMSetting: ZM_PATH_MAP Result: 
Memory path directory is: 
getZMSetting: ZM_EVENT_IMAGE_DIGITS Result: 5
Event file format is: %05d-capture.jpg
Analysis file format is: %05d-analyse.jpg
getZMSetting: ZM_USE_DEEP_STORAGE Result: 1
using deep storage directory structure
getZMSetting: ZM_CREATE_ANALYSIS_IMAGES Result: 1
using analysis images
Got 1 monitors
Failed to open mmap file [/zm.mmap.2] for monitor: 2 : No such file or directory
Falling back to the legacy shared memory method
Failed to shmget for monitor: 2
ENOENT - no segment exists for the given key
new connection from 192.168.200.9 on socket 6
socket 6 hung up
ZMServer destroyed
Processing: 'GET_ALARM_STATES'
Processing: 'GET_ALARM_STATES'
...

Then when selecting "show live view":

Processing: 'GET_LIVE_FRAME'
Kicking database connection
Getting live frame from monitor: 2
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2
Processing: 'GET_ALARM_STATES'
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2
Processing: 'GET_LIVE_FRAME'
Getting live frame from monitor: 2

This kept on going until I exited "show live view".  There was just the
test pattern in the live view screen.

Then there was this: (this block also reappears periodically even after
both zm and the front end are no longer running, but then another front
end is running on another screen but it was just sitting there)

Processing: 'GET_ALARM_STATES'
Processing: 'GET_ALARM_STATES'
Using server protocol version '11'
getZMSetting: ZM_SHM_KEY Result: 0x7a6d0000
Shared memory key is: 0x7a6d0000
Failed to get mysql row
getZMSetting: ZM_PATH_MAP Result: 
Memory path directory is: 
getZMSetting: ZM_EVENT_IMAGE_DIGITS Result: 5
Event file format is: %05d-capture.jpg
Analysis file format is: %05d-analyse.jpg
getZMSetting: ZM_USE_DEEP_STORAGE Result: 1
using deep storage directory structure
getZMSetting: ZM_CREATE_ANALYSIS_IMAGES Result: 1
using analysis images
Got 1 monitors
Failed to open mmap file [/zm.mmap.2] for monitor: 2 : No such file or directory
Falling back to the legacy shared memory method
Failed to shmget for monitor: 2
ENOENT - no segment exists for the given key
new connection from 192.168.200.9 on socket 6
socket 6 hung up
ZMServer destroyed
Processing: 'GET_ALARM_STATES'
Processing: 'GET_ALARM_STATES'
...

Then when I exited the front end:

socket 5 hung up
ZMServer destroyed

And finally when I told zm to stop via the web browser:

Kicking database connection
Kicking database connection

>    I think having NULL for the host is OK for a Local camera only remote
>    cameras like IP cameras will have a Host set.

Makes sense.

Thanks!

Augustine


More information about the mythtv-users mailing list