Everything borked after Docker wipe

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
maskott
Posts: 12
Joined: Wed Dec 07, 2016 1:27 am

Everything borked after Docker wipe

Post by maskott »

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?
maskott
Posts: 12
Joined: Wed Dec 07, 2016 1:27 am

Re: Everything borked after Docker wipe

Post by maskott »

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
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Everything borked after Docker wipe

Post by rockedge »

double check the permissions of the /dev/shm
maskott
Posts: 12
Joined: Wed Dec 07, 2016 1:27 am

Re: Everything borked after Docker wipe

Post by maskott »

From my host machine:

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 ../
From inside the zoneminder docker instance:

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
I think that means `/dev/shm` is 777, correct? What should it be?
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Everything borked after Docker wipe

Post by rockedge »

yes that does look correct.
maskott
Posts: 12
Joined: Wed Dec 07, 2016 1:27 am

Re: Everything borked after Docker wipe

Post by maskott »

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
maskott
Posts: 12
Joined: Wed Dec 07, 2016 1:27 am

Re: Everything borked after Docker wipe

Post by maskott »

Just noticed that `/dev/shm` is showing as 100% on my Console:

Screenshot 2018-10-11 15.22.20.png
Screenshot 2018-10-11 15.22.20.png (24.58 KiB) Viewed 3659 times

Is that normal? What does it mean?
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Everything borked after Docker wipe

Post by bbunge »

It means you are out of memory.
maskott
Posts: 12
Joined: Wed Dec 07, 2016 1:27 am

Re: Everything borked after Docker wipe

Post by maskott »

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.
maskott
Posts: 12
Joined: Wed Dec 07, 2016 1:27 am

Re: Everything borked after Docker wipe

Post by maskott »

Yep... The RAM was the culprit. I though I had `docker run` with that `--shm-size=4096m` flag, but I had not.

Thanks everyone!
Post Reply