You're unable to connect an application to a SAP HANA Database instance.
The Istio module's default configuration does not restrict outbound traffic. This means that the application should have no issues connecting to the SAP HANA Database instance. To determine the cause of the connection issue, follow the troubleshooting steps.
- Download SAP HANA Client for your operating system from the SAP Development Tools.
- Unpack the downloaded archive.
- Install SAP HANA Client.
- Connect to SAP HANA Database instance using the following command:
For example:
hdbsql -n {HANA_DB_INSTANCE_ADDRESS} -u {HANA_DB_USER} -p {HANA_DB_PASSWORD}
hdbsql -n aaa.bbb.ccc.ddd:30015 -u my_user -p mypassword
- If the connection is successful and you can execute queries, the issue is not related to the SAP HANA Database instance.
- Build a Docker image with the SAP HANA Client installed. You can use the following Dockerfile:
Download the SAP HANA Client for Linux x86 64-bit from SAP Development Tools and save it as
FROM eclipse-temurin:17 WORKDIR /build COPY client.tar client.tar RUN tar -xvf client.tar RUN echo "/usr/local/bin" | ./client/hdbinst ENTRYPOINT ["sleep", "8000"]
client.tar
in the same directory as the Dockerfile. Then, run the following command to build the image:docker buildx build --platform=linux/amd64 -t hdbsql .
- To test your image, run the following command:
You get an output similar to this example:
docker run --entrypoint "hdbsql" hdbsql -v
HDBSQL version 2.20.20.1712178305, the SAP HANA Database interactive terminal. Copyright 2000-2024 by SAP SE.
- Publish the image to a container registry.
- Run the image in the Kubernetes cluster:
kubectl create deployment hdbsql --image={PUBLISHED_IMAGE_NAME}
- Attach to the Pod and try to connect to the SAP HANA Database instance using the following command:
hdbsql -n {HANA_DB_INSTANCE_ADDRESS} -u {HANA_DB_USER} -p {HANA_DB_PASSWORD}
- If the connection is successful and you can execute queries, the issue is not related to the setup of the cluster.
- Check the connection from a Pod that has the Istio sidecar injected. In that case, create the Deployment in a namespace with Istio sidecar injection enabled. The connection should be successful.