"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.  


OpenShift Note:

If you are running SAS Viya 2025.12 or earlier on Red Hat OpenShift, create and apply the following patch to your existing deployment configuration before proceeding with the remaining workaround steps.

Add the following patch transformer to your site-config directory, then add a reference to it in the transformers section of your kustomization.yaml. This patch transformer will add the custom-route permission to the sas-esp-operator role.


apiVersion: builtin
kind: PatchTransformer
metadata:
  name: patch-transformer-sas-esp-operator-role-custom-route
patch: |-
  - op: add
    path: /rules/-
    value:
      apiGroups: ["route.openshift.io"]
      resources: ["routes/custom-host"]
      verbs: ["create"]
target:
  kind: Role
  name: sas-esp-operator

After adding the patch:

1. Redeploy SAS Viya

2. Restart all SAS Event Stream Processing pods

3. Continue with the workaround steps above to delete sas-esp-ccs ESPServer custom resource (CR).

The sas-esp-operator should now have the required permissions to recreate the sas-esp-ccs resources successfully.