"A connection to the ESP server "namespace" cannot be established" error occurs in SAS® Event Stream Processing Studio


When SAS Event Stream Processing (ESP) Studio starts, the sas-event-stream-processing-studio-app pod connects to the client-configuration server in the namespace. This connection is used to perform various tasks. If the sas-event-stream-processing-studio-app pod is unable to connect, some functions of the user interface (UI) are not available. As a result, the following pop-up error occurs:

A connection to the ESP server "esp-viya" canot be established. An ESP server must be available if you want to dynamically discover connectors.

Cause

When you start the SAS® Viya® environment, the sas-esp-operator pod creates the client-configuration server, which is called sas-esp-ccs. The sas-esp-operator pod then creates a sas-esp-ccs deployment, which creates a sas-esp-ccs pod. If the sas-esp-ccs pod is not running, this error occurs. 

Workaround

First, check the state of the sas-esp-ccs ESPServer custom resource (CR). Run the following command to list the state:

kubectl -n <NS> get espservers.iot.sas.com -o=custom-columns=NAME:metadata.name,STATE:.access.state sas-esp-ccs

Here is an example output:

NAME          STATE
sas-esp-ccs   Succeeded

If the state of the sas-esp-ccs ESPServer CR is in a failed state, delete the resource. The sas-esp-operator will recreate the sas-esp-ccs ESPServer CR:

kubectl -n <NS> delete espservers.iot.sas.com sas-esp-ccs

After about 30 seconds, check the state of the ESPServer CR again:

kubectl -n <NS> get espservers.iot.sas.com -o=custom-columns=NAME:metadata.name,STATE:.access.state sas-esp-ccs

If the state is Succeeded, then the sas-esp-ccs pod should be running. Check the running ESP pods by running the following command:

kubectl -n <NS> get pods -l type=esp

The sas-esp-ccs pod should be running.  Reload SAS Event Stream Processing Studio, which should no longer display the pop-up error.

If you the sas-esp-ccs pod is not running after you delete the resource, or if the pop-up error still occurs, contact Technical Support. Provide the sas-esp-operator pod and the sas-event-stream-processing-studio-app pod logs.