micronaut-projects / micronaut-grpc

Integration between Micronaut and GRPC
Apache License 2.0
69 stars 39 forks source link

Grpc request failing with "onStreamError" on enabling ssl and http2 #904

Closed ShivaniSK closed 4 months ago

ShivaniSK commented 4 months ago

Issue description

I have enabled ssl and http2 as below

micronaut:
  application:
    name: Test GRPC API
  server:
    port: 8081

grpc:
  server:
    port: 50055
    ssl:
      cert-chain: classpath:certificate.crt
      private-key: classpath:cert.key

netty:
  default:
    allocator:
      max-order: 3

On hitting the request via spring cloud gateway, i can see below error

<html>
<body>
<!--StartFragment-->
May 29, 2024 7:30:55 AM io.grpc.netty.NettyServerHandler onStreamError
--
  | WARNING: Stream Error
  | io.netty.handler.codec.http2.Http2Exception$StreamException: Stream closed before write could take place
  | at io.netty.handler.codec.http2.Http2Exception.streamError(Http2Exception.java:173)
  | at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$FlowState.cancel(DefaultHttp2RemoteFlowController.java:481)
  | at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$1.onStreamClosed(DefaultHttp2RemoteFlowController.java:105)
  | at io.netty.handler.codec.http2.DefaultHttp2Connection.notifyClosed(DefaultHttp2Connection.java:357)

<!--EndFragment-->
</body>
</html>
ShivaniSK commented 4 months ago

Closing as figured out the issue was with the gateway from where the request was coming.