I have an application running in server A. The dev environment is in server B. I am trying to do remote debugging of app running in server A.
In server A i added following command to service start script
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4554,server=y,suspend=n
And service is running in server A.
When i try to launch remote debugging configuration it gives
Failed to connect to remote VM. Connection refused. Connection refused
port 4554 is free in server A.
What other configuration need to be done for this?
Regards Dheeraj Joshi
Remote Java Debugging is the process of debugging a Java program or application running on another machine or a server environment.
Remote debugging is when you debug an application running in a place or environment different from your local machine in a way that resembles local debugging. The point of this is for developers to debug components of distributed systems without difficulty.
Starting the Debugger. To debug your application, select a Java file with a main method. Right-click on it and select Debug As Java Application. If you started an application once via the context menu, you can use the created launch configuration again via the Debug button in the Eclipse toolbar.
Try this.
suspend=y
, just to make sure you got the JVM line right. This should stop the VM on startup until you connect.telnet [host] [port]
- this will quickly let you know if there's anything listening to that port on that host.Another way of starting the JVM that I use successfully is:
-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y
Check if there is a firewall between and/or on the two servers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With