[JBoss JIRA] (WFCORE-1578) Better check of names of existing resources when adding '{local|remote-destination-outbound-socket-binding'
by Chao Wang (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1578?page=com.atlassian.jira.plugi... ]
Chao Wang moved JBEAP-4878 to WFCORE-1578:
------------------------------------------
Project: WildFly Core (was: JBoss Enterprise Application Platform)
Key: WFCORE-1578 (was: JBEAP-4878)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Domain Management
(was: CLI)
Target Release: (was: 7.backlog.GA)
Affects Version/s: 3.0.0.Alpha1
(was: 7.0.0.GA)
> Better check of names of existing resources when adding '{local|remote-destination-outbound-socket-binding'
> -----------------------------------------------------------------------------------------------------------
>
> Key: WFCORE-1578
> URL: https://issues.jboss.org/browse/WFCORE-1578
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 3.0.0.Alpha1
> Reporter: Chao Wang
> Assignee: Chao Wang
> Priority: Minor
> Original Estimate: 3 days
> Remaining Estimate: 3 days
>
> Lets have some {{/socket-binding-group=standard-sockets/socket-binding}} with particular name. Then when I create some {{/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding}} or {{/socket-binding-group=standard-sockets/local-destination-outbound-socket-binding}} using same name as of already existing {{socket-binding}} resource, {{add}} operation is successful but when I perform server reload, it crashes as it is not able to parse configuration. See:
> # Start EAP and log to CLI
> # create your own {{socket-binding}} resource and {{\{remote|local\}-destination-outbound-socket-binding}} resource with same names and perform reload
> {code}
> /socket-binding-group=standard-sockets/socket-binding=myBinding:add()
> /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=myBinding:add(host=localhost,port=8765)
> or
> /socket-binding-group=standard-sockets/local-destination-outbound-socket-binding=myBinding:add(socket-binding-ref=http)
> reload
> {code}
> # server crashes with following stacktrace in console log:
> {code}
> 17:31:40,447 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0019: Stopped Driver service with driver-name = h2
> 17:31:40,453 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0008: Undertow HTTP listener default suspending
> 17:31:40,454 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0007: Undertow HTTP listener default stopped, was bound to 127.0.0.1:8080
> 17:31:40,454 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0004: Undertow 1.3.21.Final-redhat-1 stopping
> 17:31:40,458 INFO [org.jboss.as.mail.extension] (MSC service thread 1-7) WFLYMAIL0002: Unbound mail session [java:jboss/mail/Default]
> 17:31:40,461 INFO [org.jboss.as] (MSC service thread 1-5) WFLYSRV0050: JBoss EAP 7.0.0.GA (WildFly Core 2.1.2.Final-redhat-1) stopped in 22ms
> 17:31:40,461 INFO [org.jboss.as] (MSC service thread 1-5) WFLYSRV0049: JBoss EAP 7.0.0.GA (WildFly Core 2.1.2.Final-redhat-1) starting
> 17:31:40,489 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.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
> at org.jboss.as.server.ServerService.boot(ServerService.java:356)
> at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[410,9]
> Message: WFLYCTL0042: A socket-binding or a outbound-socket-binding myBinding already declared has already been declared in socket-binding-group standard-sockets
> at org.jboss.as.server.parsing.StandaloneXml_4.parseSocketBindingGroup(StandaloneXml_4.java:518)
> at org.jboss.as.server.parsing.StandaloneXml_4.readServerElement(StandaloneXml_4.java:254)
> at org.jboss.as.server.parsing.StandaloneXml_4.readElement(StandaloneXml_4.java:141)
> at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:103)
> at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:49)
> at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
> at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
> at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
> ... 3 more
> 17:31:40,490 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
> 17:31:40,491 INFO [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested.
> 17:31:40,496 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0050: JBoss EAP 7.0.0.GA (WildFly Core 2.1.2.Final-redhat-1) stopped in 3ms
> {code}
> After this occurs, one needs to fix {{./standalone/configuration/standalone.xml}} manually by removing duplicate resources.
> If there is a problem for those resources to have same names I would welcome that names are checked during the {{add}} operation already regarding to all resources in {{socket-binding}} and {{\{remote|local\}-destination-outbound-socket-binding}}.
> Note: not sure whether CLI component is appropriate, please change if there is better component for this.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (WFCORE-1577) After a full-replace-deployment operation a server on a hosts subsystem model is empty
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1577?page=com.atlassian.jira.plugi... ]
Brian Stansberry commented on WFCORE-1577:
------------------------------------------
The problem is in DeploymentHandlerUtil.undeploy, which is written as if it is only called from an op targeting a deployment resource, but DeploymentFullReplaceHandler invokes it from the root resource. It takes the resource at the op address and removes all the subsystem children.
This fails if neither the server-group/deployment add op nor the full-replace-deployment op have the "enabled" param defined, or if the former has it defined as "true" and the latter as "false". Those are the combinations that result in DeploymentHandlerUtil.undeploy being invoked.
> After a full-replace-deployment operation a server on a hosts subsystem model is empty
> --------------------------------------------------------------------------------------
>
> Key: WFCORE-1577
> URL: https://issues.jboss.org/browse/WFCORE-1577
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Reporter: James Perkins
> Assignee: Brian Stansberry
> Priority: Blocker
> Attachments: WFCORE-1577-test-case.patch
>
>
> Executing a {{full-replace-deployment}} operation on a deployment deployed to a server in a managed domain will result a servers subsystem model to be an empty list.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (WFCORE-1577) After a full-replace-deployment operation a server on a hosts subsystem model is empty
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1577?page=com.atlassian.jira.plugi... ]
Brian Stansberry commented on WFCORE-1577:
------------------------------------------
The param to the server-group/deployment add op and the full-replace-deployment op is "enabled" not "enable". Fix that in your test and it passes.
That doesn't mean there isn't a bug here, but it may fix your plugin if that's where you are hitting this.
> After a full-replace-deployment operation a server on a hosts subsystem model is empty
> --------------------------------------------------------------------------------------
>
> Key: WFCORE-1577
> URL: https://issues.jboss.org/browse/WFCORE-1577
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Reporter: James Perkins
> Assignee: Brian Stansberry
> Attachments: WFCORE-1577-test-case.patch
>
>
> Executing a {{full-replace-deployment}} operation on a deployment deployed to a server in a managed domain will result a servers subsystem model to be an empty list.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months