0

I am having problems deploying a Java .war application in Tomcat on Kubernetes.

I have a Docker image based on tomcat:8.5.40-jre8 containing two Tomcat .war webapps, One at ROOT and one with its own path. When I pull and run this Docker image locally on my Mac everything works just fine. However when I deploy the image to our Microsoft Azure Kubernetes Service the ROOT webapp only responds with a 404. If I connect a terminal to the running container I can see Tomcat has unpacked the .war file.

The issue started when I updated the Kubernetes version using the Azure portal, but when I created a second Azure Kubernetes Service with a lower version the issue still exists.

It does not seem to be a network issue. When i connect a terminal to the running image on Kubernetes and curl localhost i get a 404, but when i do the same on my local machine i get the page i expect.

The same Docker image has worked before and the cluster runs another almost identical service right now without any problems.

How is it possible that the Docker image works on my machine, but not when deployed to the AKS?

Any help would be greatly appreciated! Kind regards,

V

1
  • You will want to read the how to ask guide, then edit your post to include the troubleshooting steps you have taken that have not worked, along with any relevant log or state data that would enable someone who is not at your keyboard to help you work through the troubleshooting steps. Good luck Commented Aug 20, 2020 at 3:08

1 Answer 1

1

Turns out that the application had a ClassNotFoundException during startup. This made the application unable to start after the Kubernetes upgrade.

After fixing the error, found in the localhost log of tomcat, the application runs again.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.