grpc-spring icon indicating copy to clipboard operation
grpc-spring copied to clipboard

Warning: unknown channel option SO_KEEPALIVE

Open lorien opened this issue 3 years ago • 2 comments

The context

I want to use grpc server inside spring boot server. I want grpc server listens on unix domain socket.

The question

I have upgraded to recent release of grpc-server-spring-boot-starter and added this config line to properties file: grpc.server.address=unix:/path/to/backend-grpc.sock It works OK but I keep seeing these lines in log file:

22:09:03.656 [epollEventLoopGroup-2-1] WARN i.g.n.s.i.n.b.ServerBootstrap - Unknown channel option 'SO_KEEPALIVE' for channel '[id: 0xdf583dc3]'

Could you please suggest how can I fix that issue? I do not want these lines appear in log file.

The application's environment

Spring (boot): 2.5.7 grpc-java: 1.35.1 grpc-server-spring-boot-starter: 2.13.0.RELEASE java: 17.0.1, 64bit

lorien avatar Jan 11 '22 16:01 lorien

The keepalive is set here:

https://github.com/yidongnan/grpc-spring-boot-starter/blob/aee1d1486973f06d1b7be3a030b3a2c309b671a4/grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/serverfactory/NettyGrpcServerFactory.java#L98-L107

Can you please check which of these properties causes this? If not, it might take some time for me to fix this.

Note: You should probably update to a newer version of grpc/protobuf as a security advisory has been published for protobuf a few days ago. (The spring-boot update might be important as well, if you are using log4j2) See also: https://github.com/yidongnan/grpc-spring-boot-starter/releases/tag/v2.13.1.RELEASE

ST-DDT avatar Jan 11 '22 16:01 ST-DDT