File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Debugging on Remote Machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Debugging on Remote Machine" Watch "Debugging on Remote Machine" New topic
Author

Debugging on Remote Machine

Nipun Bahr
Ranch Hand

Joined: Jul 09, 2008
Posts: 55

Hi All,

Please suggest how can I debug my application in eclipse IDE on weblogic installed in remote machine.

I am creating an ear file in local machine and deploying on weblogic installed on remote machine.
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Nipun Bahr wrote:Hi All,

Please suggest how can I debug my application in eclipse IDE on weblogic installed in remote machine.



Apply the break point in the source, restart the WLS server in debug mode and then try to hit the application.

Please let us know if this works.


Regards, Sud.
SCJP 5 ScjpFAQ JLS
Nipun Bahr
Ranch Hand

Joined: Jul 09, 2008
Posts: 55


Hi Sudipto ,

Sorry for late reply.

When I try to hit the weblogic server on remote machine, I am getting the following error-

"Failed to connect to remote VM. Connection timed out.
org.eclipse.jdi.TimeoutException"


I configured the debug configurations in Eclipse mentioning my remote machine IP and port number.

Please suggest a way to proceed.
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

I would suggest you to go through this tutorial for remote debuggin.

http://www.myeclipseide.com/documentation/quickstarts/remotedebugging/

Also, I found the following discussion, hope this helps:

http://www.myeclipseide.com/PNphpBB2-viewtopic-t-24612.html
Nipun Bahr
Ranch Hand

Joined: Jul 09, 2008
Posts: 55

Hi Sudipto,

Thanks for your reply.

I am able to debug now

Earlier I was not able to connect I think due to some firewalls. I tried then with port number 80 and I am able to debug.

One think is that the debugging process is quite slow, so can we go for some other port number?? provided that it should by pass the firewall.

I tried randomly with other port numbers(excluding 80), It did not work
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Hi Nipun,

How did you change the debug port?

In the setDomainEnv script, use the following:

DEBUG_PORT="9999"
export DEBUG_PORT

You can also check and change your setting through console using the following steps:

- Go to Servers view and right click on your server (make sure your server is not running)
- Click on open launch configuration
- Change your settings.
- Click Apply/OK

Hope this helps.
Nipun Bahr
Ranch Hand

Joined: Jul 09, 2008
Posts: 55

Hi Sudipto,

I made the changes in address value of startweblogic.cmd file as below-

set JAVA_OPTIONS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=80,server=y,suspend=n %SAVE_JAVA_OPTIONS%

and this is the port number i.e. 80 which I am hitting from my eclipse debug configurations.
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Were you able to connect this time??
Nipun Bahr
Ranch Hand

Joined: Jul 09, 2008
Posts: 55


Yes , I am able to debug with above said settings.

Only issue is that debugging process is slow.
Nipun Bahr
Ranch Hand

Joined: Jul 09, 2008
Posts: 55

Hi,

I am facing one issue.

Once I debug and disconnect, again it does not connect to remote machine and shows a message-

Failed to connect to remote VM. Connection refused.
Connection refused: connect


Please suggest.
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Nipun Bahr wrote:Hi,

I am facing one issue.

Once I debug and disconnect, again it does not connect to remote machine and shows a message-

Failed to connect to remote VM. Connection refused.
Connection refused: connect


Please suggest.


What do you mean debug and disconnect?? How do you start debugging again?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Debugging on Remote Machine