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

ConfigurationPersistenceException when persisting mod_cluster subsystem's "proxies" attribute

XMLWordPrintable

      If one takes a vanilla EAP 7 DR build and starts it with ./standalone.sh -c standalone.ha, i.e. with mod_cluster subsystem loaded, but without any static proxies configuration directives, the server registers with mod_cluster load balancers and accepts hot deployments without any error.

      If one sets a static proxy configuration, e.g.:

      +++
      <mod-cluster-config advertise-socket="modcluster" connector="ajp" proxies="my-proxy-one">
      +++
      <outbound-socket-binding name="my-proxy-one">
          <remote-destination host="10.40.4.50" port="6666"/>
      </outbound-socket-binding>
      +++
      

      then the server processes hot deployments only as long as it's not registered with any mod_cluster load balancer. As soon as it registers with a load balancer, any hot deployment causes the following exception:

      14:39:13,475 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found simplecontext.war in deployment directory. To trigger deployment create a file called simplecontext.war.dodeploy
      14:39:13,520 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of "simplecontext.war" (runtime-name: "simplecontext.war")
      14:39:14,028 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0021: Registered web context: /simplecontext
      14:39:14,080 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) 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:49)
          at org.jboss.as.controller.persistence.ConfigurationFilePersistenceResource.<init>(ConfigurationFilePersistenceResource.java:45)
          at org.jboss.as.controller.persistence.BackupXmlConfigurationPersister.store(BackupXmlConfigurationPersister.java:109)
          at org.jboss.as.controller.ModelControllerImpl.writeModel(ModelControllerImpl.java:738)
          at org.jboss.as.controller.OperationContextImpl.createPersistenceResource(OperationContextImpl.java:403)
          at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:643)
          at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:354)
          at org.jboss.as.controller.AbstractOperationContext.finishStep(AbstractOperationContext.java:918)
          at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:885)
          at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:601)
          at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:354)
          at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:330)
          at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1170)
          at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:363)
          at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:219)
          at org.jboss.as.controller.ModelControllerImpl$3$1$1.run(ModelControllerImpl.java:716)
          at org.jboss.as.controller.ModelControllerImpl$3$1$1.run(ModelControllerImpl.java:710)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.jboss.as.controller.ModelControllerImpl$3$1.run(ModelControllerImpl.java:710)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
          at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      Caused by: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0089: Failed to write configuration
          at org.jboss.as.controller.persistence.AbstractConfigurationPersister.marshallAsXml(AbstractConfigurationPersister.java:100)
          at org.jboss.as.controller.persistence.AbstractFilePersistenceResource.<init>(AbstractFilePersistenceResource.java:42)
          ... 26 more
      Caused by: java.lang.reflect.UndeclaredThrowableException
          at org.jboss.staxmapper.FormattingXMLStreamWriter$4.run(FormattingXMLStreamWriter.java:249)
          at org.jboss.staxmapper.FormattingXMLStreamWriter.runAttrQueue(FormattingXMLStreamWriter.java:221)
          at org.jboss.staxmapper.FormattingXMLStreamWriter.writeStartElement(FormattingXMLStreamWriter.java:96)
          at org.wildfly.extension.mod_cluster.ModClusterSubsystemXMLWriter.writeDynamicLoadProvider(ModClusterSubsystemXMLWriter.java:104)
          at org.wildfly.extension.mod_cluster.ModClusterSubsystemXMLWriter.writeModClusterConfig(ModClusterSubsystemXMLWriter.java:69)
          at org.wildfly.extension.mod_cluster.ModClusterSubsystemXMLWriter.writeContent(ModClusterSubsystemXMLWriter.java:51)
          at org.wildfly.extension.mod_cluster.ModClusterSubsystemXMLWriter.writeContent(ModClusterSubsystemXMLWriter.java:42)
          at org.jboss.as.server.parsing.StandaloneXml_4.writeServerProfile(StandaloneXml_4.java:695)
          at org.jboss.as.server.parsing.StandaloneXml_4.writeContent(StandaloneXml_4.java:613)
          at org.jboss.as.server.parsing.StandaloneXml.writeContent(StandaloneXml.java:77)
          at org.jboss.as.server.parsing.StandaloneXml.writeContent(StandaloneXml.java:47)
          at org.jboss.staxmapper.XMLMapperImpl.doDeparse(XMLMapperImpl.java:88)
          at org.jboss.staxmapper.XMLMapperImpl.deparseDocument(XMLMapperImpl.java:83)
          at org.jboss.as.controller.persistence.AbstractConfigurationPersister.marshallAsXml(AbstractConfigurationPersister.java:94)
          ... 27 more
      Caused by: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
          at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1537)
          at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1566)
          at com.ctc.wstx.sw.BaseNsStreamWriter.writeAttribute(BaseNsStreamWriter.java:226)
          at org.jboss.staxmapper.FormattingXMLStreamWriter$4.run(FormattingXMLStreamWriter.java:247)
          ... 40 more
      
      14:39:14,085 ERROR [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0021: Deploy of deployment "simplecontext.war" was rolled back with the following failure message: "WFLYCTL0086: Failed to persist configuration change: WFLYCTL0084: Failed to marshal configuration"
      14:39:14,095 INFO  [org.jboss.modcluster] (MSC service thread 1-3) MODCLUSTER000021: All pending requests drained from default-host:/simplecontext in 0.0 seconds
      14:39:14,098 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0022: Unregistered web context: /simplecontext
      14:39:14,142 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-8) HV000001: Hibernate Validator 5.1.3.Final
      14:39:14,177 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment simplecontext.war (runtime-name: simplecontext.war) in 92ms
      

      The problem is IMHO related to the new configuration attribute WFLY-457.

      Note that this issue affects hot deployments only. If the server starts with deployments already present, no exception is thrown and everything works as expected. I find this issue being of critical severity, because it breaks core functionality of the application server – hot deployments.

            rhn-engineering-rhusar Radoslav Husar
            mbabacek1@redhat.com Karm Karm
            Karm Karm Karm Karm
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: