简体   繁体   English

Spring Boot 3.0 + AKS = 始终为 200,响应为空

[英]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.在将微服务从 2.7.x 版本升级到 Spring Boot 3.0 后,我遇到了一个非常奇怪的情况,请求您的帮助。

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;微服务部署在 AKS 集群上,当我使用任何 cookie从上下文根调用微服务公开的任何端点时,我总是获得 http 状态代码 200 - OK,响应为空,而不是我期望的响应; 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.相反,如果我在没有 cookies的情况下调用相同的端点,则一切正常。

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.但是,当我使用新的 Spring 引导版本 (3.0.0) 在本地测试微服务端点(在本地调试中启动)时,或者当我将微服务回滚到之前的 Spring 引导版本 (2.7.x) 并将其部署在 AKS 集群上时,一切工作正常,无论有没有 cookies。

So I don't understand if the "problem" is on Spring Boot framework update or AKS/istio (kube ingress).所以我不明白“问题”是在 Spring 启动框架更新还是 AKS/istio(kube 入口)上。

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你是我最后的希望::D 非常感谢

We ran into the same issue last week, but with an ECS cluster.上周我们遇到了同样的问题,但使用的是 ECS 集群。 Do you happen to have a DataDog tracing agent being deployed alongside your service?您是否碰巧在您的服务中部署了DataDog 跟踪代理 Someone had a similar issue and their solution was to bump the agent version to 1.3.0 .有人遇到了类似的问题,他们的解决方案是将代理版本升级到 1.3.0 We bumped our agent to 1.4.0 and that fixed our issue.我们将代理升级到 1.4.0 并解决了我们的问题。

The root cause could probably be traced back to this change if I had to guess如果我不得不猜测,根本原因可能会追溯到这个变化

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM