The GraalVM test application for discovery-client Eureka fails in JIT mode (and also as native image).
The error doesn't happens all the time and I've only been able to reproduce it using JDK 11. Sometimes I start the application, send the curl request and it fails. Other times I start the application, wait a few seconds and then send the curl request.
Another thing I do to reproduce the error is deleting all local 3.0.0-SNAPSHOT artifacts (for both core and discovery-client) and then run the application.
docker run -it --rm -p 8761:8761 registry.gitlab.com/micronaut-projects/micronaut-graal-tests/eureka-server
Use Java 11
./gradlew run
curl localhost:8080/api/hello/Micronaut
Expected Behaviour
The application should return Hello Micronaut
Actual Behaviour
__ __ _ _
| \/ (_) ___ _ __ ___ _ __ __ _ _ _| |_
| |\/| | |/ __| '__/ _ \| '_ \ / _` | | | | __|
| | | | | (__| | | (_) | | | | (_| | |_| | |_
|_| |_|_|\___|_| \___/|_| |_|\__,_|\__,_|\__|
Micronaut (v3.0.0-SNAPSHOT)
10:02:31.932 [main] INFO io.micronaut.runtime.Micronaut - Startup completed in 941ms. Server Running: http://localhost:8080
10:02:32.013 [default-nioEventLoopGroup-1-2] DEBUG i.m.h.client.netty.DefaultHttpClient - Sending HTTP POST to http://localhost:8761/eureka/apps/service-discovery-eureka
10:02:32.015 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Content-Type: application/json
10:02:32.015 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Accept: application/json
10:02:32.015 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - host: localhost:8761
10:02:32.015 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - connection: close
10:02:32.015 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - content-length: 762
10:02:32.015 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Request Body
10:02:32.015 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
10:02:32.015 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - {"instance":{"instanceId":"service-discovery-eureka:8080","app":"service-discovery-eureka","ipAddr":"127.0.0.1","port":{"@enabled":true,"$":8080},"securePort":{"@enabled":false,"$":0},"homePageUrl":"http://localhost:8080","statusPageUrl":"http://localhost:8080/health","healthCheckUrl":"http://localhost:8080/health","secureHealthCheckUrl":"https://localhost/health","vipAddress":"service-discovery-eureka","secureVipAddress":"service-discovery-eureka","countryId":1,"dataCenterInfo":{"@class":"com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo","name":"MyOwn"},"hostName":"localhost","status":"UP","leaseInfo":{"renewalIntervalInSecs":30,"durationInSecs":90,"registrationTimestamp":0,"lastRenewalTimestamp":0,"evictionTimestamp":0,"serviceUpTimestamp":0}}}
10:02:32.015 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
10:02:32.032 [default-nioEventLoopGroup-1-2] DEBUG i.m.h.client.netty.DefaultHttpClient - Received response 204 from http://localhost:8761/eureka/apps/service-discovery-eureka
10:02:32.032 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Content-Type: application/json
10:02:32.032 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Date: Mon, 26 Jul 2021 08:02:32 GMT
10:02:32.032 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Connection: close
10:02:32.032 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - Response Body
10:02:32.032 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
10:02:32.032 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient -
10:02:32.032 [default-nioEventLoopGroup-1-2] TRACE i.m.h.client.netty.DefaultHttpClient - ----
10:02:32.034 [default-nioEventLoopGroup-1-2] INFO i.m.d.registration.AutoRegistration - Registered service [service-discovery-eureka] with Eureka
10:02:35.038 [default-nioEventLoopGroup-1-4] DEBUG i.m.h.client.netty.DefaultHttpClient - Sending HTTP GET to http://localhost:8761/eureka/apps/service-discovery-eureka
10:02:35.038 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - Accept: application/json
10:02:35.038 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - host: localhost:8761
10:02:35.038 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - connection: close
10:02:35.045 [default-nioEventLoopGroup-1-4] DEBUG i.m.h.client.netty.DefaultHttpClient - Received response 404 from http://localhost:8761/eureka/apps/service-discovery-eureka
10:02:35.046 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - Content-Type: application/json
10:02:35.046 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - Date: Mon, 26 Jul 2021 08:02:35 GMT
10:02:35.046 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - Connection: close
10:02:35.046 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - content-length: 0
10:02:35.046 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - Response Body
10:02:35.046 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - ----
10:02:35.046 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient -
10:02:35.046 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - ----
10:02:35.047 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - Full HTTP response received an empty body
10:02:35.047 [default-nioEventLoopGroup-1-4] TRACE i.m.h.client.netty.DefaultHttpClient - Unable to convert response body to target type class io.micronaut.http.hateoas.JsonError
10:02:35.049 [default-nioEventLoopGroup-1-3] ERROR i.m.r.intercept.RecoveryInterceptor - Type [example.micronaut.HelloClient$Intercepted] attempting to resolve fallback for unavailable service [service-discovery-eureka]
10:02:35.056 [default-nioEventLoopGroup-1-3] ERROR i.m.h.s.netty.RoutingInBoundHandler - Unexpected error occurred: No available services for ID: service-discovery-eureka
io.micronaut.discovery.exceptions.NoAvailableServiceException: No available services for ID: service-discovery-eureka
at io.micronaut.http.client.loadbalance.AbstractRoundRobinLoadBalancer.getNextAvailable(AbstractRoundRobinLoadBalancer.java:50)
at io.micronaut.core.async.publisher.Publishers$1.doOnNext(Publishers.java:214)
at io.micronaut.core.async.subscriber.CompletionAwareSubscriber.onNext(CompletionAwareSubscriber.java:52)
at reactor.core.publisher.StrictSubscriber.onNext(StrictSubscriber.java:89)
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
at reactor.core.publisher.MonoReduceSeed$ReduceSeedSubscriber.onComplete(MonoReduceSeed.java:165)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:2058)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:2058)
at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2400)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2194)
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onSubscribe(FluxOnErrorResume.java:74)
at reactor.core.publisher.FluxJust.subscribe(FluxJust.java:68)
at reactor.core.publisher.Flux.subscribe(Flux.java:8402)
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:103)
at reactor.core.publisher.FluxMap$MapSubscriber.onError(FluxMap.java:132)
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:106)
at reactor.core.publisher.Operators.error(Operators.java:198)
at reactor.core.publisher.FluxError.subscribe(FluxError.java:43)
at reactor.core.publisher.Flux.subscribe(Flux.java:8402)
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:103)
at io.micronaut.core.async.publisher.Publishers$1.doOnError(Publishers.java:225)
at io.micronaut.core.async.subscriber.CompletionAwareSubscriber.onError(CompletionAwareSubscriber.java:63)
at reactor.core.publisher.StrictSubscriber.onError(StrictSubscriber.java:106)
at reactor.core.publisher.FluxSwitchMap$SwitchMapMain.checkTerminated(FluxSwitchMap.java:391)
at reactor.core.publisher.FluxSwitchMap$SwitchMapMain.drain(FluxSwitchMap.java:338)
at reactor.core.publisher.FluxSwitchMap$SwitchMapMain.innerError(FluxSwitchMap.java:424)
at reactor.core.publisher.FluxSwitchMap$SwitchMapInner.onError(FluxSwitchMap.java:517)
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:106)
at reactor.core.publisher.Operators.error(Operators.java:198)
at reactor.core.publisher.FluxError.subscribe(FluxError.java:43)
at reactor.core.publisher.Flux.subscribe(Flux.java:8402)
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:103)
at reactor.core.publisher.SerializedSubscriber.onError(SerializedSubscriber.java:124)
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.onError(FluxTimeout.java:219)
at io.micronaut.http.client.filters.ClientServerRequestTracingPublisher$1.lambda$onError$2(ClientServerRequestTracingPublisher.java:65)
at io.micronaut.http.context.ServerRequestContext.with(ServerRequestContext.java:68)
at io.micronaut.http.client.filters.ClientServerRequestTracingPublisher$1.onError(ClientServerRequestTracingPublisher.java:65)
at reactor.core.publisher.StrictSubscriber.onError(StrictSubscriber.java:106)
at reactor.core.publisher.FluxCreate$BaseSink.error(FluxCreate.java:453)
at reactor.core.publisher.FluxCreate$SerializedFluxSink.drainLoop(FluxCreate.java:230)
at reactor.core.publisher.FluxCreate$SerializedFluxSink.drain(FluxCreate.java:206)
at reactor.core.publisher.FluxCreate$SerializedFluxSink.error(FluxCreate.java:182)
at io.micronaut.http.client.netty.DefaultHttpClient$11.channelReadInstrumented(DefaultHttpClient.java:2192)
at io.micronaut.http.client.netty.DefaultHttpClient$11.channelReadInstrumented(DefaultHttpClient.java:2098)
at io.micronaut.http.client.netty.DefaultHttpClient$SimpleChannelInboundHandlerInstrumented.channelRead0(DefaultHttpClient.java:2826)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.micronaut.http.netty.stream.HttpStreamsHandler.channelRead(HttpStreamsHandler.java:205)
at io.micronaut.http.netty.stream.HttpStreamsClientHandler.channelRead(HttpStreamsClientHandler.java:189)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
Suppressed: java.lang.Exception: #block terminated with an error
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:99)
at reactor.core.publisher.Flux.blockFirst(Flux.java:2599)
at io.micronaut.http.client.netty.DefaultHttpClient$3.exchange(DefaultHttpClient.java:582)
at io.micronaut.http.client.BlockingHttpClient.retrieve(BlockingHttpClient.java:140)
at io.micronaut.http.client.interceptor.HttpClientIntroductionAdvice.lambda$intercept$5(HttpClientIntroductionAdvice.java:401)
at io.micronaut.http.client.interceptor.HttpClientIntroductionAdvice.handleBlockingCall(HttpClientIntroductionAdvice.java:501)
at io.micronaut.http.client.interceptor.HttpClientIntroductionAdvice.intercept(HttpClientIntroductionAdvice.java:400)
at io.micronaut.aop.chain.MethodInterceptorChain.proceed(MethodInterceptorChain.java:137)
at io.micronaut.retry.intercept.RecoveryInterceptor.intercept(RecoveryInterceptor.java:92)
at io.micronaut.aop.chain.MethodInterceptorChain.proceed(MethodInterceptorChain.java:137)
at example.micronaut.HelloClient$Intercepted.sayHi(Unknown Source)
at example.micronaut.GatewayController.sayHi(GatewayController.java:17)
at example.micronaut.$GatewayController$Definition$Exec.dispatch(Unknown Source)
at io.micronaut.context.AbstractExecutableMethodsDefinition$DispatchedExecutableMethod.invoke(AbstractExecutableMethodsDefinition.java:338)
at io.micronaut.context.DefaultBeanContext$4.invoke(DefaultBeanContext.java:502)
at io.micronaut.web.router.AbstractRouteMatch.execute(AbstractRouteMatch.java:303)
at io.micronaut.web.router.RouteMatch.execute(RouteMatch.java:121)
at io.micronaut.http.server.netty.RoutingInBoundHandler.emitRouteResponse(RoutingInBoundHandler.java:1359)
at io.micronaut.http.server.netty.RoutingInBoundHandler.lambda$createExecuteRoutePublisher$19(RoutingInBoundHandler.java:1330)
at reactor.core.publisher.FluxCreate.subscribe(FluxCreate.java:94)
at reactor.core.publisher.Flux.subscribe(Flux.java:8402)
at io.micronaut.http.server.netty.RoutingInBoundHandler.handleRouteMatch(RoutingInBoundHandler.java:768)
at io.micronaut.http.server.netty.RoutingInBoundHandler.channelRead0(RoutingInBoundHandler.java:614)
at io.micronaut.http.server.netty.RoutingInBoundHandler.channelRead0(RoutingInBoundHandler.java:168)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.micronaut.http.netty.stream.HttpStreamsHandler.channelRead(HttpStreamsHandler.java:211)
at io.micronaut.http.netty.stream.HttpStreamsServerHandler.channelRead(HttpStreamsServerHandler.java:123)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
at io.netty.handler.codec.http.HttpServerKeepAliveHandler.channelRead(HttpServerKeepAliveHandler.java:64)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.flow.FlowControlHandler.dequeue(FlowControlHandler.java:200)
at io.netty.handler.flow.FlowControlHandler.channelRead(FlowControlHandler.java:162)
... 27 common frames omitted
10:02:36.607 [default-nioEventLoopGroup-1-5] DEBUG i.m.h.client.netty.DefaultHttpClient - Sending HTTP PUT to http://localhost:8761/eureka/apps/service-discovery-eureka/service-discovery-eureka%3A8080
10:02:36.607 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient - Accept: application/json
10:02:36.607 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient - host: localhost:8761
10:02:36.607 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient - connection: close
10:02:36.607 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient - content-length: 0
10:02:36.614 [default-nioEventLoopGroup-1-6] DEBUG i.m.h.client.netty.DefaultHttpClient - Sending HTTP PUT to http://localhost:8761/eureka/apps/service-discovery-eureka/service-discovery-eureka%3A8080/status?value=UP
10:02:36.614 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient - Accept: application/json
10:02:36.614 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient - host: localhost:8761
10:02:36.614 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient - connection: close
10:02:36.615 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient - content-length: 0
10:02:36.616 [default-nioEventLoopGroup-1-5] DEBUG i.m.h.client.netty.DefaultHttpClient - Received response 200 from http://localhost:8761/eureka/apps/service-discovery-eureka/service-discovery-eureka%3A8080
10:02:36.617 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient - Content-Type: application/json
10:02:36.617 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient - Date: Mon, 26 Jul 2021 08:02:36 GMT
10:02:36.617 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient - Connection: close
10:02:36.617 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient - content-length: 0
10:02:36.617 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient - Response Body
10:02:36.617 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient - ----
10:02:36.617 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient -
10:02:36.617 [default-nioEventLoopGroup-1-5] TRACE i.m.h.client.netty.DefaultHttpClient - ----
10:02:36.622 [default-nioEventLoopGroup-1-6] DEBUG i.m.h.client.netty.DefaultHttpClient - Received response 200 from http://localhost:8761/eureka/apps/service-discovery-eureka/service-discovery-eureka%3A8080/status?value=UP
10:02:36.623 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient - Content-Type: application/json
10:02:36.623 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient - Date: Mon, 26 Jul 2021 08:02:36 GMT
10:02:36.623 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient - Connection: close
10:02:36.623 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient - content-length: 0
10:02:36.623 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient - Response Body
10:02:36.623 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient - ----
10:02:36.623 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient -
10:02:36.623 [default-nioEventLoopGroup-1-6] TRACE i.m.h.client.netty.DefaultHttpClient - ----
Yes, this still happens. I've tried with latest 3.1.0-SNAPSHOT and sometimes it works in the JVM but with GraalVM (21.2.0) I reproduce the issue all the time.
The GraalVM test application for discovery-client Eureka fails in JIT mode (and also as native image).
The error doesn't happens all the time and I've only been able to reproduce it using JDK 11. Sometimes I start the application, send the curl request and it fails. Other times I start the application, wait a few seconds and then send the curl request.
Another thing I do to reproduce the error is deleting all local 3.0.0-SNAPSHOT artifacts (for both core and discovery-client) and then run the application.
Steps to Reproduce
git clone https://github.com/micronaut-graal-tests/micronaut-service-discovery-eureka
cd micronaut-service-discovery-eureka
git checkout error-micronaut3
docker run -it --rm -p 8761:8761 registry.gitlab.com/micronaut-projects/micronaut-graal-tests/eureka-server
./gradlew run
curl localhost:8080/api/hello/Micronaut
Expected Behaviour
The application should return
Hello Micronaut
Actual Behaviour
Environment Information