【问题标题】:Monitor remote WSO2 ESB using JMX使用 JMX 监控远程 WSO2 ESB
【发布时间】:2014-04-26 11:44:15
【问题描述】:

我想使用 Jconsole 和 JMX 监控我的 ESB。我可以从本地主机连接到 JMX 服务器,但是为了从远程机器连接到我的 esb,我可以建立连接。 我在 carbon.xml 文件中使用 WSO2 ESB 4.6 和我的 JMX configuration

<JMX>
        <!--The port RMI registry is exposed-->
        <RMIRegistryPort>9999</RMIRegistryPort>
        <!--The port RMI server should be exposed-->
        <RMIServerPort>11111</RMIServerPort>
</JMX>

【问题讨论】:

    标签: wso2 wso2esb jmx


    【解决方案1】:

    我发现了问题,我的 rmi 服务在主机 ip 上运行,它是“127.0.0.1”。要远程连接到 jvm,我必须将外部 ip 绑定到主机名。要在 unix 系统中执行此操作,请使用命令 hostname 获取主机名的名称。然后检查分配给主机名的 ip,找出这个使用 ping $(hostname) 你会看到系统正在 ping 主机名的 ip。 如果您的主机 IP 是默认 127.0.0.1 并且您想更改它,只需以超级用户身份编辑文件 /etc/hosts。重新启动 rmi 服务后,您可以从远程机器访问它。

    【讨论】:

      【解决方案2】:

      查看 wso2carbon.log,您会发现类似 INFO {org.wso2.carbon.core.init.JMXServerManager} - JMX Service URL : service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi {org.wso2.carbon.core.init.JMXServerManager} 的条目

      使用给定的 URL 从远程 JMX 客户端(例如 JVisualVM)连接到 carbon 服务器,不要忘记定义安全凭证(默认用户名/密码为 admin/admin)

      【讨论】:

      • 我这样做了。我将 url "service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi" 复制到 jConsole 并输入 admin/admin 作为凭据,但它没有连接到服务器!
      • 您已将该 URL 中的两个“localhost”替换为您的主机名?
      • 我确实做到了。我用“192.168.0.97”替换了“localhost”
      • 谢谢,我找到了问题。并补充说作为答案。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-07-16
      • 2017-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-14
      • 1970-01-01
      相关资源
      最近更新 更多