cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to connect remote VM - Connection refused

Former Member
0 Kudos

Hi,

I am experiencing problems while debugging a J2EE application (NWDS 2.0.17) using a VPN connection.

If I work from my office, directly connect to the local area network, deploymend, debugging, (...) works fine. If I connect from outside the office to my companies infrastructure via VPN, I experience debugging problems: "Failed to connect remote VM - Connection refused"

The first debugging try throws this error: "Exception occured during launch -- Reason: Error within Debug UI:"

Further tries throw this error: "Failed to connect remote VM - Connection refused"

I think, my basic settings should be fine, otherwise I wouldn't be able to debug at all. Right?

Server State: Running

Productive Use: No

Debug Mode: Yes

Debug Port: 50021

At this time I am the only user on this server. Nevertheless, I used the command "netstat" to see if the port might be blocked. If I close my NWDS, port 50021 doesn't show up. After opening NWDS and debugging my J2EE application, port 50021 shows: Foreign address: "my computerName"_______State: ESTABLISHED

But how do I tell the server's VM to grant rights to my remote connection?

Your help is really appreciated.

Best Regards,

Holger Kölln

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Holger,

I think your proxy setting of IDE is enabled and is not proper so that its

using the proxy to access the virtual machine on J2E server.Please disable the

proxy setting.Its should work.Because same was case for me and it worked

after i made the following changes.

Regards

Ashis

Former Member
0 Kudos

Hello,

I finally got the debugger to start by installing Developer workplace using a local server.The connection is made fast enough ,application is deployed but when I click on a button which has a breakpoint attached to it ,it reaches till the breakpoint but does not goto the next statement on pressing F5 even F8 does not quit the session and execute the application further.

Any ideas why his is happening.

former_member186016
Active Contributor
0 Kudos

In the Debug View you will see set of threads plus the thread on which breakpoint is attached will show list of method calls.

Double Click on the top-most method call. The file having the break-point will get high lighted.Then use F5 or F8 to navigate. Try using buttons in the debug view also.

Sometime focus gets lost on a view in eclipse IDE and this happends. Also working in debug perspective is always better. I have seen sometime in other perspectives these F5,F6 and F8 doesn't work. Switching to debug perpective and doing what i stated above makes it work.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Hello All,

I am facing the same issue ,I have tried to do everything but nothing helps .

Any help would be really appreciated

Thanks

Former Member
0 Kudos

Having the same issue here. Is there any solution?

Former Member
0 Kudos

Hi Holger

I have faced this problem and solved by replacing sapj2eeclient.jar file of NWDS installation.This happens mainly due to VPN, wireless lan connection with the server.

Simply replace the file with the updated 2.0.18 version NWDS sapj2eeclient.jar file.

Hope this helps

Ananda

Former Member
0 Kudos

Hi Ananda

Thanks for your reply. I downloaded NWDS 2.0.18, but couldn't find the sapj2eeclient.jar file.

In NWDS 2.0.17 it is located in this folder:

...\eclipse\plugins\com.sap.tc.ap\comp\SAP-JEE\DCs\sap.com\com.sap.engine.client.lib\_comp\gen\default\public\default\lib\java\sapj2eeclient.jar

NWDS 2.0.18 seems to have a complete different setup.

Regards,

Holger

Former Member
0 Kudos

Hi Ananda,

I found the sapj2eeclient.jar file. It is located in the same folder as in SP17. Somehow, I had trouble while unpacking the sar-file. Some folders just didn't extract correctly.

I replaced the file as you told me. But it doesn't work for me.

Best Regards,

Holger

Former Member
0 Kudos

Hi Holger,

I have never heard of problem like yours and I am not expert on those topic, but here are some comments I hope they are helpful.

The sapj2eeclient is used for standalone applications to connect to code in the Web Application Server running on top of the SAP J2EE implementation that runs on top of server JVM. While the debugger communicates (or doesn't communicate in your case) with the JVM directly via its own socket via a standard debug protocol that is part of the JVM requirements - Java Debug Wire Protocol (jdwp). So most probably replacing that jar file will not help.

In addition there is no protocol versioning, since this is standard and replacing some other NWDS specific libraries with newer versions will most probably not solve your problem. Furthermore debugging could and is done with any IDE (like Eclipse), without any SAP specific libraries. The NWDS is built on top of Eclipse, if the debug plugin is not rewritten, which I doubt, the connection to the remote JVM even will not invoke any SAP code.

The opening of the socket from the server JVM is controlled by the JVM startup options. The Netweaver UI-s provides you way to configure the startup option, like putting something like

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=50021 in the JVM startup.

So I doubt there will be any configuration option that should be enabled. But if it is that will be for the JVM, not for the server, try searching your JVM provider documentation.

Double check that your port 50021 is open BEFORE starting the NWDS, run "netstat -a" on your server, you should see the port 50021 as "LISTENING". If it is ESTABLISHED someone is using it, if it is missing - your server is not in debug mode or at least is not using that port.

If the port is opened by the server correctly and that doesn't help, try checking your VPN documentation, or searching the net for similar debug problems, here is one that looks good, perhaps its associated links could give you a clue

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4688423

You might as well try changing the debug port to something else or try using another IDE with debugger to see if that will help.

Please post your findings if you discover something. After creating so long retry I hope at least to get the follow-up :).

HTH

Peter

Former Member
0 Kudos

Hi

The reason may be Some other in debug mode in the same server.

You can restart the sdm and try the debug.

Kind Regards

Mukesh