No update of UI event list and no web notification (but mail is working)

MaHoMey2 years ago

Hi,

I am fighting to get the events like f.e. sos into the event list of the portal. I mean the list right from the map. In reports (below the map) I see the events and I also get the mail on my alarms.
But the web notification and the event lis ist not filling up.

In configuration I added <entry key='event.enable'>true</entry> and it seams not to work. Use the actual 4.15 version installed on Windows server.

Ronaldo2 years ago

In the notification settings (web interface), did you set the WEB channel?

MaHoMey2 years ago

Yes. I also tested it with „all units“ and also only chosen ones.
As written, the mail forward is working very well but the web channel is doing nothing.
I also tested it with different browsers (Chrome, Safari, Edge) and OS (Windows, macOS, iOS) and there was no difference.

Ronaldo2 years ago

after setting <entry key='event.enable'>true</entry> did you restart the traccar service?

MaHoMey2 years ago

Yes. I also did a complete new install on another Server instance.
Map update (follow the position) is also working well. So we get real-time Update of GUI but not the event list and notifications

Anton Tananaev2 years ago

Have you tested notifications? There's a button on the account dialog.

MaHoMey2 years ago

You mean the test button which looks like a letter right from „pick position“ button in the account configuration dialog?

Yes, I pushed it and got a test mail. Should I also get a web notification? If yes, I didn‘t.

Anton Tananaev2 years ago

Yes, you should get all notifications you have enabled in the config. If you didn't get a web notification, then there's probably some issue. Check browser developer tools to see if the WebSocket is connected.

Ronaldo2 years ago

in your first message, what do you mean by "f.e." ?

MaHoMey2 years ago

Indeed, I checked browser developer tools and found multiple error messages:
WebSocket connection to 'wss://.../api/socket' failed: There was a bad response from the server.

Does it help? The domain (replaced by …) in the error message is correct.

MaHoMey2 years ago

I found in the forum following discussion: https://www.traccar.org/forums/topic/tutorial-how-to-secure-traccar-with-ssl-https-for-free-using-iis-and-lets-encrypt-on-windows-server

I added also the recommended value HTTP_SEC_WEBSOCKET_EXTENSIONS and did everything what was mentioned there but had not helped.

I also tried the developer tools at Google Chrome and it gave me a little bit more information, see screenshot here: https://1drv.ms/u/s!AoaJLsvhIaufgoV6-efI7XM7IZvblA?e=Csb9ld

MaHoMey2 years ago

Does the WebSocket connect through port 80?
If yes, this one is not redirected by IIS Url-Rewrite and is blocked. Do I have to change this in IIS or can I change WebSocket connection in traccar to use port 443?

Anton Tananaev2 years ago

It uses the same port as the rest of the web app.