Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-4656

Write Empty ALLOWED_ORIGINS list cause ConfigurationPersistenceException on reload

    Details

    • Steps to Reproduce:
      Hide
      [standalone@localhost:9990 /] /core-service=management/management-interface=http-interface:list-add(name=allowed-origins,value=http://127.0.0.1:8888)
      [standalone@localhost:9990 /] /core-service=management/management-interface=http-interface:list-clear(name=allowed-origins)
      
      Show
      [standalone@localhost:9990 /] /core-service=management/management-interface=http-interface:list-add(name=allowed-origins,value=http://127.0.0.1:8888) [standalone@localhost:9990 /] /core-service=management/management-interface=http-interface:list-clear(name=allowed-origins)
    • Workaround Description:
      Hide

      workaround undefine the attribute

      [standalone@embedded /] /core-service=management/management-interface=http-interface:undefine-attribute(name=allowed-origins)
      
      Show
      workaround undefine the attribute [standalone@embedded /] /core-service=management/management-interface=http-interface:undefine-attribute(name=allowed-origins)

      Description

      First add then clear ALLOWED_ORIGINS list cause ConfigurationPersistenceException at next server reload

      19:25:17,033 ERROR [org.jboss.as.controller] (Controller Boot Thread) 
      
      OPVDX001: Validation error in standalone.xml -----------------------------------
      |
      |  79: </audit-log>
      |  80: <management-interfaces>
      |  81:     <http-interface security-realm="ManagementRealm" allowed-origins="">
      |          ^^^^ '' is an invalid value for parameter allowed-origins. Values must have
      |                 a minimum length of 1 characters
      |
      |  82:         <http-upgrade enabled="true"/>
      |  83:         <socket-binding http="management-http"/>
      |  84:     </http-interface>
      |
      | The primary underlying error message was:
      | > ParseError at [row,col]:[81,13]
      | > Message: "WFLYCTL0113: '' is an invalid value for parameter
      | >   allowed-origins. Values must have a minimum length of 1 characters"
      |
      |-------------------------------------------------------------------------------
      
      19:25:17,034 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
      	at org.jboss.as.controller@10.0.0.Beta6//org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:143)
      	at org.jboss.as.server@10.0.0.Beta6//org.jboss.as.server.ServerService.boot(ServerService.java:385)
      	at org.jboss.as.controller@10.0.0.Beta6//org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:374)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      
      19:25:17,035 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
      

      Because parser doesn't properly parse empty list for configuration like:

              <management-interfaces>
                  <http-interface security-realm="ManagementRealm" allowed-origins="">
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                soul2zimate Chao Wang
                Reporter:
                soul2zimate Chao Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: