Problem
When attempting to debug a remote Tomcat server using IntelliJ IDEA in version 2025.1, the following error occurs: "Unable to open debugger port (*:5555): java.net.ConnectException "Connection refused: connect"." This issue prevents successful remote debugging.
Cause
This issue has been identified as a bug in IntelliJ IDEA 2025.1, affecting the configuration and connection to the remote debugger.
Resolution
The problem has been resolved in IntelliJ IDEA 2025.2 EAP (Early Access Program) version. Users should download and install the updated version to fix this issue.
Steps to resolve:
- Download IntelliJ IDEA 2025.2 EAP from JetBrains.
- Update the configuration for the remote Tomcat server, ensuring proper values are set for the
JPDA_ADDRESSandCATALINA_OPTSenvironments. E.g. adding the below lines incatalina.sh:
export JPDA_ADDRESS=*:5555
export CATALINA_OPTS="-Dcom.sun.management.jmxremote= -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.rmi.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=10.211.55.4"
- Restart the server using the command
./catalina.sh jpda startto initiate the debugging session with the correct parameters. - Try reconnecting the debugger from IntelliJ IDEA.
This should address the issue. If further assistance is required, consult the official debugging guide or contact JetBrains support.
IDE communicates with Tomcat over JMX to instruct it how and from where to deploy the artifact: https://i.imgur.com/QqIHMmL.png . See https://tomcat.apache.org/tomcat-8.0-doc/monitoring.html#Enabling_JMX_Remote for the details on how you can enable it.
Comments
0 comments
Please sign in to leave a comment.