Expected 'PeerService' at /usr/local/share/perl/5.26.1/Net/MQTT/Simple.pm line 159.
Also what's interesting is it doesn't seem to respect the config file if I turn off MQTT in the config file. The only way I can get it to turn off is if I comment out the enable line and it takes the default of off... I've tried off, 0, false.
I would like to push the notifications out via MQTT but can't get past this. I know the MQTT server is working as I use it for several other projects ( eclipse-mosquitto:1.5.4) Here's what I've tried:
- Running from Master branch
- Running from Stable Branch
- DNS name for MQTT server(include port and don't include port)
- IP Address for MQTT Server (include port and don't include port)
- Reinstall MQTT Perl module
- downgrade MQTT Perl Module
- Reinstall socket module (seems like that's the interface it's unhappy with)
- Downgrade socket module
Here's the output:
Any insights on how to get MQTT working?root@ec86f8e977cd:/# sudo -u www-data zmeventnotification.pl
09/27/20 18:56:03.031970 zmeventnotification[8662].INF [main:888] [PARENT: using config file: /etc/zm/zmeventnotification.ini]
09/27/20 18:56:03.044115 zmeventnotification[8662].INF [main:888] [PARENT: using secrets file: /etc/zm/secrets.ini]
CONSOLE DBG-2:2020-09-27,18:56:03 PARENT: Got secret token !ZMES_PICTURE_URL
CONSOLE DBG-2:2020-09-27,18:56:03 PARENT: Got secret token !ZM_USER
CONSOLE DBG-2:2020-09-27,18:56:03 PARENT: Got secret token !ZM_PASSWORD
Configuration (read /etc/zm/zmeventnotification.ini):
Secrets file.......................... /etc/zm/secrets.ini
Base data path........................ /var/lib/zmeventnotification
Restart interval (secs)............... (undefined)
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 ........................... /var/lib/zmeventnotification/push/tokens.txt
Use MQTT ............................. yes
MQTT Server .......................... mqtt.workingdomain.com
MQTT Topic ........................... zoneminder
MQTT Username ........................ (undefined)
MQTT Password ........................ (undefined)
MQTT Retain .......................... no
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
ES Debug level.........................2
Read alarm cause ..................... yes
Tag alarm event id ................... yes
Use custom notification sound ........ no
Send event end notification............no
Use Hooks............................. yes
Hook Script on Event Start ........... '/var/lib/zmeventnotification/bin/zm_event_start.sh'
User Script on Event Start.............(undefined)
Hook Script on Event End.............. '/var/lib/zmeventnotification/bin/zm_event_end.sh'
User Script on Event End.............(undefined)
Hook Skipped monitors................. (undefined)
Notify on Event Start (hook success).. all
Notify on Event Start (hook fail)..... none
Notify on Event End (hook success).... web,api
Notify on Event End (hook fail)....... none
Notify End only if Start success...... yes
Use Hook Description.................. yes
Keep frame match type................. yes
Store Frame in ZM......................yes
Picture URL .......................... https://zm.workingdomain.com/zm/index.p ... &width=600
Include picture....................... yes
Picture username ..................... ha
Picture password ..................... (defined)
CONSOLE INF:2020-09-27,18:56:03 PARENT: Push enabled via FCM
09/27/20 18:56:03.219799 zmeventnotification[8662].INF [main:888] [PARENT: Push enabled via FCM]
CONSOLE INF:2020-09-27,18:56:03 PARENT: MQTT Enabled
09/27/20 18:56:03.226896 zmeventnotification[8662].INF [main:888] [PARENT: MQTT Enabled]
CONSOLE INF:2020-09-27,18:56:03 PARENT: |------- Starting ES version: 5.15.6-Docker ---------|
09/27/20 18:56:03.229885 zmeventnotification[8662].INF [main:888] [PARENT: |------- Starting ES version: 5.15.6-Docker ---------|]
CONSOLE DBG-1:2020-09-27,18:56:03 PARENT: Started with: perl:/usr/bin/perl and command:/usr/bin/zmeventnotification.pl
Can't ignore signal CHLD, forcing to default.
CONSOLE DBG-1:2020-09-27,18:56:03 PARENT: ES invoked manually. Will handle restarts ourselves
CONSOLE DBG-2:2020-09-27,18:56:03 PARENT: Parent<--Child pipe ready
CONSOLE INF:2020-09-27,18:56:03 PARENT: Event Notification daemon v 5.15.6-Docker starting
09/27/20 18:56:03.503817 zmeventnotification[8662].INF [main:888] [PARENT: Event Notification daemon v 5.15.6-Docker starting]
CONSOLE DBG-1:2020-09-27,18:56:03 PARENT: Initializing FCM tokens...
CONSOLE INF:2020-09-27,18:56:03 PARENT: Initializing MQTT connection...
09/27/20 18:56:03.508822 zmeventnotification[8662].INF [main:888] [PARENT: Initializing MQTT connection...]
CONSOLE DBG-1:2020-09-27,18:56:03 PARENT: Intialized MQTT without auth
CONSOLE DBG-1:2020-09-27,18:56:03 PARENT: Total event client connections: 1
CONSOLE DBG-1:2020-09-27,18:56:03 PARENT: -->checkNewEvents: Connection 1: ID-> IP->(none) Token->:... Plat: Push:
CONSOLE INF:2020-09-27,18:56:03 PARENT: Re-loading monitors
09/27/20 18:56:03.511480 zmeventnotification[8662].INF [main:888] [PARENT: Re-loading monitors]
CONSOLE DBG-1:2020-09-27,18:56:03 PARENT: Loading ManCave
CONSOLE DBG-1:2020-09-27,18:56:03 PARENT: ESCONTROL_INTERFACE is disabled. Not saving control data
CONSOLE DBG-2:2020-09-27,18:56:03 PARENT: checkEvents() new events found=0
CONSOLE DBG-2:2020-09-27,18:56:03 PARENT: About to start listening to socket
CONSOLE INF:2020-09-27,18:56:03 PARENT: Secure WS(WSS) is enabled...
09/27/20 18:56:03.523123 zmeventnotification[8662].INF [main:888] [PARENT: Secure WS(WSS) is enabled...]
CONSOLE INF:2020-09-27,18:56:03 PARENT: Web Socket Event Server listening on port 9000
09/27/20 18:56:03.525282 zmeventnotification[8662].INF [main:888] [PARENT: Web Socket Event Server listening on port 9000]
CONSOLE DBG-2:2020-09-27,18:56:08 PARENT: ---------->Tick START<--------------
CONSOLE DBG-2:2020-09-27,18:56:08 PARENT: There are 0 active child forks...
CONSOLE DBG-2:2020-09-27,18:56:08 PARENT: checkEvents() new events found=0
CONSOLE DBG-2:2020-09-27,18:56:08 PARENT: There are 0 new Events to process
CONSOLE DBG-2:2020-09-27,18:56:08 PARENT: ---------->Tick END<--------------
CONSOLE DBG-2:2020-09-27,18:56:13 PARENT: ---------->Tick START<--------------
CONSOLE DBG-2:2020-09-27,18:56:13 PARENT: There are 0 active child forks...
CONSOLE DBG-2:2020-09-27,18:56:13 PARENT: checkEvents() new events found=0
CONSOLE DBG-2:2020-09-27,18:56:13 PARENT: There are 0 new Events to process
CONSOLE DBG-2:2020-09-27,18:56:13 PARENT: ---------->Tick END<--------------
CONSOLE DBG-2:2020-09-27,18:56:18 PARENT: ---------->Tick START<--------------
CONSOLE DBG-2:2020-09-27,18:56:18 PARENT: MQTT tick interval (15 sec) elapsed.
Expected 'PeerService' at /usr/local/share/perl/5.26.1/Net/MQTT/Simple.pm line 159.