【问题标题】:Access Camel MBeans in JConsole exposed via WebSphere 7在通过 WebSphere 7 公开的 JConsole 中访问 Camel MBean
【发布时间】:2012-12-29 15:24:48
【问题描述】:

我正在尝试通过 JMX 公开 Apache Camel MBean,以便我可以在 WebSphere Application Server (7.0) 中管理已部署的 Camel 实例。

实际上,我什至不知道这是否与 Camel 有关,但更多的是关于如何从 WebSphere 公开 MBean 的问题。

连接到 JConsole 以及列出 Camel MBean 都很好。但是,当尝试调用任何操作时,我会被拒绝访问。

The user UNAUTHENTICATED (unique ID: unauthenticated) was not granted any of the following required roles: operator, administrator.

似乎其中一些 MBean 可能没有被创建(来自 WAS 日志)。

[2012-12-29 16:17:15:328 CET] 00000010 PlatformMBean W   Failed to activate MBean org.yourname:cell=segotw10099999Node01Cell,name="marshal13",context=segotw10099999/camelContext,type=processors,node=segotw10099999,process=server1

我正在与这样的东西联系:

start %WAS_JDK_HOME%/bin/jconsole -J-Djava.class.path=%WAS_JDK_HOME%\lib\tools.jar;%WAS_JDK_HOME%\lib\jconsole.jar;%WAS_HOME%\runtimes\com.ibm.ws.admin.client_7.0.0.jar service:jmx:iiop://localhost:2809/jndi/JMXConnector

我还尝试将 WAS 中具有管理权限的用户(以及“管理员”组中的用户)填写到 JConsole 中的用户/密码文件中。

这是 WebSphere 的默认配置“RAD”设置,所以没有什么花哨的。但是,我希望稍后能够在具有多个应用程序和 LDAP 用户的生产服务器上使用它。

欢迎大家多多指教!

【问题讨论】:

    标签: websphere apache-camel jmx mbeans


    【解决方案1】:

    问题的原因可能是 JConsole 未正确配置为连接到安全的 WebSphere 实例。虽然连接到禁用了安全性的 WebSphere 实例相对简单,但启用安全性后事情变得更加棘手。如果您想省去弄清楚如何做到这一点的麻烦,您可以按照此处给出的说明进行操作:

    http://code.google.com/p/xm4was/wiki/VisualVMHowTo

    它们适用于 VisualVM,但我想这并不重要。

    【讨论】:

    • 非常感谢。我将尝试使用 Mx4Was,似乎他们遇到了一些我不想重新讨论的问题。 VisualVM 会做得很好。实际上我更喜欢它而不是 JConsole。我只是将处理 MBean 作为在生产中管理 Camel 驱动的应用程序的备份选项。 WAS 作为 App 服务器确实有很多功能,但是要让这些普通的 java 东西不费吹灰之力就很难工作。
    【解决方案2】:

    您使用什么 Camel 版本?您是如何在 Camel 中配置 JMX 的?

    当使用像 WebSphere 这样的服务器时,您很可能需要对其进行一些特殊的配置。我们在 Camel 文档中有一些详细信息:http://camel.apache.org/camel-jmx.html#CamelJMX-WebSphere

    【讨论】:

    • 使用 Camel 的 2.10.3 版本。是的,我确实在该页面上遵循了该示例。有据可查 (<camel:jmxAgent id="agent" createConnector="true" mbeanObjectDomainName="org.yourname" usePlatformMBeanServer="false" mbeanServerDefaultDomain="WebSphere"/>) 但我想除了列出 MBean 之外,还有更多特定于 WebSphere 的东西可以被授权做一些事情。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多