Article - CS311627
ThingWorx Flow endpoint does not handle WebSocket communication in ThingWorx Platform
Modified: 09-Oct-2019
Applies To
- ThingWorx Platform 8.4 to 8.5
Description
- ThingWorx Flow endpoint does not handle WebSocket communication
- AlwaysOn / WebSocket client (edge SDK, Integration Runtime ...) fails to connect to the platform via the Flow endpoint
- HTTP code 404 is returned during protocol upgrade
- Failing to connect from KEPServerEX / ThingWorx Industrial Connectivity when NGINX is enabled
- Have NGINX enabled for ThingWorx Flow and can no longer connect via WebSockets
- WebSocket traffic is not being handed as it should be when NGINX is enabled
- Kepware is showing the following error in the Event Log when attempting to connect to NGINX ThingWorx enabled environment:
- Error ThingWorx Native Interface Connection to ThingWorx failed. | Platform = <ThingWorx Host>:443/Thingworx/WS, error = could not establish a websocket connection.
Debug ThingWorx Diagnostics [DEBUG] twMessage_Send: Not authenticated yet
Debug ThingWorx Diagnostics [ERROR] twMessage_Send: Error sending Message with RequestId 2
Debug ThingWorx Diagnostics [DEBUG] twMessage_Delete: Deleting BIND Message: 2
Debug ThingWorx Diagnostics [DEBUG] Disconnect called. Code: 1000, Reason:
Debug ThingWorx Diagnostics [WARN] sendCtlFrame: Not connected
Debug ThingWorx Diagnostics [DEBUG] twTlsClient_Close: Disconnecting from server
Debug ThingWorx Diagnostics [DEBUG] twTlsClient_Close: Deleting SSL session
Debug ThingWorx Diagnostics [WARN] msgHandlerOnClose: WEBSOCKET CLOSED
Debug ThingWorx Diagnostics [DEBUG] twTlsClient_Reconnect: Re-establishing SSL context
Debug ThingWorx Diagnostics [DEBUG] twTlsClient_Connect: Connecting to server
Debug ThingWorx Diagnostics [DEBUG] twTlsClient_Connect: TLS connection established
Debug ThingWorx Diagnostics [ERROR] twWs_Connect: Error initializing web socket. Response code: 404
Debug ThingWorx Diagnostics [ERROR] twApi_Connect: Max number of connect retries: 1, has been reached
Debug ThingWorx Diagnostics [DEBUG] twMessage_Send: Not authenticated yet
Debug ThingWorx Diagnostics [ERROR] twMessage_Send: Error sending Message with RequestId 3
Debug ThingWorx Diagnostics [DEBUG] twMessage_Delete: Deleting BIND Message: 3
Debug ThingWorx Diagnostics [DEBUG] Disconnect called. Code: 1000, Reason:
Debug ThingWorx Diagnostics [WARN] sendCtlFrame: Not connected
Debug ThingWorx Diagnostics [DEBUG] twTlsClient_Close: Disconnecting from server
Debug ThingWorx Diagnostics [DEBUG] twTlsClient_Close: Deleting SSL session
Debug ThingWorx Diagnostics [WARN] msgHandlerOnClose: WEBSOCKET CLOSED
- Error ThingWorx Native Interface Connection to ThingWorx failed. | Platform = <ThingWorx Host>:443/Thingworx/WS, error = could not establish a websocket connection.
This is a printer-friendly version of Article 311627 and may be out of date. For the latest version click CS311627