jboss 第0362章:资源'/subsystem=microprofile-metrics-smallrye'所需的功能不可用:

but5z9lq  于 2022-11-08  发布在  其他
关注(0)|答案(2)|浏览(133)

我正在尝试将WildFly 21迁移到24。我在控制台中遇到这些错误。服务器无法运行,它已停止。

14:11:19,550 ERROR [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0362: Capabilities required by resource '/subsystem=microprofile-health-smallrye' are not available:
org.wildfly.extension.health.http-context; There are no known registration points which can provide this capability.
org.wildfly.extension.health.server-probes; There are no known registration points which can provide this capability. 14:11:19,550 ERROR [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0362: Capabilities required by resource '/subsystem=microprofile-metrics-smallrye' are not available:
org.wildfly.extension.metrics.http-context; There are no known registration points which can provide this capability.

我已经向独立的xml添加了度量和健康扩展

<extension module="org.wildfly.extension.microprofile.health-smallrye"/>
  <extension module="org.wildfly.extension.microprofile.metrics-smallrye"/>
     <subsystem xmlns="urn:wildfly:microprofile-health-smallrye:2.0" security-enabled="false" empty-liveness-checks-status="${env.MP_HEALTH_EMPTY_LIVENESS_CHECKS_STATUS:UP}" empty-readiness-checks-status="${env.MP_HEALTH_EMPTY_READINESS_CHECKS_STATUS:UP}"/>   
    <subsystem xmlns="urn:wildfly:microprofile-metrics-smallrye:2.0" security-enabled="false" exposed-subsystems="*" prefix="${wildfly.metrics.prefix:wildfly}"/>

但是对于主配置文件,我使用了不同的xml。我在另一个问题中看到使用jboss.cli来添加这些扩展,但是jboss cli没有连接,因为服务器当前不能运行。您有什么建议或意见吗?

  • 谢谢-谢谢
pgky5nke

pgky5nke1#

您仍然可以在“脱机”模式下使用CLI添加扩展。首先,只需使用以下命令进入CLI会话:

$JBOSS_HOME/bin/jboss-cli.sh

然后,您可以启动嵌入式服务器进行更改。

embed-server

您应该会看到如下所示的内容:

[disconnected /] embed-server 
[standalone@embedded /]

您可以在此处输入CLI命令,例如:

/extension=org.wildfly.extension.microprofile.health-smallrye:add
/extension=org.wildfly.extension.microprofile.metrics-smallrye:add
/subsystem=microprofile-health-smallrye:add(security-enabled=false, empty-liveness-checks-status="${env.MP_HEALTH_EMPTY_LIVENESS_CHECKS_STATUS:UP}", empty-readiness-checks-status="${env.MP_HEALTH_EMPTY_READINESS_CHECKS_STATUS:UP}")

输出应类似于:

[standalone@embedded /] /extension=org.wildfly.extension.microprofile.health-smallrye:add
{"outcome" => "success"}

[standalone@embedded /] /extension=org.wildfly.extension.microprofile.metrics-smallrye:add
{"outcome" => "success"}

[standalone@embedded /] /subsystem=microprofile-health-smallrye:add(security-enabled=false, empty-liveness-checks-status="${env.MP_HEALTH_EMPTY_LIVENESS_CHECKS_STATUS:UP}", empty-readiness-checks-status="${env.MP_HEALTH_EMPTY_READINESS_CHECKS_STATUS:UP}")
{"outcome" => "success"}

然后,您可以退出CLI。

kuuvgm7e

kuuvgm7e2#

我发现WildFly 24不支持microprofile.health-smallrye和microprofile.metrics-smallrye。您应该使用subsystem=metrics,subsystem=health。如果您对此进行了详细研究,请检查here

相关问题