Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The gRPC server does not start, Java #952

Open
Aberkingaliev opened this issue Aug 28, 2023 · 5 comments
Open

The gRPC server does not start, Java #952

Aberkingaliev opened this issue Aug 28, 2023 · 5 comments
Labels
question A question about this library or its usage
Milestone

Comments

@Aberkingaliev
Copy link

Labeled the class with the annotation @GrpcServer

@GrpcService
public class UserService extends UserGrpc.UserImplBase {...code}

I'm using it together with spring boot web.

Gradle dependencies:

dependencies {
implementation 'net.devh:grpc-server-spring-boot-starter:2.14.0.RELEASE'
implementation 'net.devh:grpc-server-spring-boot-autoconfigure:2.14.0.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.postgresql:postgresql:42.6.0'
implementation 'javax.annotation:javax.annotation-api:1.3.2'
implementation 'org.flywaydb:flyway-core'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.grpc:grpc-testing:1.57.2'
}

There is nothing about gRPC in the startup logs, no error or useful information, not even in DEBUG level

@Aberkingaliev Aberkingaliev added the question A question about this library or its usage label Aug 28, 2023
@Aberkingaliev
Copy link
Author

Perhaps something else is needed besides the @GrpcService annotation and extension?

@piomin
Copy link

piomin commented Aug 29, 2023

Nothing more. The question is which version of Spring Boot do you use?

@Aberkingaliev
Copy link
Author

Was using the latest version of Spring boot
Then I decided to roll back to 2.6.13
Everything worked, apparently there is no support for newer versions of Spring.

@marcindabrowski
Copy link
Contributor

Actually it is. You have to add @ImportAutoConfiguration(GrpcClientAutoConfiguration.class) to your configuration. Current version of the starter do not have autoconfiguration file in format supported from 2.7, and old one is not supported since 3.0.

@fengli79 fengli79 added this to the 3.0.0 milestone Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A question about this library or its usage
Projects
None yet
Development

No branches or pull requests

5 participants