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

A. F. Cano afc54 at comcast.net
Tue Apr 27 03:12:16 UTC 2021


On Tue, Apr 27, 2021 at 01:43:27AM +0100, Paul Harrison wrote:
>    On 26/04/2021 21:02, A. F. Cano wrote:
> 
>      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?
> 
>    OK thanks for the log I think I see what's happening now.
> 
>    In older versions of ZM < 1.32.0 the shared memory path was stored in the
>    database Config table as setting "ZM_PATH_MAP" but newer version >= 1.32.0
>    put the ZM_PATH_MAP setting in the
>    /etc/zm/zm.conf or in /etc/zm/conf.d/01-system-paths.conf config files.
> 
>    When mythzmserver starts up it first looks for the ZM_VERSION setting to
>    figure out which version of ZM we have and if it is >= 1.32.0 it looks for
>    the ZM_PATH_MAP setting in either of the two *.conf files. If it's not
>    found then as a last resort looks for the ZM_PATH_MAP setting in the
>    database which it looks like that setting was removed from the database in
>    newer versions which is why you get the 'Failed to get mysql row' error
>    messages. I use 1.34.26 and no longer see that setting in the DB either.
> 
>    So basically you need to make sure one of the two *.conf files contains a
>    setting for ZM_PATH_MAP (the Ubuntu packages I use do this automatically,
>    I'm guessing the deb_multimedia packages use a different name/location for
>    the user config file at /etc/zm/conf.d/01-system-paths.conf?)
> 
>    My ZM_PATH_MAP setting is in /etc/zm/conf.d/01-system-paths.conf and looks
>    like this :-
> 
>    # Full Path to ZoneMinder's mapped memory files
>    # The web account user must have full read/write permission to this
>    folder.
>    ZM_PATH_MAP=/dev/shm

Same here.

$ ls -la /dev/shm
total 72024
drwxrwxrwt  2 root     root           80 Apr 26 22:55 ./
drwxr-xr-x 20 root     root         3780 Apr 23 19:17 ../
-rw------- 1 postgres postgres    14992 Apr 21 08:05 PostgreSQL.1073826586
-rw------- 1 www-data www-data 73733672 Apr 26 22:10 zm.mmap.2

I am a member of groups www-data and video.  I start the front-end as myself.

This is what's in /etc/group for the relevant groups:

www-data:x:33:afc
video:x:44:afc,mythtv,motion,www-data

Evan after chmod g+rw /etc/shm/zm.mmap.2

$ ls -l /dev/shm
total 72024
-rw------- 1 postgres postgres    14992 Apr 21 08:05 PostgreSQL.1073826586
-rw-rw---- 1 www-data www-data 73733672 Apr 26 22:10 zm.mmap.2

The ZM_PATH_MAP is blank:

getZMSetting: ZM_PATH_MAP Result: 
Memory path directory is: 

and the frontend cannot access the shared memory and I only see the test
pattern.  Maybe it's not a permissions issue, or is it?

Even after chmod o+rw /dev/shm/zm.mmap.2

$ ls -l /dev/shm
total 72024
-rw------- 1 postgres postgres    14992 Apr 21 08:05 PostgreSQL.1073826586
-rw-rw-rw- 1 www-data www-data 73733672 Apr 26 22:10 zm.mmap.2

the ZM_PATH_MAP is still blank, but now I get this: (this is an error
message from the frontend, not mythzmserver.

                        ERROR - Cannot get shared memory pointers
2021-04-26 22:37:36.565699 E  The server failed to process the command. The error was:-

repeated a gazillion times while in "show live view", while still only
seeing the test pattern.  Curiouser and curiouser...

The conf file says "read/write permission to the folder".  It shouldn't
be necessary to chmod the file itself, right?

Even starting the frontend with sudo gives the same result.

Not sure what else to try next.  Any ideas?

Thanks!

Augustine


More information about the mythtv-users mailing list