Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/319.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Undertow-通过k8s服务调用microservice时检测到SSL读取循环_Java_Spring Boot_Kubernetes_Spring Webflux_Undertow - Fatal编程技术网

Java Undertow-通过k8s服务调用microservice时检测到SSL读取循环

Java Undertow-通过k8s服务调用microservice时检测到SSL读取循环,java,spring-boot,kubernetes,spring-webflux,undertow,Java,Spring Boot,Kubernetes,Spring Webflux,Undertow,我有一个反应式微服务应用程序(我们称之为microservice X),具有以下依赖项:Spring Boot v2.2.8.RELEASE、SpringWebFlux v5.2.7.RELEASE、Spring v5.2.7.RELEASE、Undertow core 2.0.30.Final,将其部署在k8s环境中。 在这个环境中,有另一个微服务(我们称之为微服务Y)向微服务X发送HTTP请求;电话是通过k8s服务拨打的。 当Y调用X时,会随机发生以下错误: 微服务日志Y: <micr

我有一个反应式微服务应用程序(我们称之为microservice X),具有以下依赖项:Spring Boot v2.2.8.RELEASE、SpringWebFlux v5.2.7.RELEASE、Spring v5.2.7.RELEASE、Undertow core 2.0.30.Final,将其部署在k8s环境中。 在这个环境中,有另一个微服务(我们称之为微服务Y)向微服务X发送HTTP请求;电话是通过k8s服务拨打的。 当Y调用X时,会随机发生以下错误:

微服务日志Y

<microservice-Y-name>,7,[https-jsse-nio-8080-exec-2],ERROR,....
org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://hostname.svc.k8s.xxx.com/<microservice-X-name>/api/tasks": Unexpected end of file from server; nested exception is java.net.SocketException: Unexpected end of file from server
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:748)
    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:651)
更改微服务Y配置,以便通过k8s入口而不是通过k8s服务调用微服务X,则不会发生错误。


知道为什么会发生这种情况吗?

k8日志在哪里?Ingress正在工作,因为它会重试失败的请求。当直接转到服务时,中间没有这种重试机制。请检查情况是否如此。如果是这样的话,最有可能的问题是您的应用程序。如果你确认的话,请告诉我。
SSL read loop detected. This should not happen, please report this to the Undertow developers. Current state SslConduit{state=20, outstandingTasks=0, wrappedData=null, dataToUnwrap=DefaultPooledBuffer{buffer=java.nio.DirectByteBuffer[pos=5461 lim=6026 cap=17408], referenceCount=1}, unwrappedData=null}
28-08-2020 07:43:24.514,microservice-X-name,7,[boundedElastic-3876],ERROR,c.w.o.o.w.d.HttpErrorHandler,,,,,,,,..... : {}
org.springframework.web.server.ServerWebInputException: 400 BAD_REQUEST "Request body is missing: ....
               at org.springframework.web.reactive.result.method.annotation.AbstractMessageReaderArgumentResolver.handleMissingBody(AbstractMessageReaderArgumentResolver.java:230)
               at org.springframework.web.reactive.result.method.annotation.AbstractMessageReaderArgumentResolver.lambda$readBody$5(AbstractMessageReaderArgumentResolver.java:194)
               at reactor.core.publisher.MonoErrorSupplied.subscribe(MonoErrorSupplied.java:70)