9
votes

My Weblogic is installed in a Red hat OS machine.

In the startWebLogic.sh i have added this line JAVA_OPTIONS="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n %JAVA_OPTIONS%"

When I try to connect from my Eclipse I get a "Failed to connect to remote VM. Connection refused. Connection refused: connect" message.

Can you please tell me where I may be going wrong?

5
Is your Eclipse and weblogic on different systems? If so, could port 8888 be blocked on Redhat OS? - Raghuram
Hi Raghuram. Thanks for you reply. Yes its in different systems. How do I check if its blocked and if blocked, how do i enable it - mujeeb
If you have nmap installed. You can issue the command from your eclipse host: format: nmap -p <port> <server>, example: nmap -p 8888 serverName.example.com - ftravers
you don't have to do anything additional (check your setDomainEnv.sh if it contains the line debugFlag="true". If so than you have weblogic setup for remote debugging). - despot
@despot That comment is too simplistic. There's more to it than that. A user should look through the rest of the script to see what port it's being set up for etc - the_new_mr

5 Answers

6
votes

In the startWebLogic.sh file in the bin folder, in the RHEL add this line

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n 

at the place where you find this string: ${JAVA_HOME}/bin/java.

Place the above line just after ${JAVA_HOME}/bin/java

4
votes

I Know it may be late ... but I get errors like this, when I try to run eclipse debugging session while there is one session already running.

2
votes

Edit <my_domain>/bin/setDomainEnv.sh file and add this on top:

JAVA_OPTIONS="$JAVA_OPTIONS -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" 

or configure debug port

DEBUG_PORT=${DEBUG_PORT:=8000} 
JAVA_OPTIONS="$JAVA_OPTIONS -Xrunjdwp:transport=dt_socket,address=$DEBUG_PORT,server=y,suspend=n"

More info can be found here:
How to setup remote debug with WebLogic Server and Eclipse

0
votes

you can only connect to a running VM, so make sure your server is running.

if you are running on separate systems, it is possible and very likely that a firewall is blocking the connection. so contact your network administrator to see if this is true

0
votes

May be late but may help someone.

I use the eclipse plugin for weblogic 12c. I was trying to run the server in the debug mode by doingrighclick-->start in debug and kept getting a "VM Connection refused" error. Then i did the following 1- I edited the startWeblogic.cmd to include

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

2- Rightclick on the PROJECT that i wanted to debug and went MYproject-->Debug As-->**Debug On Server** and it worked. Do not do righclick-->start in debug on the server, but do it on the specific project you want to debug.