2

I get connection refused when remotely debugging a Java application that executes on a different server. The JVM is version 16, and the OS is Ubuntu 21.04. I chose 8999 as an unused port on the server. Not much help from Oracle documentation on runjdwp.

The command line options are ...

-Xdebug \
-Xrunjdwp:transport=dt_socket,address=8999,server=y,suspend=y \
2

1 Answer 1

8

The socket 8999 on the remote host defaults to 127.0.0.1:8999 which only accepts connections from running on the same host. In order to accept connections from any host, I found that the following worked OK.

-Xdebug \
-Xrunjdwp:transport=dt_socket,address=0.0.0.0:8999,server=y,suspend=y \
Sign up to request clarification or add additional context in comments.

1 Comment

Note that 0.0.0.0 is ip v4 Only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.