eclipse 使用eclipse进行Weblogic远程调试

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3882203/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 19:40:05  来源:igfitidea点击:

Weblogic remote debugging using eclipse

eclipsedebuggingweblogicusing

提问by mujeeb

My Weblogic is installed in a Red hat OS machine.

我的 Weblogic 安装在 Red hat OS 机器上。

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%"

在 startWebLogic.sh 中,我添加了这一行 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.

当我尝试从 Eclipse 连接时,收到“无法连接到远程 VM。连接被拒绝。连接被拒绝:连接”消息。

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

你能告诉我我可能哪里出错了吗?

采纳答案by mujeeb

In the startWebLogic.shfile in the binfolder, in the RHELadd this line

bin文件夹下的startWebLogic.sh文件中,在RHEL中添加这一行

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

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

在您找到此字符串的位置:${JAVA_HOME}/bin/java

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

将上面的行放在后面 ${JAVA_HOME}/bin/java

回答by Dima R.

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.

我知道可能会迟到......但是当我尝试运行 eclipse 调试会话时,我会遇到这样的错误,而同时有一个会话已经在运行。

回答by Mohit Singh

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

编辑<my_domain>/bin/setDomainEnv.sh文件并将其添加到顶部:

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

可以在此处找到更多信息:
如何使用 WebLogic Server 和 Eclipse 设置远程调试

回答by Sandeepraj Singh

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 debugand kept getting a "VM Connection refused" error. Then i did the following 1- I edited the startWeblogic.cmd to include

我使用 weblogic 12c 的 eclipse 插件。我试图在调试模式下运行服务器,righclick-->start in debug并不断收到“VM 连接被拒绝”错误。然后我做了以下 1- 我编辑了 startWeblogic.cmd 以包括

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 debugon the server, but do it on the specific project you want to debug.

2-右键单击我想调试的项目,然后就MYproject-->Debug As-->**Debug On Server**可以了。不要righclick-->start in debug在服务器上做,而是在要调试的特定项目上做。

回答by Salandur

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

您只能连接到正在运行的 VM,因此请确保您的服务器正在运行。

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

如果您在不同的系统上运行,则很可能是防火墙阻止了连接。因此请联系您的网络管理员以查看是否属实