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

Server does not resolve console-enabled attribute expression in http management interface

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Migrated to another ITS
    • None
    • None
    • Server
    • None
    • Hide
      /core-service=management/management-interface=http-interface:write-attribute(name=console-enabled, value=${my.var:true})
      
      Show
      /core-service=management/management- interface =http- interface :write-attribute(name=console-enabled, value=${my. var : true })
    • ---
    • ---

    Description

      Http management interface has an attribute console-enabled which allows expression:

      [standalone@localhost:9990 /] /core-service=management/management-interface=http-interface:read-resource-description
      ...
       "console-enabled" => {
                      "type" => BOOLEAN,
                      "description" => "Flag that indicates admin console is enabled",
                      "expressions-allowed" => true,
                      "required" => false,
                      "nillable" => true,
                      "default" => true,
                      "access-type" => "read-write",
                      "storage" => "configuration",
                      "restart-required" => "all-services"
                  },
      
      ...

      However I am unable to set it:

      [standalone@localhost:9990 /] /core-service=management/management-interface=http-interface:write-attribute(name=console-enabled, value=${my.var:true})
      {
          "outcome" => "failed",
          "failure-description" => "WFLYCTL0086: Failed to persist configuration change: WFLYCTL0084: Failed to marshal configuration",
          "rolled-back" => true
      }
      

      WildFly stacktrace:

      17:36:35,971 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0008: Failed to persist configuration change: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0084: Failed to marshal configuration
      	at org.jboss.as.controller.persistence.AbstractFilePersistenceResource.<init>(AbstractFilePersistenceResource.java:53)
      	at org.jboss.as.controller.persistence.ConfigurationFilePersistenceResource.<init>(ConfigurationFilePersistenceResource.java:46)
      	at org.jboss.as.controller.persistence.BackupXmlConfigurationPersister.store(BackupXmlConfigurationPersister.java:120)
      	at org.jboss.as.controller.ModelControllerImpl.writeModel(ModelControllerImpl.java:728)
      	at org.jboss.as.controller.OperationContextImpl.createPersistenceResource(OperationContextImpl.java:535)
      	at org.jboss.as.controller.AbstractOperationContext.executeDoneStage(AbstractOperationContext.java:821)
      	at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:770)
      	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:468)
      	at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1415)
      	at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:431)
      	at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:248)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:304)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:270)
      	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:248)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:240)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$400(ModelControllerClientOperationHandler.java:138)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:162)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:158)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:328)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:285)
      	at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
      	at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:158)
      	at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
      	at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at java.lang.Thread.run(Thread.java:748)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:513)
      Caused by: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0089: Failed to write configuration
      	at org.jboss.as.controller.persistence.AbstractConfigurationPersister.marshallAsXml(AbstractConfigurationPersister.java:112)
      	at org.jboss.as.controller.persistence.AbstractFilePersistenceResource.<init>(AbstractFilePersistenceResource.java:46)
      	... 30 more
      Caused by: java.lang.IllegalArgumentException
      	at org.jboss.dmr.ModelValue.asBoolean(ModelValue.java:73)
      	at org.jboss.dmr.ModelNode.asBoolean(ModelNode.java:337)
      	at org.jboss.as.server.parsing.StandaloneXml_15.writeHttpManagementProtocol(StandaloneXml_15.java:975)
      	at org.jboss.as.domain.management.parsing.ManagementXml_5.writeManagementInterfaces(ManagementXml_5.java:2458)
      	at org.jboss.as.domain.management.parsing.ManagementXml_5.writeManagement(ManagementXml_5.java:2020)
      	at org.jboss.as.server.parsing.StandaloneXml_15.writeContent(StandaloneXml_15.java:757)
      	at org.jboss.as.server.parsing.StandaloneXml.writeContent(StandaloneXml.java:148)
      	at org.jboss.as.server.parsing.StandaloneXml.writeContent(StandaloneXml.java:52)
      	at org.jboss.staxmapper.XMLMapperImpl.doDeparse(XMLMapperImpl.java:96)
      	at org.jboss.staxmapper.XMLMapperImpl.deparseDocument(XMLMapperImpl.java:91)
      	at org.jboss.as.controller.persistence.AbstractConfigurationPersister.marshallAsXml(AbstractConfigurationPersister.java:106)
      	... 31 more
      
      

      Attachments

        Issue Links

          Activity

            People

              istraka@redhat.com Ivan Straka
              istraka@redhat.com Ivan Straka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: