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

Failed to bind properties under 'grpc.client.port'

Open Jouda-Hidri opened this issue 9 months ago • 1 comments

I am having the following error when deploying on k8s (locally all good, even when using docker)

Description:
Failed to bind properties under 'grpc.client.port' to net.devh.boot.grpc.client.config.GrpcChannelProperties:
    Reason: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [net.devh.boot.grpc.client.config.GrpcChannelProperties]
Action:
Update your application's configuration

This is my config

spring.application.name=k8scronjobs
# Enable Spring Batch schema initialization
spring.batch.jdbc.initialize-schema=always

# Database connection configuration
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
spring.datasource.initialization-mode=always

spring.jpa.hibernate.ddl-auto= update


spring.batch.job.enabled=false

grpc.server.port=9090

I am using

  • 'org.springframework.boot' version '3.4.3'
  • 'net.devh:grpc-spring-boot-starter:3.1.0.RELEASE'
  • 'io.grpc:grpc-netty:1.63.0'
  • 'io.grpc:grpc-protobuf:1.63.0'
  • 'io.grpc:grpc-stub:1.63.0'
  • 'com.google.protobuf:protobuf-java:3.25.5'
  • java21

Jouda-Hidri avatar Mar 03 '25 11:03 Jouda-Hidri

Look at GrpcChannelsProperties, the client config is start with grpc.client.SERVICE_NAME.port. I think maybe you set a unexpected proterties or env key is grpc.client.port

seal90 avatar Apr 08 '25 03:04 seal90