Search code examples
javaspring-bootazure-aksistio-gateway

Spring Boot 3.0 + AKS = always 200 with empty response


I'm asking for your help for a very strange situation I'm having, after upgrading a microservice to Spring Boot 3.0, from 2.7.x version.

The microservice is deployed on AKS cluster, and, when I invoke any endpoint exposed by the microservice from the context-root, with any cookie, i always obtain a http status code 200 - OK with empty response, instead of the response i expect; this also happens to me when i invoke endpoints not exposed by the microservice. If instead I invoke the same endpoints without cookies, everything works correctly.

However, when I test the microservice endpoints locally (start in local debug) with new Spring Boot version (3.0.0) or when I rollback the microservice to the previous Spring Boot version (2.7.x) and deploy it on AKS cluster, everything works fine, both with and without cookies.

So I don't understand if the "problem" is on Spring Boot framework update or AKS/istio (kube ingress).

Here are some examples for clarity:

curl --request GET --url http://localhost:8080/endpoint -H "cookie: key=test"
{"out": "value"}

curl --request GET --url http://localhost:8080/endpoint
{"out": "value"}

this is OK!

curl --request GET --url http://my.ingress.com/context-root/endpoint -H "cookie: key=test"
(200 with empty response)

curl --request GET --url http://my.ingress.com/context-root/endpoint
{"out": "value"}

this is strange!

You are my last hope! :D Many thanks in advance


Solution

  • We ran into the same issue last week, but with an ECS cluster. Do you happen to have a DataDog tracing agent being deployed alongside your service? Someone had a similar issue and their solution was to bump the agent version to 1.3.0. We bumped our agent to 1.4.0 and that fixed our issue.

    The root cause could probably be traced back to this change if I had to guess