cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot debug my java j2ee application

0 Kudos

I created a first java application as described in the tutorial. Application works fine as expected, but when I started to test debugging this application (as described in the tutorial as well: https://help.sap.com/saphelp_nw73/helpdata/en/4a/c27d0e0a422046e10000000a421937/content.htm) I always get the error immediately after starting the debug session:

"Error while establishing debug connection with lxsrvmgi2069.metro-sap.com/51021

  Failed to connect to remote VM. Connection refused.

  Connection refused: connect"


Colleagues from network & firewall team told me that the port 51021 (5xx21 with xx=10, our instance number) that the port is open for communication to SAP server.

The server is running in debug mode and tells me in the SAP console that the server is running in debug mode (see screenshot below)

Do we have to change anything on the SAP server to establish this debug connection ? I'm currently a little bit lost on that issue ...


Accepted Solutions (0)

Answers (1)

Answers (1)

vijay_kumar49
Active Contributor
0 Kudos

Please let me know which tool you are using to develop the JAVA application?

If you used NWDS, Please refer this document . it may be useful NWDS 7.3 - Debug Configuration | SCN and Debug in CE 7.2 trial | SCN

Kindly let me know if you need any more information

0 Kudos

I'm using the NWDS 7.3 SP15Patch 5.

Unfortunately all the above documents didn't give me a hint.

In the SAP notes, which are referring to NWA7.0 (I'm running on 7.3) is a config tool mentioned which needs to be executed on the server. Is this still valid for 7.3 ?

Since the Firewall guys say that there is no issue on there side I have the feeling that something on the server must be wrong...

vijay_kumar49
Active Contributor
0 Kudos

Please do check whether the Server Instance Debug Mode is "ON"

You can check it from NWDS >J2EE Engine View>Server Instance>server0

If its not then you need to change it and any Basis Team can help you



this error looks like firewall related. please check if there is any firewall which blocking your connection