Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-11933

Error when accessing metrics with RBAC enabled

XMLWordPrintable

    • Hide

      1. Install fresh Wildfly 16.0.0.Final Java EE Full & Web Distribution
      2. Access metrics in localhost:9990/metrics. OK
      3. Enable RBAC with jboss-cli: /core-service=management/access=authorization:write-attribute(name=provider,value=rbac)
      4. Access metrics in localhost:9990/metrics. ERROR

      Show
      1. Install fresh Wildfly 16.0.0.Final Java EE Full & Web Distribution 2. Access metrics in localhost:9990/metrics. OK 3. Enable RBAC with jboss-cli: /core-service=management/access=authorization:write-attribute(name=provider,value=rbac) 4. Access metrics in localhost:9990/metrics. ERROR

      Accordingly to https://docs.wildfly.org/17/Admin_Guide.html#http-endpoint-2 and https://wildscribe.github.io/WildFly/17.0/subsystem/microprofile-metrics-smallrye/index.html, access to metrics endpoint is controlled by the security-enabled attribute.

      When this attribute is set to false, there is an Exception when metrics are accessed. By default, this attribute is set to false on standalone.xml config.

      Please, refer to steps to reproduce. This error occurs only when RBAC are enabled.

      When RBAC is enabled for management in Wildfly, metrics throws exception:

      java.lang.IllegalStateException: WFLYMETRICS0003: Unable to read attribute XAForgetAverageTime on [
      ("subsystem" => "datasources"),
      ("data-source" => "ExampleDS"),
      ("statistics" => "pool")
      ]: "WFLYCTL0216: Management resource '[
      (\"subsystem\" => \"datasources\"),
      (\"data-source\" => \"ExampleDS\"),
      (\"statistics\" => \"pool\")
      ]' not found".

            jaslee@redhat.com Jason Lee
            ceweiler Claudio Weiler
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: