WebSocket Connection Error in EventsAndStateWebSocketApiPython Sample Project

Sample project: EventsAndStateWebSocketApiPython

I successfully ran the sample project, and the application correctly listed the events and states initially. However, after closing and restarting the application a few times, it eventually stopped working and displayed a WebSocket connection error.

Please help me resolve this issue. I have attached the screenshots, event server log, Milestone version, and Windows system version for reference.

Milestone XProtect Version: ( Trail Version)

{

“ProductVersion”: “23.3.58.1”,

“UnsecureManagementServer”: “http://desktop-58imlaa/”,

“SecureManagementServer”: “https://desktop-58imlaa/”,

“IdentityProvider”: “http://desktop-58imlaa/IDP”,

“ApiGateways”: [

"[http://desktop-58imlaa/API/](http://desktop-58imlaa/API/ "http://desktop-58imlaa/API/")"

]

}

Windows Version: Windows 11

Topic:

Link: https://doc.developer.milestonesys.com/mipvmsapi/api/events-ws/v1/

Note:

If try to restart the Milestone’s events server then the sample application started working fine. How to fix this problem programmatically without re-starting the events server.

Attachments

Version

Start of the application

Connection Error

Event Logs:

Hi Kannan,

You know, HTTP 500 means “Internal server error”. There could be many reasons for such kind of an error. What is seen in the EvS log screenshot is actually problematic communication of EvS with RS. And if restart of EvS fixes the problem, this could be some sort of EvS unknown issue. I would expect in that situation the whole EvS not working properly (aka you wouldn’t be able to connect to it with SC as well). If that is the case, this looks more like a question for the support forum. Guys there would guide you better how to track down the problem, collect needed logs etc and would file internal issue with all the needed information.

Thanks for your input! and I have posted a query in the support form.