java 如何使“jconsole”与 Websphere 6.1 一起使用?

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

How can I make "jconsole" work with Websphere 6.1?

javawebspherejmxmbeans

提问by Alotor

I've deployed some Managed Beans on WebSphere 6.1 and I've managed to invoke them through a standalone client, but when I try to use the application "jconsole" distributed with the standard JDK can can't make it works.

我已经在 WebSphere 6.1 上部署了一些托管 Bean,并且我已经设法通过独立客户端调用它们,但是当我尝试使用与标准 JDK 一起分发的应用程序“jconsole”时,无法使其工作。

Has anyone achieved to connect the jconsole with WAS 6.1?

有没有人实现将 jconsole 与 WAS 6.1 连接?

IBM WebSphere 6.1 it's supossed to support JSR 160 JavaTM Management Extensions (JMX) Remote API. Furthermore, it uses the MX4J implementation (http://mx4j.sourceforge.net). But I can't make it works with neither "jconsole" nor "MC4J".

IBM WebSphere 6.1 支持 JSR 160 JavaTM Management Extensions (JMX) Remote API。此外,它使用 MX4J 实现 ( http://mx4j.sourceforge.net)。但是我不能让它与“jconsole”和“MC4J”一起工作。

I have the Classpath and the JAVA_HOME correctly setted, so the issue it's not there.

我已经正确设置了类路径和 JAVA_HOME,所以问题不存在。

回答by Konrad

WebSphere's support for JMX is crap. Particularly, if you need to connect to any secured JMX beans. Here's an interesting tidbit, their own implementation of jConsole will not connect to their own JVM. I have had a PMR open with IBM for over a year to fix this issue, and have gotten nothing but the runaround. They clearly don't want to fix this issue.

WebSphere 对 JMX 的支持简直是垃圾。特别是,如果您需要连接到任何安全的 JMX bean。这是一个有趣的花絮,他们自己的 jConsole 实现不会连接到他们自己的 JVM。一年多以来,我与 IBM 建立了一个 PMR 来解决这个问题,但除了运行之外什么也没得到。他们显然不想解决这个问题。

The only way I have been able to invoke remote secured JMX beans hosted on WebSphere has been to implement a client using the "WebSphere application client". This is basically a stripped down app server used for stuff like this.

我能够调用托管在 WebSphere 上的远程安全 JMX bean 的唯一方法是使用“WebSphere 应用程序客户端”实现客户端。这基本上是用于此类内容的精简应用服务器。

Open a PMR with IBM. Perhaps if more people report this issue, they will actually fix it.

与 IBM 一起打开 PMR。也许如果更多人报告此问题,他们实际上会解决它。

Update:You can run your application as a WebSphere Application Client in RAD. Open the run menu, then choose "Run...". In the dialog that opens, towards the bottom on the left hand side, you will see "WebSphere v6.1 Application Client". I'm not sure how to start and Application Client outside of RAD.

更新:您可以在 RAD 中将您的应用程序作为 WebSphere Application Client 运行。打开运行菜单,然后选择“运行...”。在打开的对话框的左侧底部,您将看到“WebSphere v6.1 Application Client”。我不确定如何在 RAD 之外启动和应用程序客户端。

回答by Flueras Bogdan

IT WORKS !

有用 !

http://issues.apache.org/jira/browse/GERONIMO-4534;jsessionid=FB20DD5973F01DD2D470FB9A1B45D209?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel

http://issues.apache.org/jira/browse/GERONIMO-4534;jsessionid=FB20DD5973F01DD2D470FB9A1B45D209?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel

  1) Change the config.xml and start the server. 

-see here how to change config.xml: http://publib.boulder.ibm.com/wasce/V2.1.0/en/working-with-jconsole.html

- 请参阅此处如何更改 config.xml:http: //publib.boulder.ibm.com/wasce/V2.1.0/en/working-with-jconsole.html

 2) start the jconsole with : jconsole -J-Djavax.net.ssl.keyStore=%GERONIMO_HOME%\var\security\keystores\geronimo-default -J-Djavax.net.ssl.keyStorePassword=secret -J-Djavax.net.ssl.trustStore=%GERONIMO_HOME%\var\security\keystores\geronimo-default -J-Djavax.net.ssl.trustStorePassword=secret -J-Djava.class.path=%JAVA_HOME%\lib\jconsole.jar;%JAVA_HOME%\lib\tools.jar;%GERONIMO_HOME%\repository\org\apache\geronimo\framework\geronimo-kernel.1.4\geronimo-kernel-2.1.4.jar

[or your version of geronimo-kernel jar]

[或您的 geronimo-kernel jar 版本]

 3) in the jconsole interface->advanced, input:
  JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/JMXSecureConnector
  user name: system
  password: manager

 4) click the connect button.

回答by Robert Laflamme

If you want the WebSphere MBeans this one works for me:

如果您想要 WebSphere MBeans,这对我有用:

The key is to configure the classpath and the security properly.

关键是正确配置类路径和安全性。

in one line:

在一行中:

jconsole -J-Dwas.install.root=C:/was61 -J-Djava.ext.dirs=C:/was61/plugins;C:/was61/plugins/com.ibm.ws.security.crypto_6.1.0;C:/was61/lib;C:/was61/java/jre/lib/ext -J-Dcom.ibm.SSL.ConfigURL="file:../../properties/ssl.client.props" -J-Dcom.ibm.CORBA.ConfigURL="file:../../properties/sas.client.props" service:jmx:iiop://host:port/jndi/JMXConnector

jconsole -J-Dwas.install.root=C:/was61 -J-Djava.ext.dirs=C:/was61/plugins;C:/was61/plugins/com.ibm.ws.security.crypto_6.1.0;C :/was61/lib;C:/was61/java/jre/lib/ext -J-Dcom.ibm.SSL.ConfigURL="file:../../properties/ssl.client.props" -J-Dcom .ibm.CORBA.ConfigURL="file:../../properties/sas.client.props" 服务:jmx:iiop://host:port/jndi/JMXConnector

where port = bootstrap port ex: (2809)

其中端口 = 引导端口,例如:(2809)

Be careful when setting the sas and the ssl props.

设置 sas 和 ssl 道具时要小心。

Robert

罗伯特

回答by djangofan

You all seem to be incorrect. I am running Websphere 6.1.041 , using JDK 1.5 , and I just started up Jconsole and used the "simple connect" tab to connect to localhost with port=0 and without a username and password and it works fine.

你们好像都说错了。我正在运行 Websphere 6.1.041 ,使用 JDK 1.5 ,我刚刚启动了 Jconsole 并使用“简单连接”选项卡连接到具有端口 = 0 且没有用户名和密码的本地主机,它工作正常。

回答by Bernie Perez

I have successfully connected to ActiveMQ and ServiceMix using the JConsole. Does WAS 6.1 use Java Management Extension (JMX) technology? JMX is required for JConsole.

我已使用 JConsole 成功连接到 ActiveMQ 和 ServiceMix。WAS 6.1 是否使用 Java 管理扩展 (JMX) 技术?JConsole 需要 JMX。

If your path is set correctly it should work fine. On windows you go to System Properties -> Advanced Tab -> Environment Variables. Have your JAVA_HOME System variable set to the path of your JDK or JRE and your Path variable with %JAVA_HOME%/bin added somewhere in there. Then all you need to do is go to Start->Run->JConsole. Select the correct Process Name and your done.

如果您的路径设置正确,它应该可以正常工作。在 Windows 上,您转到系统属性 -> 高级选项卡 -> 环境变量。将您的 JAVA_HOME 系统变量设置为您的 JDK 或 JRE 的路径,并将您的 Path 变量与 %JAVA_HOME%/bin 添加在那里的某处。然后你需要做的就是去开始->运行->JConsole。选择正确的进程名称并完成。

Where are you having problems at? I hope this helps.

你在哪里遇到问题?我希望这有帮助。

Edit: Here is the Java Doc's on JConsole.

编辑:这是JConsole上的 Java Doc 。

回答by Bernie Perez

Hmm... I know that WebSphere is kind of hard to configure. Thats part of the reason we used ServiceMix for our ESB. Maybe its not enabled by default in WebSphere and you would have to turn it on in the config somewhere.

嗯...我知道 WebSphere 有点难以配置。这就是我们为 ESB 使用 ServiceMix 的部分原因。也许它在 WebSphere 中默认未启用,您必须在配置中的某处打开它。

回答by Bernie Perez

Websphere 6.1 does not support the JConsole for some reason even though it fully implements the JMS specs. Seems to be a week area at the moment. Your best bet is to look at the Admin client to implement you own console.

Websphere 6.1 出于某种原因不支持 JConsole,即使它完全实现了 JMS 规范。目前似乎是一周的区域。最好的办法是查看 Admin 客户端来实现您自己的控制台。