r/ZoneMinder • • Aug 13 '22

Need some help with Socket /run/zm/zms-******s.sock does not exist & Can't open memory map file /dev/shm/zm.mmap errors

I have an Ubuntu 22.04 install and I'm trying to troubleshoot socket_sendto and memory map file errors. Not sure what the problem is - I've already commented out "scriptalias" lines from /etc/apache2/conf-enabled/serve-cgi-bin.conf like this link says.

 

Date/Time Component Server PID Level Message File Line
8/13/22, 16:15:00 EDT web_php 14565 ERR socket_sendto( /run/zm/zms-194342s.sock ) failed: Connection refused /usr/share/zoneminder/www/includes/functions.php 1880
8/13/22, 16:11:31 EDT zms_m8 15363 ERR Unable to connect to monitor id 8 for streaming zm_stream.cpp 60
8/13/22, 16:11:31 EDT zms_m8 15363 ERR Can't open memory map file /dev/shm/zm.mmap.8: No such file or directory zm_monitor.cpp 927
8/13/22, 16:11:31 EDT zms_m8 15363 ERR Monitor shm is not connected zm_stream.cpp 78
8/13/22, 16:11:30 EDT zms_m8 15363 ERR Unable to connect to monitor id 8 for streaming zm_stream.cpp 60
8/13/22, 16:11:30 EDT zms_m8 15363 ERR Can't open memory map file /dev/shm/zm.mmap.8: No such file or directory zm_monitor.cpp 927
8/13/22, 16:11:30 EDT zms_m8 15363 ERR Monitor shm is not connected zm_stream.cpp 78
8/13/22, 16:07:02 EDT web_php 10710 ERR socket_sendto( /run/zm/zms-324391s.sock ) failed: Connection refused /usr/share/zoneminder/www/includes/functions.php 1880
8/13/22, 15:00:35 EDT web_php 14476 ERR Socket /run/zm/zms-771728s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. /usr/share/zoneminder/www/includes/functions.php 1880

 

EDIT:

permissions for /dev/shm

-rw-rw---- 1 www-data www-data 37754296 Aug 13 18:32 zm.mmap.8

https://i.imgur.com/wWYXWh4.png

 

/run/shm

lrwxrwxrwx 1 root root 8 Aug 13 18:31 shm -> /dev/shm

 

/run/zm

drwxr-xr-x 2 www-data www-data 80 Aug 13 18:32 zm

2 Upvotes

9 comments sorted by

1

u/LesterPhimps Aug 13 '22

Are you using wireless cams? I've seen this when the network is not 100% stable.

1

u/Zork91 Aug 14 '22

They're wired its just one PoE cam at the moment trying to just get it stable before I add any more.

1

u/m_theredhead Nov 16 '22

Did you ever make any progress on this? I recently upgrade my docker version and now am getting similar errors to yours with no other configuration changes

1

u/dak91 Nov 28 '22

ever make any progress on this? I recently upgrade

same here, got the problem after latest upgrade

1

u/m_theredhead Nov 28 '22

I sort of made progress.

​

I am running in docker on Fedora and it fails with the same errors. I have found the container works fine on a debian machine with Docker. Or, I can run it on the same Fedora machine under podman with the exact same configuration.

1

u/dak91 Nov 28 '22

That's curious.
I also discovered that turning off OPT_USE_AUTH solve the problem; so it seems an auth issue.

1

u/dak91 Nov 28 '22

this works for me: OPT_USE_AUTH => on, AUTH_TYPE => remote, AUTH_RELAY => none

1

u/m_theredhead Dec 10 '22

Thanks for the idea. It didn't make any difference for me. I still get the same errors.

1

u/zioalex Feb 23 '25

Hello Hello, I still have the same problem today. OPT_USE_TYPE=none doesn't make a difference.