【问题标题】:Micronaut Server Error - No request state present. Cause: java.lang.IllegalArgumentException: No enum constant io.micronaut.http.HttpMethod.PRIMicronaut 服务器错误 - 不存在请求状态。原因:java.lang.IllegalArgumentException:没有枚举常量 io.micronaut.http.HttpMethod.PRI
【发布时间】:2023-04-01 15:08:01
【问题描述】:

在 envoy 后面部署 micronaut 服务时,我们会收到与处理程序相关的错误。这是对编码的引用吗?我尝试了一些没有运气的选择。谢谢。

借款人_1 | 23:10:07.038 [main] INFO i.m.g.s.GrpcEmbeddedServerListener - GRPC 在端口 50051 上启动 借款人_1 | 23:10:07.045 [main] INFO io.micronaut.runtime.Micronaut - 启动在 1814 毫秒内完成。服务器运行:http://092736b9eca5:9090 借款人_1 | 23:10:35.335 [nioEventLoopGroup-1-2] 错误 i.m.h.s.netty.RoutingInBoundHandler - Micronaut 服务器错误 - 不存在请求状态。原因:java.lang.IllegalArgumentException:没有枚举常量 io.micronaut.http.HttpMethod.PRI 借款人_1 | io.netty.handler.codec.DecoderException: java.lang.IllegalArgumentException: 没有枚举常量 io.micronaut.http.HttpMethod.PRI 借款人_1 |在 io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:98) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) 借款人_1 |在 io.micronaut.http.netty.stream.HttpStreamsHandler.channelRead(HttpStreamsHandler.java:191) 借款人_1 |在 io.micronaut.http.netty.stream.HttpStreamsServerHandler.channelRead(HttpStreamsServerHandler.java:121) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) 借款人_1 |在 io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) 借款人_1 |在 io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) 借款人_1 |在 io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) 借款人_1 |在 io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93) 借款人_1 |在 io.netty.handler.codec.http.HttpServerKeepAliveHandler.channelRead(HttpServerKeepAliveHandler.java:64) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) 借款人_1 |在 io.netty.handler.flow.FlowControlHandler.dequeue(FlowControlHandler.java:186) 借款人_1 |在 io.netty.handler.flow.FlowControlHandler.channelRead(FlowControlHandler.java:152) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) 借款人_1 |在 io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438) 借款人_1 |在 io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:328) 借款人_1 |在 io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:315) 借款人_1 |在 io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:429) 借款人_1 |在 io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:283) 借款人_1 |在 io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) 借款人_1 |在 io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:287) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) 借款人_1 |在 io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1422) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) 借款人_1 |在 io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) 借款人_1 |在 io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:931) 借款人_1 |在 io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) 借款人_1 |在 io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) 借款人_1 |在 io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized (NioEventLoop.java:635) 借款人_1 |在 io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552) 借款人_1 |在 io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) 借款人_1 |在 io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) 借款人_1 |在 io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) 借款人_1 |在 io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) 借款人_1 |在 java.base/java.lang.Thread.run(Thread.java:825) 借款人_1 |引起:java.lang.IllegalArgumentException:没有枚举常量 io.micronaut.http.HttpMethod.PRI 借款人_1 |在 java.base/java.lang.Enum.valueOf(Enum.java:240) 借款人_1 |在 io.micronaut.http.HttpMethod.valueOf(HttpMethod.java:24) 借款人_1 |在 io.micronaut.http.netty.AbstractNettyHttpRequest.(AbstractNettyHttpRequest.java:62) 借款人_1 |在 io.micronaut.http.server.netty.NettyHttpRequest.(NettyHttpRequest.java:89) 借款人_1 |在 io.micronaut.http.server.netty.decoders.HttpRequestDecoder.decode(HttpRequestDecoder.java:91) 借款人_1 |在 io.micronaut.http.server.netty.decoders.HttpRequestDecoder.decode(HttpRequestDecoder.java:43) 借款人_1 |在 io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) 借款人_1 | ...省略了53个常用框架

【问题讨论】:

    标签: java micronaut envoyproxy


    【解决方案1】:

    在 1.3.0.M1 中引入了对非标准 HTTP 方法的支持。请尝试 1.3.0.M1 并查看问题是否仍然存在。

    【讨论】:

    • 好的,错误现在不同了,我得到空异常,当特使不在请求路径时它确实有效。借款人_1 | 01:33:03.907 [nioEventLoopGroup-1-2] 错误 i.m.h.s.netty.RoutingInBoundHandler - 发生意外错误:null borrower_1 | java.lang.NullPointerException: null
    • borrower_1 | 01:41:58.183 [nioEventLoopGroup-1-8] 错误 i.m.h.s.netty.RoutingInBoundHandler - 发生意外错误:null borrower_1 | java.lang.NullPointerException: null borrower_1 |在 io.micronaut.web.router.DefaultRouter.find(DefaultRouter.java:127)
    • 这还不足以确定问题所在的堆栈跟踪。你应该在 github 上提出问题
    猜你喜欢
    • 1970-01-01
    • 2015-11-17
    • 2021-11-08
    • 2018-12-02
    • 1970-01-01
    • 2020-10-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多