gpt4 book ai didi

java - JMX 参数正确传递但无法使用 jconsole 连接

转载 作者:行者123 更新时间:2023-12-01 09:47:23 29 4
gpt4 key购买 nike

我已经在java程序中传递了以下jmx参数并将其部署在某个远程计算机上。

-Dcom.sun.management.jmxremote.port=5001 
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false

当我尝试在 jconsole 中使用 host:port 连接到主机时,它会将我重定向到 InsecureConnection,然后无法连接。

最佳答案

添加

-Dcom.sun.management.jmxremote.host=<hostname>  
-Dcom.sun.management.jmxremote.rmi.port=<pornNum>
<小时/>

当您仅指定-Dcom.sun.management.jmxremote.port时,它将rmi注册表绑定(bind)到该端口。该注册表包含远程对象,您应该添加 -Dcom.sun.management.jmxremote.rmi.port 来指定绑定(bind)该远程对象的位置。否则会使用随机端口,如果有防火墙就不好了。您可以查看 sun.management.jmxremote.ConnectorBootstrap#startRemoteConnectorServer 了解更多详细信息

关于java - JMX 参数正确传递但无法使用 jconsole 连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37877927/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com