this is my first post so i wanna greet all and say that the original author and all the contributors have made an amazing job! I'm true

It's about two weeks now i'm working on setting up my first zm server so i'm not an expert but i swear i read all the official guides and wikis and forums many times and ended up with the following results (or better goals for me hehe). I still have a couple of issues i was not able to solve so i really hope someone can help.
But first a general description of the environment:
[Workstation]
Ubunto 18.04
CPU Intel Q9400 2.66Ghz quad cpu
6Gb ram, 70% mapped memory
NVidia GeForce 8400
No other relevant loads beside zoneminder
[Zoneminder]
Zoneminder 1.32.3 official release, using https with letsencrypt cert
EventServer 4.7 with its object detection/face recognition hook (hog actually)
ZmNinja 1.3.082 android
Camera1: Onvif 1920x1080 10fps, wifi
ffmpeg, modect, buffersize 100, Pre/Post image count 50
Camera2: Onvif 1280x960 15fps, lan cable, PTZ (via onvif)
ffmpeg, modect, buffersize 100, Pre/Post image count 50
Camera3: Onvif 1280x960 15fps, wifi, PTZ (via onvif)
ffmpeg, modect, buffersize 100, Pre/Post image count 50
[General stats]
Load (from zm web): 1-3 as an average (this is the highest load i saw but havent checked a whole day)
Code: Select all
df -h
Filesystem…..Size Used Avail Use% Mounted on
tmpfs…………..4.1G 1.7G 2.4G 42% /dev/shm
But… there's always a but… more than one tbh.
Logs are set to debug for zmdetect, zmeventnotification
1) Object/face detection stops working after restarting zoneminder service
When i restart the workstation (or just the zoneminder service via systemctl), object detection stops working. after some time (about 1 hour) everything fix ups by itself. Here's the relevant part of the error (ful logs attached)
Code: Select all
CONSOLE INFO:2019-12-17,23:16:37 Invoking hook:'/var/lib/zmeventnotification/bin/zm_detect_wrapper.sh' 1078 1 "Living room" "Motion Alarm,"
Traceback (most recent call last):
File "/usr/lib/python3.6/urllib/request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/lib/python3.6/http/client.py", line 1254, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1300, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1249, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1036, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 974, in send
self.connect()
File "/usr/lib/python3.6/http/client.py", line 1407, in connect
super().connect()
File "/usr/lib/python3.6/http/client.py", line 946, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/usr/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 75, in <module>
filename1, filename2, filename1_bbox, filename2_bbox = utils.download_files(args)
File "/usr/local/lib/python3.6/dist-packages/zmes_hook_helpers/utils.py", line 129, in download_files
input_file = opener.open(url)
File "/usr/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/usr/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 1361, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.6/urllib/request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
Apache logs are clean, i only see lots of [Login successful for user "admin"]. Is this normal?
As i said after some time it simply starts working, the error disappears and face detection completes.
i'm not sure if times match but, can the uninstallation of another nvr sw and node.js be the cause? i've paid attention, followed the guides and everything else seems ok.
When this error happens, i don't get notifications sent. No matter if its a true alarm or forced one.
I don't know if this error happens when zm restarts itself every 3hrs. Is it the same as restarting the service from command line?
2) Face detection and cnn model performance
With this configuration cnn model takes something like 150-200s to complete the analysis. This is why im using hog that takes just 2-3s (for face detection).
Do you think that these high cnn times are normal with my hw/sw configuration? They sound weird to me but i don't really know...
Is there a way to keep the hog model in memory thus saving the initial 3-4s initialization?
I would really appreciate any advice for configuration changes in my environment or your overall opinion
i have another issue with zmNinja but i will open another thread for it. Perhaps it could be somehow related to this. Hope someone can help
Thanks in advance!