Usage Note 61348: Creating a WebSocket connection to the ESP server fails with "The application could not create a WebSocket connection to the ESP server"
SAS® Event Stream Processing Studio can test models on an ESP server. The ESP server is defined with a host name and an HTTP port. SAS Event Stream Processing Studio might not be able to create a WebSocket connection to the ESP server if you use the localhost host name. In this scenario, the connection might fail with following error:

(The application could not create a WebSocket connection to the ESP server.)
The developer console might show an error message similar to the following:

(WebSocket connection to 'ws://localhost:32952/SASESP/subscribers/Project1/cq1/Source1?format=json&schema=true&pagesize=10000&interval=1250&counts=true' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED)
These errors occur because of the way that SAS Event Stream Processing Studio and WebSocket requests are sent. SAS Event Stream Processing Studio connects to the ESP server using HTTP requests sent to the SAS Event Stream Processing Studio HTTP port. WebSocket requests are sent to the ESP server host name and the HTTP port. The browser connected to SAS Event Stream Processing Studio must be able to connect to the ESP server using the specified host name and the HTTP port.
To circumvent this error, use the host name of the system that the ESP server is running on instead of localhost.
Operating System and Release Information
| SAS System | SAS Event Stream Processing Engine | Microsoft® Windows® for x64 | 5.1 | | | |
| Linux for x64 | 5.1 | | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
When you create a WebSocket connection to the ESP server using SAS® Event Stream Processing Studio model test, the connection fails with "The application could not create a WebSocket connection to the ESP server."
| Date Modified: | 2017-12-05 09:59:33 |
| Date Created: | 2017-11-03 11:21:56 |