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

Quarkus 3.9.5 - Single grpc server issues warn: Request Context already active etc. #40711

Open
DaveO-Home opened this issue May 18, 2024 · 11 comments
Assignees
Labels
area/grpc gRPC area/kotlin kind/bug Something isn't working

Comments

@DaveO-Home
Copy link

Describe the bug

When running gRPC combined with the Web Server, a warning is displayed: Request context already active when gRPC request started. Same warning for either a Java Client or Javascript Client.

Expected behavior

Warning message is suppressed.

Actual behavior

Request context already active when gRPC request started is logged.

How to Reproduce?

Download https://github.com/DaveO-Home/grpc-quarkus, README.md included.

Output of uname -a or ver

Linux mini-pc 6.8.9-300.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 18:59:06 UTC 2024 x86_64 GNU/Linux

Output of java -version

Java(TM) SE Runtime Environment Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30, mixed mode, sharing)

Quarkus version or git rev

3.9.5

Build tool (ie. output of mvnw --version or gradlew --version)

------------------------------------------------------------ Gradle 8.6 ------------------------------------------------------------ Build time: 2024-02-02 16:47:16 UTC Revision: d55c486870a0dc6f6278f53d21381396d0741c6e Kotlin: 1.9.20 Groovy: 3.0.17 Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023 JVM: 21.0.2 (Oracle Corporation 21.0.2+13-LTS-jvmci-23.1-b30) OS: Linux 6.8.9-300.fc40.x86_64 amd64

Additional information

No response

@DaveO-Home DaveO-Home added the kind/bug Something isn't working label May 18, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented May 18, 2024

/cc @alesj (grpc), @cescoffier (grpc), @geoand (kotlin)

@cescoffier cescoffier self-assigned this Jun 3, 2024
@cescoffier
Copy link
Member

Note totally sure, but I cannot run the reproducer:

gradle quarkusDev

Welcome to Gradle 8.8!

Here are the highlights of this release:

  • Running Gradle on Java 22
  • Configurable Gradle daemon JVM
  • Improved IDE performance for large projects

For more details see https://docs.gradle.org/8.8/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'grpc-quarkus'.

Could not resolve all dependencies for configuration ':classpath'.
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23.
Required by:
project : > org.jetbrains.kotlin.plugin.allopen:org.jetbrains.kotlin.plugin.allopen.gradle.plugin:1.9.23 > org.jetbrains.kotlin:kotlin-allopen:1.9.23
> Unable to find a variant of org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23 providing the requested capability org.jetbrains.kotlin:kotlin-gradle-plugin-api-gradle82:
- Variant compile provides org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23
- Variant enforced-platform-compile provides org.jetbrains.kotlin:kotlin-gradle-plugin-api-derived-enforced-platform:1.9.23
- Variant enforced-platform-runtime provides org.jetbrains.kotlin:kotlin-gradle-plugin-api-derived-enforced-platform:1.9.23
- Variant javadoc provides org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23
- Variant platform-compile provides org.jetbrains.kotlin:kotlin-gradle-plugin-api-derived-platform:1.9.23
- Variant platform-runtime provides org.jetbrains.kotlin:kotlin-gradle-plugin-api-derived-platform:1.9.23
- Variant runtime provides org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23
- Variant sources provides org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23

@DaveO-Home
Copy link
Author

Did you try ./gradlew quarkusDev. That should pick up gradle 8.7 and the Quarkus config.

@cescoffier
Copy link
Member

Same result with:

./gradlew quarkusDev

@DaveO-Home
Copy link
Author

Note: Kotlin does not support Java 22 yet. There is a ./gradle/wrapper/gradle-wrapper.properties file right? Also there should be a ./gradle.properties file.

@cescoffier
Copy link
Member

I'm using Java v21.0.3.

The ./gradle/wrapper/gradle-wrapper.properties indicates Gradle 8.6:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

The ./gradle.properties has nothing out of the ordinary:

org.gradle.jvmargs=-Xmx4096m
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformVersion=3.9.5
quarkusPluginId=io.quarkus
quarkusPluginVersion=3.9.5

@DaveO-Home
Copy link
Author

Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23 try changing to 1.9.24 in build.gradle

@DaveO-Home
Copy link
Author

I have "Intellij Community"installed on my machine. If that is a requirement to use Kotlin in Gradle, then that is a problem!

@cescoffier
Copy link
Member

I'm using my plain terminal. I'm surprised it worse for you. Which gradle and java versions are you using?

@DaveO-Home
Copy link
Author

DaveO-Home commented Jun 3, 2024

OpenJDK Runtime Environment (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9) OpenJDK 64-Bit Server VM (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9, mixed mode, sharing)
I did change the Gradle version to 8.7 but 8.6 also works. I run in a plain terminal also on Fedora 40.
Just ran gh repo clone DaveO-Home/grpc-quarkus and started up with gradlew quarkusDev without a change.

Last resort - clear your maven cache

@DaveO-Home
Copy link
Author

DaveO-Home commented Jun 4, 2024

Upgraded Kotlin & Kotlin Plugin to 2.0.0 and Gradle to 8.8. Should run with Java 17-22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/grpc gRPC area/kotlin kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants