question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using quarkusDev with gradle leaves process running

See original GitHub issue

Describe the bug

When running quarkus in dev mode, using ./gradlew quarkusDev, the service is started correctly but when gradle is closed (by pressing Ctrl+C) the process is left running. Subsequent attempts to run in dev mode result in a port conflict for the debug port and an increasing number of processes left behind.

Expected behavior

When you terminate the gradle build then the associated process running the quarkus jar should also be killed.

Actual behavior

The java process running the quarkus jar is left running.

To Reproduce

When creating a new gradle project using the maven template this issue does not initially occur and when you stop the gradle build the java process is also stopped. However adding certain extensions such as io.quarkus:quarkus-micrometer-registry-prometheus causes this problem to occur, as long as you have metrics enabled.

Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific). https://github.com/briancullen/quarkus-reproducer

Steps to reproduce the behavior:

  1. Clone the git repo
  2. Run ./gradlew quarkusDev
  3. Press Ctrl+C to stop the build process.

Environment (please complete the following information):

Output of uname -a or ver

Linux xxxxx 5.8.0-48-generic #54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version “11.0.8” 2020-07-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10) Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.21.0, JRE 11 Linux amd64-64-Bit Compressed References 20200715_697 (JIT enabled, AOT enabled) OpenJ9 - 34cf4c075 OMR - 113e54219 JCL - 95bb504fbb based on jdk-11.0.8+10)

GraalVM version (if different from Java)

Quarkus version or git rev

1.13.0.Final

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


Gradle 6.8.3

Build time: 2021-02-22 16:13:28 UTC Revision: 9e26b4a9ebb910eaa1b8da8ff8575e514bc61c78

Kotlin: 1.4.20 Groovy: 2.5.12 Ant: Apache Ant™ version 1.10.9 compiled on September 27 2020 JVM: 11.0.8 (Eclipse OpenJ9 openj9-0.21.0) OS: Linux 5.8.0-48-generic amd64

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
jccommented, Apr 8, 2021

This is no longer an issue in 1.13.1.Final. Thanks!

1reaction
jaikirancommented, Apr 6, 2021

Looking at the code in VertxRecorder there’s a possibility for this to block forever. I’ve created a PR with a potential fix https://github.com/quarkusio/quarkus/pull/16253 (I don’t have an easy way to verify that it fixes your issue).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building Quarkus apps with Gradle
The URL that your app is going to be running in dev mode at. This is only needed on the local side, so...
Read more >
Gradle quarkusDev keeps running in background after Ctrl+C ...
Go back to the original terminal and stop the execution using Ctrl +C. The process should be no longer running; Run curl http://localhost:8080 ......
Read more >
Continuous Testing with Quarkus - JVM Advent
In the application directory we run mvn quarkus:dev to start development mode. As this application requires a database and it has not been ......
Read more >
Quarkus | IntelliJ IDEA Documentation - JetBrains
IntelliJ IDEA creates a Quarkus run configuration that executes the necessary Maven goal or Gradle task. Select the Quarkus run configuration in the...
Read more >
Building Quarkus apps with Gradle
In a separated terminal or the embedded terminal, go to the project root and run ./gradlew quarkusDev . Enjoy! Visual Studio Code. Open...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found