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

Paul Harrison mythtv at mythqml.net
Thu Apr 29 21:43:41 UTC 2021

On 29/04/2021 00:15, Paul Harrison wrote:

> On 28/04/2021 03:58, A. F. Cano wrote:
>> On Wed, Apr 28, 2021 at 12:00:38AM +0100, Paul Harrison wrote:
>>> ...
>>> Ah! I forgot you are running MythTV 30.0 which is missing some 
>>> fixes. It's
>>> difficult to keep track of all the changes in MythTV and Zoneminder 
>>> and what
>>> is compatible with what at least that's my excuse :)
>>> Only current master looks in /etc/zm/conf.d/01-system-paths.conf for 
>>> the
>>> ZM_PATH_MAP setting. Older versions only look in /etc/zm.conf or the
>>> location you tell it to load the config from when you pass a -c 
>>> command line
>>> parameter to mythzmserver.
>>> You will have to either copy the ZM_PATH_MAP setting to 
>>> /etc/zm/zm.conf or
>>> you could create a custom copy of /etc/zm/zm.conf specifically for
>>> mythzmserver to use and add the ZM_PATH_MAP setting then tell 
>>> mythzmserver
>>> to use your custom zm.conf file using the -c parameter.
>> Ok, added:
>> ZM_PATH_MAP=/dev/shm
>> ZM_VERSION=1.32.3
>> to the end of /etc/zm/zm.conf but I still get this non-stop when in
>> "Show Live View":
>> 2021-04-27 21:58:43.779205 E  The server failed to process the 
>> command. The error was:-
>>                          ERROR - Cannot get shared memory pointers
>> and I get the test pattern on the frontend.
>> Of interest regarding shared memory, mythzmserver gives this:
>> 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:
>> It is strange that it finds a ZM_SHM_KEY but then the "ZM_PATH_MAP
>> Result:" is empty, and the "Memory path directory is:" is also empty.
>> And then:
>> 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
>> So it looks like even though it has a shared memory key and the
>> ZM_PATH_MAP=/dev/shm parameter is in /etc/zm/zm.conf it is still not
>> finding the file and reverting to "the legacy shared memory method".
>> It certainly looks like mythzmserver is ignoring the ZM_PATH_MAP
>> variable.  Is it using the "legacy ahared memory method" and that is
>> what is causing the memory pointer errors?
> Yes for some reason it's not finding the ZM_PATH_MAP setting in the 
> config file and falling back to reading the setting from the DB which 
> also fails because that setting is no longer in the database.
> I'd rather not mess with the ZM database but Plan B might be to 
> temporarily add the setting to the Config table I think it is so at 
> least when it fails to find it in the config file it can fall back to 
> the setting from the DB. Plan C would be to just default to using 
> '/dev/shm' if all else fails which is a good default for Ubuntu and 
> debian at least.
> Let me do some more digging and I will get back to you when I'm less 
> tired.
> Paul H.

OK unfortunately MythTV 30.0 is just too old to support ZoneMinder 
1.32.3 because it's missing some crucial commits that added support for 
that version of ZM which is why you are having so many problems.

One crucial commit is this one that added support for ZoneMinder 1.32.x 
https://github.com/MythTV/mythtv/commit/d8eb7f78283d .

So if you want to use ZM 1.32.3 you need MythTV 31.0 or later. Sorry I 
should have picked that up earlier. Like I said keeping up with what 
version of ZM is compatible with what version of MythTV is a bit of a 

Paul H.

More information about the mythtv-users mailing list