I got ZM-1.34 working with nginx on Ubuntu 19.10, installed as described here https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.34.x with `php7.3-fpm` and corresponding change at the end of `/etc/nginx/zoneminder.conf`. Now I've installed zmeventnotification server, but when trying to configure it atm i get stuck as soon as `Making sure everything is running (in manual mode)` with following error
Code: Select all
$ sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 3 2
Traceback (most recent call last):
File "/usr/lib/python3.7/urllib/request.py", line 1317, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/lib/python3.7/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/lib/python3.7/http/client.py", line 1414, in connect
super().connect()
File "/usr/lib/python3.7/http/client.py", line 938, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.7/socket.py", line 707, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 177, in <module>
filename1, filename2, filename1_bbox, filename2_bbox = utils.download_files(args)
File "/usr/local/lib/python3.7/dist-packages/zmes_hook_helpers/utils.py", line 130, in download_files
input_file = opener.open(url)
File "/usr/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/lib/python3.7/urllib/request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.7/urllib/request.py", line 1319, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
Code: Select all
$ sudo /usr/bin/zmeventnotification.pl --check-config
27.01.2020 02:42:25.662765 zmeventnotification[4018].INF [main:767] [PARENT: using config file: /etc/zm/zmeventnotification.ini]
27.01.2020 02:42:25.683228 zmeventnotification[4018].INF [main:767] [PARENT: using secrets file: /etc/zm/secrets.ini]
27.01.2020 02:42:25.697145 zmeventnotification[4018].INF [main:767] [PARENT: ES will not be restarted as interval is specified as 0]
Configuration (read /etc/zm/zmeventnotification.ini):
Secrets file.......................... /etc/zm/secrets.ini
Base data path........................./var/lib/zmeventnotification
Restart interval (secs)............... (undefined)
Port ................................. 9001
Address .............................. [::]
Event check interval ................. 5
Monitor reload interval .............. 300
Auth enabled ......................... yes
Auth timeout ......................... 20
Use FCM .............................. yes
FCM API key .......................... (defined)
Token file ........................... /var/lib/zmeventnotification/push/tokens.txt
Use MQTT ..............................no
MQTT Server ...........................127.0.0.1
MQTT Username .........................(undefined)
MQTT Password .........................(undefined)
SSL enabled .......................... no
SSL cert file ........................ /path/to/cert/file.pem
SSL key file ......................... /path/to/key/file.pem
Verbose .............................. no
Read alarm cause ..................... yes
Tag alarm event id ................... yes
Use custom notification sound ........ no
Send event end notification............yes
Use Hooks............................. 1
Hook Script on Event Start ........... '/var/lib/zmeventnotification/bin/zm_event_start.sh'
Hook Script on Event End.............. '/var/lib/zmeventnotification/bin/zm_event_end.sh'
Notify on Event Start (hook success).. all
Notify on Event Start (hook fail)..... none
Notify on Event End (hook success)... fcm,web
Notify on Event End (hook fail)...... none
Notify End only if Start success......yes
Use Hook Description........... yes
Keep frame match type.......... yes
Skipped monitors............... (undefined)
Store Frame in ZM...............yes
Picture URL ................... https://portal/zm/index.php?view=image&eid=EVENTID&fid=objdetect&width=600
Include picture................ yes
Picture username .............. user
Picture password .............. (defined)
This "manual" test seems to be working
Code: Select all
$ sudo -u www-data ./zmeventnotification.pl --config ./zmeventnotification.ini
27.01.2020 02:35:50.665265 zmeventnotification[3397].INF [main:767] [PARENT: using config file: ./zmeventnotification.ini]
27.01.2020 02:35:50.686586 zmeventnotification[3397].INF [main:767] [PARENT: using secrets file: /etc/zm/secrets.ini]
27.01.2020 02:35:50.702918 zmeventnotification[3397].INF [main:767] [PARENT: ES will not be restarted as interval is specified as 0]
27.01.2020 02:35:50.817873 zmeventnotification[3397].INF [main:767] [PARENT: Push enabled via FCM]
27.01.2020 02:35:50.832372 zmeventnotification[3397].INF [main:767] [PARENT: MQTT Disabled]
27.01.2020 02:35:50.851975 zmeventnotification[3397].INF [main:767] [PARENT: You are running version: 5.4]
Can't ignore signal CHLD, forcing to default.
27.01.2020 02:35:50.957428 zmeventnotification[3397].WAR [main:775] [PARENT: WARNING: SSL is disabled, which means all traffic will be unencrypted]
27.01.2020 02:35:50.971946 zmeventnotification[3397].INF [main:767] [PARENT: Event Notification daemon v 5.4 starting]
27.01.2020 02:35:50.985073 zmeventnotification[3397].INF [main:767] [PARENT: Initializing FCM tokens...]
27.01.2020 02:35:51.055021 zmeventnotification[3397].INF [main:767] [PARENT: Total event client connections: 0]
27.01.2020 02:35:51.074184 zmeventnotification[3397].INF [main:767] [PARENT: Reloading Monitors...]
27.01.2020 02:35:51.091665 zmeventnotification[3397].INF [main:767] [PARENT: Re-loading monitors, emptying needsReload() list]
27.01.2020 02:35:51.106770 zmeventnotification[3397].INF [main:767] [PARENT: Secure WS is disabled...]
27.01.2020 02:35:51.117974 zmeventnotification[3397].INF [main:767] [PARENT: Web Socket Event Server listening on port 9001]
27.01.2020 02:35:56.137052 zmeventnotification[3397].INF [main:767] [PARENT: There are 0 active child forks...]
27.01.2020 02:35:56.153564 zmeventnotification[3397].INF [main:767] [PARENT: There are 0 new Events to process]
27.01.2020 02:36:01.138044 zmeventnotification[3397].INF [main:767] [PARENT: There are 0 active child forks...]
27.01.2020 02:36:01.152721 zmeventnotification[3397].INF [main:767] [PARENT: There are 0 new Events to process]
27.01.2020 02:36:06.138113 zmeventnotification[3397].INF [main:767] [PARENT: There are 0 active child forks...]
27.01.2020 02:36:06.153406 zmeventnotification[3397].INF [main:767] [PARENT: There are 0 new Events to process]
27.01.2020 02:36:11.136973 zmeventnotification[3397].INF [main:767] [PARENT: There are 0 active child forks...]
27.01.2020 02:36:11.150978 zmeventnotification[3397].INF [main:767] [PARENT: There are 0 new Events to process]
Googling for the errors showed people having them from DNS resolving, but cameras are or my local network and ZM server is on the same machine as ZMeventServer.
The server has two Gb LAN ports, one in network with cameras with fixed addy and other (on different network) connected to Gateway by DHCP
At the server firewall is inactive for now.
This happens regardless if server network is started disconnected from the Internet gateway, so there is no way its DNS from (Gateway) DHCP server does something horrible. If i manually set DNS server i get same result. I do find this NetworkManager full of suprises sometimes, but tested it there to be sure it sets things as it should.
Obviously I'm doing something wrong systematically, did someone else encountered similar problems with EventServer?