Unable to resolve host Axon Server (Openshift)

Hi,

I have installed axoniq/axonserver:4.6.2 in openshift and it’s running ok. Moreover, I can access to server using http port, but I can not connect using the springboot application for grpc port.

We are using the same version, but in Axon Server docker and the connection to the springboot application is correct.

SERVICE PORT OPENSHIFT - AXON SERVER
The first test that was done is to install Axon Server without exposing the grcp port and from the same cluster the pod with the demo application can connect and cannot resolve the domain.

To show the service we use Routes (OpenShift’s own component), we have mapped the port and we cannot connect to Axon Server either.

Using the same image only docker, I have connect to springboot it ok.

Attached image with the error logs

Hey Lizeth,
I am afraid that, without more information, I cannot give a definite answer. Please allow me to elaborate:

OpenShift, which you might irreverently call Kubernetes-with-extras, deploys containers in Pods. These Pods tend to be a bit limited in their lifetime management, so normally you put a controller on top of it, from the simplest, a Deployment, to something as complex as a StatefulSet. Because Axon Server needs PersistentVolumes that are tightly locked to that particular Pod (so you don’t lose your Event Store’s files) and a clear and predictable network identity, we recommend you use a StatefulSet. This is all described in a series of Blog posts under the collective name “Running Axon Server” (Part 1, part 2, part 3, and part 4. Especially parts 2 and 4 are relevant here) with an associated set of example scripts and deployment descriptors on GitHub.

In the context of your example, this will mean that a StatefulSet named “axon-axon-server-se” (if that is what you used) would have a Pod named “axon-axon-server-se-0” for its first (and only) replica. If you used a Deployment or some other controller instead, it will suffix the name of the controller with a dash and some random letters or digits. This shows the predictability of the name for the StatefulSet by the way, but you still get something more than the simple name you started with.

You can further get a DNS name by creating a so-called headless Service which makes Kubernetes expose specific ports to other namespaces and Pods. However, these Services are dependent on the Pod’s health. If the Pod is not healthy, no DNS entry is created, and no data is passed on.

This is very different from Docker, where you can communicate freely between containers as long as they are on the same Docker network.

I must admit I have very little experience with OpenShift’s special components, such as Routes, but as far as I remember, they were meant for exposing services in OpenShift to applications outside. So, concluding, can you tell me a bit more about your application’s software architecture? How is it deployed? What Services do you have? Is Istio or some other service mesh in use, and did you annotate the Service with “appProtocol: grpc”?

Cheers,
Bert Laverman

Hi,

I installed Axon Server using HELM files which I got from the following repository → running-axon-server/3-k8s/5-helm-se/axon-server-se at master · AxonIQ/running-axon-server · GitHub

I have the following services:


And the Route in OpenShift was created as follows, this to expose the grpc service outside the cluster

we haven’t used Istio yet.

I’m sorry, but what do you mean by your question… did you annotate the Service with “appProtocol: grpc”?

Thank you.

Ok, if you based your deployment on that example, then you are using a StatefulSet, and the “Pods” tab should show which actual Pod is selected for this Service. Most likely it will be something line axon-axon-server-se-0. Can you show the status of that Pod and the logs of its container as text?

The “appProtocol” remark has to do with Istio, so it is not relevant to your situation.

Bert

PS the YAML text usually provides more detailed information than screenshots, but it may turn out to be a bit bulky.