eclipse 无法远程启动 WebLogic 进行调试

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13960258/
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-19 19:39:05  来源:igfitidea点击:

Unable to start WebLogic remotely to Debug

javaeclipseweblogicremote-debugging

提问by user994165

I setup my remote WebLogic server to debug, using these options:

我使用以下选项设置远程 WebLogic 服务器进行调试:

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=${DEBUG_PORT},server=y,suspend=n -Djava.compiler=NONE"

I started WebLogic on the server and saw that it was listening on 8453 for dt_socket. I added the remote server on my local Eclipse and tested the connection. I also see that the server is STARTED and I can view the details. However, I'm unable to restart in DEBUG. I also stopped WebLogic on the server and now in Eclipse I see that it is stopped, but I'm not able to start it (the icons for debug and start are greyed out). When I set up my Remote Java Application in Eclipse I did check "Allow termination of remote VM".

我在服务器上启动了 WebLogic,发现它正在 8453 上侦听 dt_socket。我在本地 Eclipse 上添加了远程服务器并测试了连接。我还看到服务器已启动,我可以查看详细信息。但是,我无法在 DEBUG 中重新启动。我还在服务器上停止了 WebLogic,现在在 Eclipse 中我看到它已停止,但我无法启动它(调试和启动的图标是灰色的)。当我在 Eclipse 中设置我的远程 Java 应用程序时,我确实选中了“允许终止远程 VM”。

Before stopping the server, the debug icon wasn't disabled and when I clicked it I got this message:

在停止服务器之前,调试图标没有被禁用,当我点击它时,我收到了这条消息:

Cannot attach to remote server.
Please make sure the server myserver.com is running and listening for transport dt_socket at address: 8453
Failed to connect to remote VM. Connection refused.
Connection refused: connect

回答by Andras

Instead of using java startup options, modify the following scripts:

修改以下脚本,而不是使用 java 启动选项:

setDomainEnv.sh -> make sure DEBUG_PORT is set ie. 8453

setDomainEnv.sh -> 确保设置了 DEBUG_PORT,即。8453

startWebLogic.sh -> set PRODUCTION_MODE=false and set debugFlag=true

startWebLogic.sh -> 设置 PRODUCTION_MODE=false 并设置 debugFlag=true

Restart server, remote debug should work on port 8453.

重启服务器,远程调试应该在 8453 端口上工作。