Everything borked after Docker wipe
Everything borked after Docker wipe
I had everything set up and running beautifully in a Docker container (pretty sure it was also on ZoneMinder 1.32), then I realized I had my instance on my small boot drive and it filled up the partition. Anyways, I've got Docker up and running in Ubuntu 18.04 from a larger drive now. Everything from my configs had been blown away, but I think I've got the conf directory properly mapped from my docker create command now and I appear to be able to see saved preferences between different runs of the docker instance now.
Problem is, I can't seem to add any of my cameras! I've tried adding different types, RTSP, MJPEG, etc. I've got 13 cameras of 7 different types and despite having good notes on what their different source settings should be, none of them will connect and show the camera's image once I add the monitors. I connected to the docker instance and ran a `traceroute` to the camera IPs. Everything is fine, one hop. I've tried all I can think of... What am I missing here?
Problem is, I can't seem to add any of my cameras! I've tried adding different types, RTSP, MJPEG, etc. I've got 13 cameras of 7 different types and despite having good notes on what their different source settings should be, none of them will connect and show the camera's image once I add the monitors. I connected to the docker instance and ran a `traceroute` to the camera IPs. Everything is fine, one hop. I've tried all I can think of... What am I missing here?
Re: Everything borked after Docker wipe
Here is a sample of the kind of errors I am seeing in the logs:
Code: Select all
2018-10-10 22:37:08 zms_m4 12760 ERR Backtrace 4: /usr/lib/zoneminder/cgi-bin/nph-zms(main+0xdac) [0x55bfe96f660c] zm_signal.cpp 102
2018-10-10 22:37:08 zms_m4 12760 ERR Backtrace 3: /usr/lib/zoneminder/cgi-bin/nph-zms(_ZN13MonitorStream9runStreamEv+0x89) [0x55bfe973a889] zm_signal.cpp 102
2018-10-10 22:37:08 zms_m4 12760 ERR Backtrace 2: /usr/lib/zoneminder/cgi-bin/nph-zms(_ZNK7Monitor6GetFPSEv+0x1b) [0x55bfe9727d7b] zm_signal.cpp 102
2018-10-10 22:37:08 zms_m4 12760 ERR Backtrace 1: /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890) [0x7f39c6b28890] zm_signal.cpp 102
2018-10-10 22:37:08 zms_m4 12760 ERR Backtrace 0: /usr/lib/zoneminder/cgi-bin/nph-zms(_Z14zm_die_handleriP9siginfo_tPv+0x78) [0x55bfe9789458] zm_signal.cpp 102
2018-10-10 22:37:08 zms_m4 12760 ERR Got signal 7 (Bus error), crashing zm_signal.cpp 50
2018-10-10 22:37:08 web_js 491 ERR getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-823365s.sock ) failed: Connection refused - checkStreamForErrors() ?view=watch
2018-10-10 22:37:07 web_js 491 ERR getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-018685s.sock ) failed: Connection refused - checkStreamForErrors() ?view=watch
2018-10-10 22:37:07 web_php 491 ERR socket_sendto( /var/run/zm/zms-018685s.sock ) failed: Connection refused /usr/share/zoneminder/www/includes/functions.php 2042
2018-10-10 22:37:06 web_php 491 ERR socket_sendto( /var/run/zm/zms-393325s.sock ) failed: Connection refused /usr/share/zoneminder/www/includes/functions.php 2042
2018-10-10 22:37:06 web_js 491 ERR getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-393325s.sock ) failed: Connection refused - checkStreamForErrors() ?view=watch
Re: Everything borked after Docker wipe
double check the permissions of the /dev/shm
Re: Everything borked after Docker wipe
From my host machine:
From inside the zoneminder docker instance:
I think that means `/dev/shm` is 777, correct? What should it be?
Code: Select all
maskott@zen:/dev/shm$ ll
total 0
drwxrwxrwt 2 root root 40 Oct 7 23:25 ./
drwxr-xr-x 19 root root 4580 Oct 7 23:26 ../
Code: Select all
root@5acf184d9e82:/dev/shm# ll
total 65536
drwxrwxrwt 2 www-data root 120 Oct 10 22:29 ./
drwxr-xr-x 15 root root 4420 Oct 8 00:05 ../
-rw------- 1 www-data www-data 326866480 Oct 8 00:58 zm.mmap.1
-rw------- 1 www-data www-data 238884400 Oct 8 01:00 zm.mmap.2
-rw------- 1 www-data www-data 326866480 Oct 9 10:31 zm.mmap.3
-rw------- 1 www-data www-data 73733680 Oct 10 22:29 zm.mmap.4
Re: Everything borked after Docker wipe
yes that does look correct.
Re: Everything borked after Docker wipe
As an example of one of the cameras I have tried, I tried to add a Amcrest IP4M-1025E
POE camera that is hooked to the same network as my host server. I used the following settings:
- * Source Type: Ffmpeg
* Source Path: rtsp://zm_user:MYPASS@192.168.1.103:554/cam/realmonitor?channel=1&subtype=0
* Method: TCP
* Capture Width: 2688, Capture Height: 1520
Re: Everything borked after Docker wipe
Just noticed that `/dev/shm` is showing as 100% on my Console:
Is that normal? What does it mean?
Is that normal? What does it mean?
Re: Everything borked after Docker wipe
It means you are out of memory.
Re: Everything borked after Docker wipe
Hmmm... I wonder if that could be the issue then.
My host server has 14Gb of ram, but I'm running that docker container with `--shm-size=4096m`... I figured 4Gb would be enough, especially to just get a single camera working.
My host server has 14Gb of ram, but I'm running that docker container with `--shm-size=4096m`... I figured 4Gb would be enough, especially to just get a single camera working.
Re: Everything borked after Docker wipe
Yep... The RAM was the culprit. I though I had `docker run` with that `--shm-size=4096m` flag, but I had not.
Thanks everyone!
Thanks everyone!