将Java Mission Control连接到Wildfly 16 [英] Connect Java Mission Control to Wildfly 16

查看:90
本文介绍了将Java Mission Control连接到Wildfly 16的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将Java Mission Control(JMC)与 Wildfly 连接起来.16.应用服务器位于Docker上.

I try to connect Java Mission Control (JMC) with Wildfly 16. Application server lays on Docker.

我通过jconsole成功连接到wildfly,要对其进行管理,我遵循了

I successfully connected to wildfly via jconsole, to manage it I followed steps described here.

不幸的是,我没有运气可以通过JMC进行连接.我使用的URL如下所示:

Unfortunately, I have no luck to connect via JMC. The URL which I use looks like this:

service:jmx:remoting-jmx://192.168.99.100:9990

service:jmx:remoting-jmx://192.168.99.100:9990

  • 我尝试将Xbootclasspath设置为jboss-cli-client.jar,如此处,但是有了这些标志,甚至连野蝇都没有开始.
    • I tried to set Xbootclasspath to jboss-cli-client.jar as it was described here, but I just get Unable to connect error.
    • I set the same jars, which are used for jconsole, but still I got Unable to connect.
    • I gave a try to adding flags on container site, as it was shown here, but with these flags, even wildfly haven't started.
    • 然后,我在此处进行硬编码的想法一些jboss类可通过remoting-jmx启用连接.根据wildfly16提供的内容,我更改了jar的版本,然后将其放在jmc.ini中.

      Then, I found here the idea to hardcode some jboss classes to enable connection via remoting-jmx. I changed version of jars, according to these provided by wildfly16 and put it to jmc.ini like this.

      -Xbootclasspath/a:"C:/Program Files/Java/jdk-10.0.2/lib/missioncontrol/dropins/jboss-cli-client.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/remoting-jmx/main/remoting-jmx-3.0.1.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/remoting/main/jboss-remoting-5.0.8.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/logging/main/jboss-logging-3.3.2.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/xnio/main/xnio-api-3.6.5.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/xnio/nio/main/xnio-nio-3.6.5.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/marshalling/main/jboss-marshalling-2.0.6.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/marshalling/river/main/jboss-marshalling-river-2.0.6.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/cli/main/wildfly-cli-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/staxmapper/main/staxmapper-1.3.0.Final;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/protocol/main/wildfly-protocol-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/dmr/main/jboss-dmr-1.5.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/controller-client/main/wildfly-controller-client-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/threads/main/jboss-threads-2.3.3.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.7.Final.jar"
      

      在那之后,最后,我还有另一个错误,是

      After that, finally, I have another error, which is

      无法初始化org.jboss.remotingjmx.RemotingConnector类

      Could not initialize class org.jboss.remotingjmx.RemotingConnector

      我在Xbootclasspath中添加了 remoting-jmx-3.0.1.Final 的依赖项,但是仍然遇到相同的错误.

      I added dependencies of remoting-jmx-3.0.1.Final to Xbootclasspath, but I got still the same error.

      我的问题是,您有什么主意,如何使这种连接有效?也许有人用不同的方式做到了?

      My question is, have you got any idea, how to make this connection works ? Maybe someone have done it in different way ?

      任何建议如何解决这个问题,将是无价之宝?因为我缺乏解决方法的想法.

      Any advices how can i debug this problem, will be priceless? Because I'm lack of ideas how to solve it.

      推荐答案

      1. 在%WILDFLY_HOME%\ bin \ standalone.conf.bat中放在:

      1. In %WILDFLY_HOME%\bin\standalone.conf.bat put:

      设置"JAVA_OPTS =%JAVA_OPTS%-XX:+ FlightRecorder"

      set "JAVA_OPTS=%JAVA_OPTS% -XX:+FlightRecorder"

      在-vmargs下的jmc.ini中

      In jmc.ini below -vmargs put

      -Xbootclasspath/a:C:\%wildfly_home%\ bin \ client \ jboss-cli-client.jar

      -Xbootclasspath/a:C:\%wildfly_home%\bin\client\jboss-cli-client.jar

      (%wildfly_home%当然是不同的,或者只是将jboss-cli-client.jar复制到另一个目录并更正路径)3.运行JMC,然后创建新建连接"-在连接属性"窗格中,按下自定义JMX服务URL"按钮,放入:

      (%wildfly_home% is different of course, or just copy jboss-cli-client.jar to another directory and correct the path) 3. Run JMC, then Create New Connection - in Connection Properties pane push the button "Custom JMX service URL", put:

      service:jmx:http-remoting-jmx://localhost:9990    
      

      在凭据字段中仅输入用户名和密码,就应该为领域管理创建它们(例如,使用%wildfly_home%\ bin \ add-user.bat)希望这对某人有帮助.

      In the credentials fields just put user and password, they should be created for Realm Management (e.g. using %wildfly_home%\bin\add-user.bat) Hope this helps someone.

      这篇关于将Java Mission Control连接到Wildfly 16的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆