Event Manager fails to start when configured with API Connect JWKS endpoint

Symptoms

When Event Endpoint Management is integrated with IBM API Connect and the API Connect JSON Web Key Set (JWKS) endpoint is set in the EventEndpointManagement custom resource, the Event Manager pod might fail to start, showing a CrashLoopBackoff state. Pod logs might contain error messages similar to the following:

io.vertx.core.impl.NoStackTraceTimeoutException: The timeout of 6000 ms has been exceeded when getting a connection to <apic_jwks_url>:443

Note: The timeout value 6000 is indicative and might be different depending on your configuration.

Causes

When the Event Manager pod is configured with an API Connect JWKS endpoint, the pod attempts to access this URL when it starts. However, this connection can fail with a timeout, resulting in the error. This error prevents the API Connect integration from initializing, and the pod from starting. Since the pod cannot start within the scheduled time limit, it fails and restarts, but fails again. This eventually results in the pod to go into a CrashLoopBackoff state.

Resolving the problem

To resolve the problem, increase the timeout limit for connecting to the API Connect JWKS endpoint by setting the EI_AUTH_WEB_CLIENT_TIMEOUT environment variable in the EventEndpointManagement custom resource:

spec:
    manager:
        template:
            pod:
                spec:
                    containers:
                      - name: manager
                        env:
                          - name: EI_AUTH_WEB_CLIENT_TIMEOUT
                            value: '30000'
                        

The value must be set in milliseconds. In the earlier example, the value is set to 30000 milliseconds (30 seconds).