dlandon / zoneminder.machine.learning

Zoneminder Docker
GNU General Public License v2.0
320 stars 143 forks source link

zmeventnotification crashing on zmNinja connect #83

Closed sgofferj closed 4 years ago

sgofferj commented 4 years ago

Image: dlandon/zoneminder:latest as of today sha256:a504498693e5b8f713c0190c43ec02711e5a703c286e3d72606c359808b28085

What happens: I noticed zmeventnotification crashing and restarting when zmNinja connects. I consoled into the image and started zmeventnotification by hand to monitor. zmeventnotification crashes on connect with the following output:

CONSOLE DEBUG:2020-04-03,15:07:42 PARENT: ---------->onConnect START<--------------
CONSOLE INFO:2020-04-03,15:07:42 PARENT: got a websocket connection from 192.168.10.1 (2) active connections
04/03/20 15:07:42.357430 zmeventnotification[4334].INF [main:865] [PARENT: got a websocket connection from 192.168.10.1 (2) active connections]
CONSOLE DEBUG:2020-04-03,15:07:42 PARENT: ---------->onConnect STOP<--------------
CONSOLE DEBUG:2020-04-03,15:07:42 PARENT: ---------->onConnect:handshake START<--------------
CONSOLE INFO:2020-04-03,15:07:42 PARENT: Websockets: New Connection Handshake requested from 192.168.10.1:37890 state=pending auth, id=1585915662.35822
04/03/20 15:07:42.358340 zmeventnotification[4334].INF [main:865] [PARENT: Websockets: New Connection Handshake requested from 192.168.10.1:37890 state=pending auth, id=1585915662.35822]
CONSOLE DEBUG:2020-04-03,15:07:42 PARENT: ---------->onConnect:handshake END<--------------
CONSOLE DEBUG:2020-04-03,15:07:42 PARENT: ---------->onConnect msg START<--------------
CONSOLE DEBUG:2020-04-03,15:07:42 PARENT: Raw incoming message: {"event":"auth","data":{"user":"sgofferj","password":***,"monlist":"2,4","intlist":"0,0"}}
bad bcrypt settings at /usr/bin/zmeventnotification.pl line 1473.

Config:

root@6a20a841b094:/# sudo /usr/bin/zmeventnotification.pl --check-config
04/03/20 15:09:15.120620 zmeventnotification[4445].INF [main:865] [PARENT: using config file: /etc/zm/zmeventnotification.ini]
04/03/20 15:09:15.188571 zmeventnotification[4445].INF [main:865] [PARENT: ESCONTROL_INTERFACE is disabled. Not loading control data]
04/03/20 15:09:15.236203 zmeventnotification[4445].INF [main:865] [PARENT: ES will be restarted at 7200 seconds]

Configuration (read /etc/zm/zmeventnotification.ini):

Secrets file.......................... (undefined)
Base data path........................ /var/lib/zmeventnotification
Restart interval (secs)............... 7200

Use admin interface .................. no
Admin interface password.............. (undefined)
Admin interface persistence file ..... /var/lib/zmeventnotification/misc/escontrol_interface.dat

Port ................................. 9000
Event check interval ................. 5
Monitor reload interval .............. 300
Skipped monitors...................... (undefined)

Auth enabled ......................... yes
Auth timeout ......................... 20

Use API Push.......................... no
API Push Script....................... (undefined)

Use FCM .............................. yes
FCM Date Format....................... %I:%M %p, %d-%b
FCM API key .......................... (defined)
Token file ........................... /config/push/tokens.txt

Use MQTT ............................. yes
MQTT Server .......................... 192.168.10.201
MQTT Username ........................ machineuser
MQTT Password ........................ (defined)
MQTT Tick Interval ................... 15

SSL enabled .......................... yes
SSL cert file ........................ /etc/apache2/ssl/zoneminder.crt
SSL key file ......................... /etc/apache2/ssl/zoneminder.key

Verbose .............................. yes
Read alarm cause ..................... no
Tag alarm event id ................... no
Use custom notification sound ........ no
Send event end notification............no

Use Hooks............................. no
Hook Script on Event Start ........... (undefined)
Hook Script on Event End.............. (undefined)
Hook Skipped monitors................. (undefined)

Notify on Event Start (hook success).. none
Notify on Event Start (hook fail)..... none
Notify on Event End (hook success).... none
Notify on Event End (hook fail)....... none
Notify End only if Start success...... yes

Use Hook Description.................. no
Keep frame match type................. yes
Store Frame in ZM......................no

Picture URL .......................... https://cctv.gofferje.net/zm/index.php?view=image&eid=EVENTID&fid=alarm&width=600&username=xxxxx&password=xxxxx
Include picture....................... yes
Picture username ..................... (undefined)
Picture password ..................... (undefined)
sgofferj commented 4 years ago

Also reported to https://github.com/pliablepixels/zmeventnotification/issues/241

sgofferj commented 4 years ago

User passwords needed to be migrated to bcrypt. Problem fixed.