简体   繁体   English

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

[英]How can I make “jconsole” work with Websphere 6.1?

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上部署了一些Managed Beans并且我已经设法通过独立客户端调用它们,但是当我尝试使用与标准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. IBM WebSphere 6.1它支持JSR 160 JavaTM管理扩展(JMX)远程API。 Furthermore, it uses the MX4J implementation ( http://mx4j.sourceforge.net ). 此外,它使用MX4J实现( http://mx4j.sourceforge.net )。 But I can't make it works with neither "jconsole" nor "MC4J". 但我无法使它既不适用于“jconsole”也不适用于“MC4J”。

I have the Classpath and the JAVA_HOME correctly setted, so the issue it's not there. 我已经正确设置了Classpath和JAVA_HOME,所以问题就不存在了。

WebSphere's support for JMX is crap. WebSphere对JMX的支持是废话。 Particularly, if you need to connect to any secured JMX beans. 特别是,如果您需要连接到任何安全的JMX bean。 Here's an interesting tidbit, their own implementation of jConsole will not connect to their own JVM. 这是一个有趣的小问题,他们自己的jConsole实现不会连接到自己的JVM。 I have had a PMR open with IBM for over a year to fix this issue, and have gotten nothing but the runaround. 我已经与IBM开了一个PMR超过一年的时间来解决这个问题,除了周围的事情之外什么都没有。 They clearly don't want to fix this issue. 他们显然不想解决这个问题。

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". 我能够调用WebSphere上托管的远程安全JMX bean的唯一方法是使用“WebSphere应用程序客户端”实现客户端。 This is basically a stripped down app server used for stuff like this. 这基本上是一个用于这样的东西的精简app服务器。

Open a PMR with IBM. 与IBM一起开启PMR。 Perhaps if more people report this issue, they will actually fix it. 也许如果有更多人报告此问题,他们实际上会修复它。

Update: You can run your application as a WebSphere Application Client in RAD. 更新:您可以在RAD中将您的应用程序作为WebSphere Application Client运行。 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". 在打开的对话框中,在左侧底部,您将看到“WebSphere v6.1 Application Client”。 I'm not sure how to start and Application Client outside of RAD. 我不确定如何在RAD之外启动和Application Client。

If you want the WebSphere MBeans this one works for me: 如果您想要WebSphere MBean,那么这个适用于我:

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”service:jmx:iiop:// host:port / jndi / JMXConnector

where port = bootstrap port ex: (2809) 其中port = bootstrap port ex:(2809)

Be careful when setting the sas and the ssl props. 设置sas和ssl道具时要小心。

Robert 罗伯特

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\2.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.

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并使用“简单连接”选项卡连接到localhost,端口= 0,没有用户名和密码,它工作正常。

Websphere 6.1 does not support the JConsole for some reason even though it fully implements the JMS specs. 由于某些原因,Websphere 6.1不支持JConsole,即使它完全实现了JMS规范。 Seems to be a week area at the moment. 现在似乎是一周的区域。 Your best bet is to look at the Admin client to implement you own console. 您最好的选择是查看Admin客户端以实现您自己的控制台。

I have successfully connected to ActiveMQ and ServiceMix using the JConsole. 我已经使用JConsole成功连接到ActiveMQ和ServiceMix。 Does WAS 6.1 use Java Management Extension (JMX) technology? WAS 6.1是否使用Java Management Extension(JMX)技术? JMX is required for JConsole. JConsole需要JMX。

If your path is set correctly it should work fine. 如果你的路径设置正确,它应该工作正常。 On windows you go to System Properties -> Advanced Tab -> Environment Variables. 在Windows上,转到“系统属性” - >“高级”选项卡 - >“环境变量”。 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. 将您的JAVA_HOME系统变量设置为JDK或JRE的路径,并在其中的某处添加%JAVA_HOME%/ bin的Path变量。 Then all you need to do is go to Start->Run->JConsole. 然后你需要做的就是去Start-> Run-> JConsole。 Select the correct Process Name and your done. 选择正确的流程名称和完成。

Where are you having problems at? 你在哪里遇到问题? I hope this helps. 我希望这有帮助。

Edit: Here is the Java Doc's on JConsole . 编辑:这是JConsole上的Java Doc。

Hmm... I know that WebSphere is kind of hard to configure. 嗯......我知道WebSphere很难配置。 Thats part of the reason we used ServiceMix for our ESB. 这就是我们为ESB使用ServiceMix的部分原因。 Maybe its not enabled by default in WebSphere and you would have to turn it on in the config somewhere. 也许它在WebSphere中没有默认启用,你必须在配置的某个地方打开它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM