Weblogic remote debugging using eclipse

五迷三道 提交于 2019-12-17 16:57:07

问题


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?


回答1:


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




回答2:


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.




回答3:


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




回答4:


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




回答5:


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.



来源:https://stackoverflow.com/questions/3882203/weblogic-remote-debugging-using-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!