jmx - 无法通过 Wildfly swarm/thorntail 中的 jmx 访问数据源 mbean
问题描述
我正在尝试为我的 wildfly swarm 组件启用 JMX。我习惯于看到用于各种 wildfly 子系统的多个 mbean,我对数据源 mbean 特别感兴趣。
我在下面粘贴了一个片段,我得到了 jmx 分数并且我已经statistics-enabled
设置为 true。当 thorntail 运行时,我可以通过 JMX 连接到 JVM,但我看不到任何数据源 mbean。是否需要启用其他功能才能显示它们?
该应用程序目前在 swarm 2018.2.0.Final
swarm:
jmx:
expression-expose-model.domain-name: RemoteJMX
jmx-remoting-connector:
use-management-endpoint: true
resolved-expose-model.domain-name: RemoteJMX
show-model: true
datasources:
data-sources:
MyDataSourceName:
driver-name: com.microsoft.sqlserver
connection-url: jdbc:xyz
statistics-enabled: true
解决方案
首先,WildFly Swarm 2018.2.0.Final 已经很老了。与此同时,WildFly Swarm 更名为 Thorntail;您可以通过运行自动迁移mvn io.thorntail:thorntail-maven-plugin:2.5.0.Final:migrate-from-wildfly-swarm
。
然后:如果您连接到 JMX,您是否看到任何 WildFly MBean?我的意思是,只是数据源的问题,还是更普遍的问题?
在引导期间,您应该会看到与 JMX 相关的日志消息,例如JMX not configured for remote access
或JMX configured for remote connector: implicitly using ... interface
。你看到他们中的任何一个吗?
最后,您似乎希望在管理端口上公开 JMX。你对management
分数有依赖性吗?
推荐阅读
- scala - Spark Scala:如何在数组数组中切片数组
- sql - 选择行之间共享的上一个日期的所有值
- sql - SAS 到 TERADATA 时间戳格式
- ruby-on-rails - 如何在 rails docker 镜像中安装新的 gems 而无需重建它
- google-cloud-run - 请求在容器(应用程序)中成功完成后 1 分钟后始终返回 502
- node.js - 在nodejs上使用多核执行功能
- c# - 为 ComboBox 的 DataTable 中的现有项目设置默认值
- android - 当高度为 match_parent 时,回收器查看奇怪的行为
- python-3.x - PyOpenGL 相机/播放器
- boost - boost 1.69.0 和 openmpi 2.1.2 的奇怪问题