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:dev's debugHost not configurable #14403

Closed
slinstaedt opened this issue Jan 19, 2021 · 10 comments · Fixed by #14432
Closed

quarkus:dev's debugHost not configurable #14403

slinstaedt opened this issue Jan 19, 2021 · 10 comments · Fixed by #14432
Labels
kind/question Further information is requested
Milestone

Comments

@slinstaedt
Copy link

We are running development environments and tools in containers and trying to separate responsibilities not only in separate containers (and also pods, so colocation is not really a solution). One of the ideas was separate IDE pods from the actual application (quarkus-based, in this occasion) being in development. The challenge for us is, to make relevant ports from the application in development available at least to the IDE container.

When running mvn quarkus:dev, application's port is only bound to loopback interface, which is luckily configurable e.g. via enviroment variable QUARKUS_HTTP_HOST=0.0.0.0. The same problem applies to other ports like the debug port, which is opened by the maven plugin. Unfortunately it looks like there is currently no way to change this configuration, even though most of the code to do so is already there (have a look at io.quarkus.maven.DevMojo#debugHost).

Expected behavior
When running mvn quarkus:dev debug port is bound to 127.0.0.1 by default, but is configurable somehow.

Actual behavior
Running mvn quarkus:dev debug port is bound to 127.0.0.1 and not configurable.

To Reproduce
Without containering: Start any quarkus application using mvn quarkus:dev and from the same machine try to connect to it using jdb -attach $(hostname):5005. jdb -attach localhost:5005 is working fine for reference.

@slinstaedt slinstaedt added the kind/bug Something isn't working label Jan 19, 2021
@ghost ghost added the triage/needs-triage label Jan 19, 2021
@stuartwdouglas
Copy link
Member

stuartwdouglas commented Jan 20, 2021

You should be able to do mvn quarkus:dev -DdebugHost=0.0.0.0

@geoand
Copy link
Contributor

geoand commented Jan 20, 2021

I added a documentation note about that at #14421

@slinstaedt
Copy link
Author

slinstaedt commented Jan 20, 2021

You should be able to do mvn quarkus:dev -DdebugHost=0.0.0.0

Yep, that is what I already tried. I am not an expert for maven plugins, but the last time I wrote one, you needed to set a property (name) for your injected @Parameter. Otherwise system properties are not considered.

@slinstaedt
Copy link
Author

slinstaedt commented Jan 20, 2021

Thats the line, sorry for not linking it. You can configure this line using the plugin's <configuration/> block, but not using system properties, afaik. Would be nice, if someone can verify this.

@geoand
Copy link
Contributor

geoand commented Jan 20, 2021

That should also work

@slinstaedt
Copy link
Author

slinstaedt commented Jan 20, 2021

Please run mvn -X quarkus:dev -DdebugHost=0.0.0.0 on a vanilla quarkus app yourself and search the last parts of the logs for "debugHost":

[...]
[DEBUG] Launching JVM with command line: /usr/local/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/Home/bin/java -DdebugHost=0.0.0.0 -XX:TieredStopAtLevel=1 -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:5005,server=y,suspend=n -Djava.util.logging.manager=org.jboss.logmanager.LogManager --enable-preview -jar /Users/sven/work/quarkus-example/target/quarkus-example-dev.jar
Listening for transport dt_socket at address: 5005
[...]

Using quarkus 1.10.5.Final

@gsmet gsmet closed this as completed in ae2a666 Jan 20, 2021
gsmet added a commit that referenced this issue Jan 20, 2021
Add note about enabling all debug hosts for dev mode
@gsmet gsmet reopened this Jan 20, 2021
@gsmet
Copy link
Member

gsmet commented Jan 20, 2021

Reopening as the OP says it doesn't help AFAICS.

@gsmet gsmet added kind/question Further information is requested and removed kind/bug Something isn't working triage/needs-triage labels Jan 20, 2021
@geoand
Copy link
Contributor

geoand commented Jan 20, 2021 via email

@geoand
Copy link
Contributor

geoand commented Jan 20, 2021

#14432 fixes the issue

@ghost ghost added this to the 1.12 - master milestone Jan 20, 2021
geoand added a commit that referenced this issue Jan 20, 2021
Ensure that dev mode debug host can be configured with -DdebugHost
@gsmet gsmet modified the milestones: 1.12 - master, 1.11.1.Final Jan 21, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jan 21, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants