zmeventserver - failed to listen error

Forum for questions and support relating to the 1.30.x releases only.
Locked
sup08
Posts: 4
Joined: Tue May 23, 2017 11:26 pm

zmeventserver - failed to listen error

Post by sup08 »

Hi,

Installed the zmeventserver following the instructions on https://github.com/pliablepixels/zmeventserver. All went ok with the installation but I'm unable to start the script. It's loading and then stops and shows:

Code: Select all

root@xxxxxxx:~# sudo /usr/bin/zmeventnotification.pl
failed to listen:  at /usr/bin/zmeventnotification.pl line 1191.
here is the grep:

Code: Select all

May 23 17:36:45 xxxxxxx zmeventnotification[5728]: INF [Push enabled via PushProxy]
May 23 17:36:45 xxxxxxx zmeventnotification[5728]: INF [direct APNS disabled]
May 23 17:36:45 xxxxxxx zmeventnotification[5728]: INF [Event Notification daemon v 0.93 starting]
May 23 17:36:45 xxxxxxx zmeventnotification[5728]: INF [Total event client connections: 0]
May 23 17:36:45 xxxxxxx zmeventnotification[5728]: INF [Reloading Monitors...]
May 23 17:36:45 xxxxxxx zmeventnotification[5728]: INF [Loading monitors]
May 23 17:36:45 xxxxxxx zmeventnotification[5728]: INF [Checking https://185.124.74.36:8801 reachability...]
May 23 17:36:46 xxxxxxx zmeventnotification[5728]: INF [PushProxy https://185.124.74.36:8801 is reachable.]
May 23 17:36:46 xxxxxxx zmeventnotification[5728]: INF [About to start listening to socket]
So it basically stops at "[About to start listening to socket]" and then returns failed to listen: at /usr/bin/zmeventnotification.pl line 1191

I'm running Ubuntu 16.04 LTS, fresh install with only ZoneMinder and nothing else.

What could be the reason?

Any help would be appreciated.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmeventserver - failed to listen error

Post by asker »

a) Check if you have another process running on that same port (maybe another instance of zmeventserver?)
b) Try a different port (change the port number - see the README)
c) Run it in manual mode, not daemon mode and see if it works (see README)
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
sup08
Posts: 4
Joined: Tue May 23, 2017 11:26 pm

Re: zmeventserver - failed to listen error

Post by sup08 »

Thanks for replying!

It's a clean install of Ubuntu with only ZM running, nothing else installed. To 1. Nope cause it never run at all (started manually no daemon) 2. Will try that today 3. Same as 1. I followed the instruction manual which advises to run first manually to test if everything is alright and that when I face the problem I described earlier. :-(

So will try another port. How can I troubleshoot the WSS? Syslog just gave me what I posted earlier, no indication on why it failed.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmeventserver - failed to listen error

Post by asker »

Oh yes, WSS. Try disabling WSS (set https://github.com/pliablepixels/zmeven ... ion.pl#L62 to 0) and see if it works. If it does, it might be a cert issue.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
sup08
Posts: 4
Joined: Tue May 23, 2017 11:26 pm

Re: zmeventserver - failed to listen error

Post by sup08 »

Ok great, at least I can start the event server now. I assume something is wrong with the cert. Now I triggered an alarm but I don't get push notification on my phone (iOS). Is there a way to manually send a push to test functionality?
sup08
Posts: 4
Joined: Tue May 23, 2017 11:26 pm

Re: zmeventserver - failed to listen error

Post by sup08 »

Ok, so after a bit more testing. If I switch off the secure option it works, the server starts (even though I don't get push notifications to the phone but thats another issue, zm logs show that one client is connected to the websocket server).

But with secure option it still doesnt work. The certs are there and in the correct folder. Not sure what else could it be.

Code: Select all

root@ubuntu:~# zmeventnotification.pl 
failed to listen:  at /usr/bin/zmeventnotification.pl line 1191.

Code: Select all

2017-05-30 22:41:33.977980	zmeventnotification		3132	INF	About to start listening to socket	zmeventnotification.pl	
2017-05-30 22:41:33.971890	zmeventnotification		3132	INF	PushProxy https://185.124.74.36:8801 is reachable.	zmeventnotification.pl	
2017-05-30 22:41:32.750740	zmeventnotification		3132	INF	Checking https://185.124.74.36:8801 reachability...	zmeventnotification.pl	
2017-05-30 22:41:32.746240	zmeventnotification		3132	INF	Loading monitors	zmeventnotification.pl	
2017-05-30 22:41:32.741490	zmeventnotification		3132	INF	Reloading Monitors...	zmeventnotification.pl	
2017-05-30 22:41:32.738000	zmeventnotification		3132	INF	Total event client connections: 1	zmeventnotification.pl	
2017-05-30 22:41:32.734240	zmeventnotification		3132	INF	Event Notification daemon v 0.93 starting	zmeventnotification.pl	
2017-05-30 22:41:32.730250	zmeventnotification		3132	INF	direct APNS disabled	zmeventnotification.pl	
2017-05-30 22:41:32.725030	zmeventnotification		3132	INF	Push enabled via PushProxy	zmeventnotification.pl
But then the server stops

Any help? :-)
Locked