-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Debug port not working in Docker container #31330
Comments
…ebug port The run-java.sh script needs `JAVA_DEBUG` to enabled debugging, but we also need to override the host and port by using `JAVA_DEBUG_PORT=*:5005` because otherwise the JVM process listens on the container's localhost which is not accessible from the host machine trying to connect remotely Fixes: #31330
You are correct! #31332 should address the issue |
@geoand Thanks for the tip! Adding My command line: Output from Docker:
|
👌 |
…ebug port The run-java.sh script needs `JAVA_DEBUG` to enabled debugging, but we also need to override the host and port by using `JAVA_DEBUG_PORT=*:5005` because otherwise the JVM process listens on the container's localhost which is not accessible from the host machine trying to connect remotely Fixes: quarkusio#31330
@geoand Quick question on this topic of Dockerfile. Can you tell me why you use USER=185 when building the docker images? Is that a special user? I noticed it in the .JVM and .LEGACY versions of the file.
|
I can't say I know |
…ebug port The run-java.sh script needs `JAVA_DEBUG` to enabled debugging, but we also need to override the host and port by using `JAVA_DEBUG_PORT=*:5005` because otherwise the JVM process listens on the container's localhost which is not accessible from the host machine trying to connect remotely Fixes: quarkusio#31330
Update instructions on running container built with Dockerfile with debug port
Describe the bug
This I think is related to #7890
When building my docker image using the
Dockerfile.jvm
script generated by thecode.quarkus.io
page and exposing port5005
like the comments say, I'm unable to connect to the application inside Docker.I get an error when using NetBeans Remote Debug:

This is how I run my application in docker:
and this is the log file INSIDE the container. Notice the
agent
command doesn't have*:5005
or even0.0.0.0:5005
like the ticket says it should.I think something is missing?
Expected behavior
To be able to connect to the docker container with the debugger
Actual behavior
Get an error:
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
JDK 17
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.1-Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven
Additional information
No response
The text was updated successfully, but these errors were encountered: