针对多个 JBoss 实例的更多远程调试会话

发布于 2024-08-08 01:53:01 字数 510 浏览 5 评论 0原文

我在一台机器上运行多个 JBoss 实例。 该实例是使用自己的地址绑定参数 -b 创建的,并通过 -c 参数在不同的配置上运行。 该机器是 Linux 一台,并且创建了更多虚拟接口(通过 ifconfig eth0:1 192.168.0.101 netmask 255.255.255.0 up)。

我的想法是,更多的人可以在一个 IP 地址上的实例中运行 JBoss,并且他们将能够测试和调试其配置的代码。 但是当我在调试模式下运行JBoss时(添加到JAVA_OPTS:-Xdebug -Xnoagent -Xrunjdwp:transport = dt_socket,address = 8787,server = y,suspend = n)JBoss正在侦听0.0.0.0:8787(通过netstat获得) -avn)。这意味着调试会话正在侦听该计算机的所有 IP - 所有虚拟接口。这是我不想要的,因为当更多 JBoss 实例在调试模式下运行时,我无法确定将连接到哪个实例进行调试。

是否有可能说出调试将在哪里监听?或者我可以以某种方式限制它吗? 谢谢。

I'm running more instances of JBoss on one machine.
This instances is created with own address binding parameter -b and runs on different configurations by -c parameter.
The machine is Linux one and there are more virtual interfaces created (by ifconfig eth0:1 192.168.0.101 netmask 255.255.255.0 up).

My idea is that more people could run the JBoss in the its instance on one ip address and they will be able to test and debug code for their configuration.
But when I run JBoss in debug mode (to JAVA_OPTS added: -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n) the JBoss is listening on 0.0.0.0:8787 (got by netstat -avn). That means that the debug session is listening on all IPs of this machine - on all virtual interfaces. That what I don't want because when more instances of JBoss in debug mode is running I can't determine to which instance I'll be connected for debugging.

Is some possibility to say where the debug will be listening? Or am I able to restrict it somehow?
Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ぶ宁プ宁ぶ 2024-08-15 01:53:01

您可以设置您想要的IP绑定到,因此每个虚拟机都会有所不同:

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

you can set the IP which you want to be bind to, and so it will be different to each VM:

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=machine:port,server=y,suspend=n
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文