1

I am trying to migrate WildFly 21 to 24 . I have these errors in the console. Server can not running it is stopped.

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.

I have added metrics and health extensions to standalone xmls

 <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}"/>
 

but for main configuration file I am using a different xml. I saw in another questions using jboss.cli to add these extensions but jboss cli is not connecting because server can not running currently. Do you have any suggestions or advices ?

Thanks.

emresahin
  • 33
  • 11

2 Answers2

1

You can still use CLI in "offline" mode to add the extension. First simply enter a CLI session with:

$JBOSS_HOME/bin/jboss-cli.sh

Then you can start the embedded server to make your changes.

embed-server

You should end up seeing something like this:

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

From here you can enter CLI commands like:

/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}")

The output should look something like:

[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"}

Then you can just exit CLI.

James R. Perkins
  • 16,800
  • 44
  • 60
  • Hi James, thanks for the answer. I did manage work offline but jboss cli alter the standalone.xml file exactly the same way i have altered manually. So it did not make any difference. Still getting WFLYCTL0362: Capabilities required by resource '/subsystem=microprofile-metrics-smallrye' are not available: exception. If you have any idea let me know . Thanks – emresahin Jul 01 '22 at 08:23
  • Exceptions coming from org.wildfly.extension.health.server-probes; org.wildfly.extension.metrics.http-context; should i declare ports or something in the file ? – emresahin Jul 01 '22 at 08:40
1

I found out microprofile.health-smallrye and microprofile.metrics-smallrye are not supported in WildFly 24. You should use subsystem=metrics,subsystem=health. If you want to look into this in detail, check here.

emresahin
  • 33
  • 11