Article - CS267044
WebSocket connection failure shows error "WebSocket closed unexpectedly, unregistering from Server Endpoint" and eventually causes outage of ThingWorx Platform
Modified: 23-Mar-2023
Applies To
- ThingWorx Platform 6.6 to 9.3
Description
- ThingWorx stopped working because of a server crash
- Composer was inaccessible
- When a network outage occurs between the .NET (dotnet) client implementation the ThingWorx Platform instance WebSockets do not seem to close correctly
- This leads to the Platform using additional resources and eventually running out of memory
- A restart of ThingWorx Platform is required
- WSCommunication Subsystem does not decrease the number of active WebSockets.when connectivity issue occurs
- On the ThingWorx application, Things went offline (not connected) until the WebSocket connection re-established successfully after few minutes once the network connection returned
- .NET client WebSockets are not closing correctly when a network outage occurs leading to ThingWorx Platform becoming inaccessible
- Errors from the .NET client log failure due to network error:
- **Unable to get event subscriptions. Error invoking Service for Entity. Gateway Timeout. (Code 1114)
- **Error invoking service on Platform. EntityName: *0117.01446 ServiceName: GetEventSubscriptions
- Errors from the <ThingworxStorage>\logs\ErrorLog.log file
- java.util.concurrent.ExecutionException: java.io.IOException: Key must be cancelled
- Server WebSocket closed unexpectedly, unregistering from Server Endpoint [ws session id: 6, endpoint id: 7, endpoint name: null] java.util.concurrent.ExecutionException: java.io.IOException: Channel is in closing state
- Errors from <ThingworxStorage>\logs\ApplicationLog.log:
- [Date Time] [L: WARN] [O: c.t.c.s.c.j.Jsr356ServerConnection] [I: ] [U: SuperUser] [S: ] [T: WsCommunication-4] Server WebSocket closed unexpectedly, unregistering from Server Endpoint [ws session id: 3, endpoint id: 4, endpoint name: null] java.util.concurrent.ExecutionException: java.io.IOException: Key must be cancelled
- [Date Time] [L: WARN] [O: c.t.c.s.c.j.Jsr356ServerConnection] [I: ] [U: ] [S: ] [T: WSExecutionProcessor-620] Server WebSocket closed unexpectedly, unregistering from Server Endpoint [ws session id: 4, endpoint id: 5, endpoint name: null] java.util.concurrent.ExecutionException: java.io.IOException: Key must be cancelled
- [Date Time] [L: WARN] [O: c.t.c.s.c.j.Jsr356ServerConnection] [I: ] [U: ] [S: ] [T: http-nio-8443-exec-73] Server WebSocket closed unexpectedly, unregistering from Server Endpoint [ws session id: 5, endpoint id: 6, endpoint name: null] java.util.concurrent.ExecutionException: java.io.IOException: Broken pipe
- [Date Time] [L: WARN] [O: c.t.c.s.c.j.Jsr356ServerConnection] [I: ] [U: SuperUser] [S: ] [T: 0216.02718_AddConnectionLog] Server WebSocket closed unexpectedly, unregistering from Server Endpoint [ws session id: 6, endpoint id: 7, endpoint name: null] java.util.concurrent.ExecutionException: java.io.IOException: Channel is in closing state.
- [Date Time] [L: WARN] [O: c.t.c.s.c.j.Jsr356ServerConnection] [I: ] [U: SuperUser] [S: ] [T: WsCommunication-7] Server WebSocket closed unexpectedly, unregistering from Server Endpoint [ws session id: 7, endpoint id: 8, endpoint name: null] java.util.concurrent.ExecutionException: java.io.IOException: Channel is in closing state
This is a printer-friendly version of Article 267044 and may be out of date. For the latest version click CS267044