zmeventnotification websocket error 1006

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
Jamieeburgess
Posts: 24
Joined: Mon Jan 06, 2020 3:48 pm

zmeventnotification websocket error 1006

Post by Jamieeburgess »

Hi there,
I have successfully set up Zoneminder within my network and most things are working great.

However i'm having an issue with the websockets connection. I'm not able to connect from ZMNinja (or any other websocket app, Node-Red or chrome extension)

I'm using dlandon's docker v4.6 with default settings except for:
docker port is 8080:80 (as once this is working internally on my network I can use my synology reverse proxy to handle security not ZM)
docker port is 9003:9000 (as 9000 is in use) this is reflected in the zmeventnotification.ini with port 9003
portal=http://192.168.X.X:8080/zm
ZM_USER & ZM_PASS are configured
ServerName = 192.168.X.X
OPT_USE_API is enabled
As per ZMNinja requirement AUTH_HASH_LOGINS is also enabled.

I have tried with both
[ssl]
enable = yes (& enable = no)

However there is no difference when connecting (well except I would connect to wss://192.168.X.X:9003 and ws://192.168.X.X:9003
The error I get from a chrome websocket test client is:
The connection was terminated uncleanly with status code 1006 (ABNORMAL)

The error i get from ZMNinja logs is:
Failed to connect to WebSocket: code: 1006, reason: undefined, exception: The operation couldn't be completed. Connection refused.

Any thoughts folks?
ajscheid
Posts: 1
Joined: Sat Jan 18, 2020 6:25 pm

Re: zmeventnotification websocket error 1006

Post by ajscheid »

Hi,

could you sort out the problem?
Have the same issue, thanks.

Cheers,
Jamieeburgess
Posts: 24
Joined: Mon Jan 06, 2020 3:48 pm

Re: zmeventnotification websocket error 1006

Post by Jamieeburgess »

I did sort out the issue, but can't tell what it was though.

Firstly I used wss (secure sockets) WS just wouldn't work.
I use a Synology NAS with reverse proxy and a docker container (dlandon's 1.34). Despite the setting I never could validate 9003 port worked, so wasnt sure if it was coded somewhere else - meaning part of my resolution was moving to port 9000 as per default.

Self signed certs etc all worked. My password removed any complex characters incase that caused the issue also.
I'm not able to connect to the Websocket from Node-red yet though (not sure what i'm doing wrong).

However, with the above settings (including 443 forwarded on my router, and the reverse proxy set up with 2 routes (1 for ZM, and 1 for WSS). Also note you need to enable the websocket header info in the Synology UI for WSS to ensure it forwards correctly.

I now have ZM accessible externally, ZMNinja accessible externally and object vision correctly identifying people :)
Jamieeburgess
Posts: 24
Joined: Mon Jan 06, 2020 3:48 pm

Re: zmeventnotification websocket error 1006

Post by Jamieeburgess »

oh and be sure to use your IP address in the ServerName file. it will add localhost back in as well on another line
maymeyer
Posts: 1
Joined: Tue Feb 25, 2020 4:08 am

Re: zmeventnotification websocket error 1006

Post by maymeyer »

Thank you! It resolve my problem
happy wheels original Flash-game
Post Reply