Symptoms
If Event Streams is installed on Red Hat OpenShift Container Platform, Kafka clients receive timeout errors when trying to connect to the instance by using the address provided in the Event Streams UI and CLI. The following is an example error message:
org.apache.kafka.common.errors.TimeoutException: Topic <topicName> not present in metadata after 60000 ms
Causes
Event Streams deploys OpenShift Container Platform routes. When the hostname of the OpenShift Container Platform cluster is too long, the generated route addresses are truncated. This causes incorrect routing of the connection within Event Streams.
The following table provides an example. The output of the oc get routes
command shows that the NAME
of the route is not the same as the prefix for the HOST/PORT
address.
NAME | HOST/PORT | PATH | SERVICES | PORT | TERMINATION | WILDCARD |
---|---|---|---|---|---|---|
<releaseName>-ibm-es-proxy-route-bootstrap | <releaseName>-ibm-es-proxy-svc | bootstrap | passthrough/None | None | ||
<releaseName>-ibm-es-proxy-route-broker-0 | <releaseName>-ibm-es-proxy-svc | brk0-external | passthrough/None | None | ||
<releaseName>-ibm-es-proxy-route-broker-1 | <releaseName>-ibm-es-proxy-svc | brk1-external | passthrough/None | None | ||
<releaseName>-ibm-es-proxy-route-broker-2 | <releaseName>-ibm-es-proxy-svc | brk2-external | passthrough/None | None |
Resolving the problem
The issue is resolved in Event Streams 10.0 and later versions.
The workaround for 2019.4 versions is as follows:
-
Edit the ConfigMap
<releaseName>-ibm-es-proxy-cm
, for example:oc edit cm <releaseName>-ibm-es-proxy-cm -n <namespace>
- Change
bootstrapRoutePrefix
from<releaseName>-ibm-es-proxy-route-bootstrap
to<truncatedAddress>-ibm-es-proxy-route-bootstrap
-
Change
brokerRoutePrefix
from<releaseName>-ibm-es-proxy-route-broker-
to<truncatedAddress>-ibm-es-proxy-route-broker-
Important: The trailing hyphen at the end is required.
- Remove the
externalListeners
entry from the map. - Increase the
revision
value by1
. - Save the changes to the ConfigMap.