-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
grpc-server gets deactivated if no proto file and corresponging implementation is present #41861
Comments
/cc @alesj (grpc), @cescoffier (grpc), @geoand (kotlin) |
Do you have a gRPC service defined? In dev mode we always run the gRPc server (for the reflection service), but because this service is disabled by default in production mode, the gRPC server may disable itself as there are no services to serve. |
Yes, I have a service annotated with |
I also tried: if I remove the Kotlin extension, then it works as expected. |
Hmm, I tried again my project now without Kotlin and it does not work. Maybe I was wrong in the assumption that there is a connection. |
I narrowed it down. For the grpc-feature to be active, a proto file must be there as well as an implementation of that service. If one is missing, then, its getting deactivated. This took me several hours today. Would be nice to have at least a DEBUG log, if such magic happens. |
Wondering why it does not find the service in that case. I would say it's a bug. |
Does your dependency contains not only the proto file but also the generated code. If that's the case that's actually the expected behavior. We recommend to either:
|
Closing for lack of feedback. If the requested information becomes available, we can reopen |
The proto files and the generated code is contained in this jar: About your recommendations: if I re-generate the code, I would end up with the same classes multiple times on the classpath, which is probably not the best idea. How do I force indexing in Quarkus? |
Describe the bug
If both extensions "grpc" and "kotlin" are active, then when running the application in non-dev-mode, the feature "grpc-server" is missing. In dev-mode, it works.
Expected behavior
grpc and kotlin should work together also in production mode
Actual behavior
No response
How to Reproduce?
code-with-quarkus.zip
e.g: https://code.quarkus.io/?b=GRADLE_KOTLIN_DSL&e=grpc&e=rest&e=kotlin
./gradlew quarkusBuild
java -jar build/quarkus-app/quarkus-run.jar
Installed features: [cdi, kotlin, rest, smallrye-context-propagation, vertx]
by the way:
./gradlew quarkusRun
also does not workOutput of
uname -a
orver
Darwin ADC-MB20046 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64
Output of
java -version
openjdk version "21" 2023-09-19 OpenJDK Runtime Environment Zulu21.28+85-CA (build 21+35) OpenJDK 64-Bit Server VM Zulu21.28+85-CA (build 21+35, mixed mode, sharing)
Quarkus version or git rev
3.12.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)❯ ./gradlew --version ------------------------------------------------------------ Gradle 8.8 ------------------------------------------------------------ Build time: 2024-05-31 21:46:56 UTC Revision: 4bd1b3d3fc3f31db5a26eecb416a165b8cc36082 Kotlin: 1.9.22 Groovy: 3.0.21 Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023 JVM: 21 (Azul Systems, Inc. 21+35) OS: Mac OS X 14.5 aarch64
Additional information
No response
The text was updated successfully, but these errors were encountered: