将 VisualVM 连接到 WebSphere 7

发布于 2024-08-21 12:05:10 字数 130 浏览 4 评论 0原文

我正在尝试让 VisualVM 和 websphere 7 在我的本地 Windows 桌面上协同工作。我尝试通过 JMX 连接,但没有成功。有人设法让visialvm 和 websphere 7 工作吗?你做到了吗?

问候 FF

I am trying to get visualvm and websphere 7 to work together on my local windows desktop. I try to connect through JMX but no luck. Has anybody managed to get visialvm and websphere 7 to work and ow did you do it?

Regards
FF

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

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

发布评论

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

评论(3

情感失落者 2024-08-28 12:05:10

在布拉格 VisualVM 团队的帮助下,我让它正常工作(感谢 Tomas!):

1)在管理控制台上(单击服务器 -> 服务器类型 - > WebSphere 应用程序服务器 -> 服务器1 -> Java 和流程管理 -> 流程定义 > Java 虚拟机),将以下行添加到
字段中
通用 JVM 参数(请注意,第一个系统属性等于
第二个系统属性没有任何内容,也没有等号):

-Djavax.management.builder.initial= -Dcom.sun.management.jmxremote

2) 在文件 /opt/IBM/ 中添加或取消注释以下三行
WebSphere/AppServer/java/jre/lib/management/management.properties
(或/lib/management/management.properties):

com.sun.management.jmxremote.port=3333
com.sun.management.jmxremote.authenticate=false
com.sun.management.jmxremote.ssl=false
com.sun.management.jmxremote.local.only=false

3)连接VisualVM!

I got it to work with the help of the VisualVM team in Praha (Thanks Tomas!):

1) On the admin console (Click on Servers -> Server types -> WebSphere application servers -> server1 -> Java and Process Management -> Process definition -> Java Virtual Machine), add the following line into the field of
Generic JVM Argument (note that the first system property is equal to
nothing and no equal sign for the second system property):

-Djavax.management.builder.initial= -Dcom.sun.management.jmxremote

2) Add or uncomment the following three lines in file /opt/IBM/
WebSphere/AppServer/java/jre/lib/management/management.properties
(or / lib/management/management.properties):

com.sun.management.jmxremote.port=3333
com.sun.management.jmxremote.authenticate=false
com.sun.management.jmxremote.ssl=false
com.sun.management.jmxremote.local.only=false

3) Connect VisualVM!

云朵有点甜 2024-08-28 12:05:10

可以将这些参数 port、authenticate 和 ssl 设置为 JVM 参数,例如 -Dcom.sun.management.jmxremote.port=1300

我还有另一个问题:通过使用 mbean Visualvm 插件,我看不到任何相关的 Websphere mbean。

It is possible to set these parameters port, authenticate and ssl as JVM Arguments like -Dcom.sun.management.jmxremote.port=1300

I have another issue: by using the mbean visualvm plugin I can not see any relevant Websphere mbean.

梦冥 2024-08-28 12:05:10

这取决于您想要实现的目标以及您所面临的限制。您需要知道的是,WebSphere 中有两个 MBean 服务器:除了 JRE 自动创建的平台 MBean 服务器之外,WebSphere 还创建自己的 MBean 服务器。以下是您拥有的两个选项:

  1. 按照 user271858 给出的答案中的描述配置您的 WebSphere 服务器。这将允许您连接到平台 MBean 服务器。您将可以访问提供进程信息(RAM、CPU、线程等)的标准平台 MBean。另一方面,您将无法访问WebSphere 的MBean(实现某些管理操作、提供应用程序指标等)。您还需要注意,通过更改 WebSphere 服务器的配置,您将绕过 WebSphere 的安全性。

  2. 连接到WebSphere 的MBean 服务器。 WebSphere 支持多种协议来实现这一点(主要是 SOAP 和 RMI),但它们都不是完全标准的。这意味着您需要将一些 WebSphere 库(即管理瘦客户端)添加到 VisualVM。可能可以做到这一点(它可以与 JConsole 一起使用,因此原则上也应该可以与 VisualVM 一起使用),但它很棘手,特别是当您需要连接到启用了安全性的 WebSphere 服务器时。

    一个更简单的选择是将 VisualWAS 插件安装到 VisualVM 中。它依赖于专有 WebSphere 协议之一的开源实现,因此不需要任何额外的 WebSphere 库。

    这将使您能够访问在WebSphere 的MBean 服务器中注册的MBean,但不能访问标准平台MBean,即VisualVM 中的相关部分(与内存、CPU 和线程有关)将被禁用。不过,您可以在 WebSphere 的 MBean 服务器中交叉注册平台 MBean,VisualWAS 项目也为此提供了解决方案(以安装到 WebSphere 中的插件的形式)。然后,您将可以访问 VisualVM 中的所有功能,并且无需绕过 WebSphere 的安全性。

It depends on what you want to achieve and the constraints you have. What you need to know is that there are two MBean servers in WebSphere: in addition to the platform MBean server created automatically by the JRE, WebSphere also creates its own MBean server. Here are the two options you have:

  1. Configure your WebSphere server as described in the answer given by user271858. This will allow you to connect to the platform MBean server. You will get access to the standard platform MBeans that provide process information (RAM, CPU, threads, etc.). On the other hand, you won't be able to access WebSphere's MBeans (implementing certain administrative actions, providing application metrics, etc.). You also need to be aware that by changing the configuration of the WebSphere server, you bypass WebSphere's security.

  2. Connect to WebSphere's MBean server. WebSphere supports several protocols to do that (mainly SOAP and RMI), but none of them is completely standard. This means that you will need to add some of the WebSphere libraries (namely the admin thin client) to VisualVM. It is probably possible to do that (It works with JConsole, so in principle it should be possible with VisualVM as well), but it's tricky, especially it you need to connect to a WebSphere server that has security enabled.

    A simpler option is to install the VisualWAS plugin into VisualVM. It relies on an Open Source implementation of one of the proprietary WebSphere protocols and therefore doesn't require any additional WebSphere library.

    This will give you access to MBeans registered in WebSphere's MBean server, but not to the standard platform MBeans, i.e. the relevant parts (related to memory, CPU and threads) in VisualVM will be disabled. You can however cross-register the platform MBeans in WebSphere's MBean server, and the VisualWAS project provides a solution for this as well (in the form of a plugin to be installed into WebSphere). You will then have access to all features in VisualVM, and you don't need to bypass WebSphere's security.

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