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

slaves cannot reconnect to a restarted master if RBAC is enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 8.1.0.CR1, 8.1.0.Final
    • 8.0.0.Final
    • Management
    • None
    • Hide

      tested in 8.0.0 final

      How reproducible: always

      Steps to Reproduce:

      Standard security realm, without "local":

      host.xml:
      <security-realm name="ManagementRealm">
      <authentication>
      <properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>
      </authentication>
      <authorization map-groups-to-roles="false">
      <properties path="mgmt-groups.properties" relative-to="jboss.domain.config.dir"/>
      </authorization>
      </security-realm>

      domain.xml:

      <management>
      <access-control provider="rbac">
      <role-mapping>
      <role name="SuperUser">
      <include>
      <user alias="admin" name="admin"/>
      </include>
      </role>
      </role-mapping>
      </access-control>
      </management>

      The user "admin" is added to the mgmt-users.properties

      Start the domain controller and a host controller connected to it (I use two machines for this setup)

      Start CLI, and verify that you can login with the admin user, and that you can get to the slave:

      [domain@orac.usersys.redhat.com:9999 /] /host=slave1/ (hit TAB)
      core-service interface jvm path server-config system-property

      execute: reload --host=master

      after a little while, you will see:

      the CLI loosing connection:
      Failed to establish connection in 10638ms: JBAS012144: Could not connect to http-remoting://orac.usersys.redhat.com:9990. The connection timed out

      the domain controller restarted
      re-login to the CLI, and "/host=" does not list the slave at all

      the slave starts throwing exceptions:
      [Host Controller] 11:52:12,393 INFO [org.jboss.as.host.controller] (domain-connection-threads - 1) JBAS010916: Reconnected to master
      [Host Controller] 11:52:12,521 ERROR [org.jboss.as.controller.management-operation] (domain-connection-threads - 2) JBAS014612: Operation ("apply-remote-domain-model") failed - address: ([]): java.lang.IllegalArgumentException
      [Host Controller] at org.jboss.dmr.ModelValue.getKeys(ModelValue.java:128) [jboss-dmr-1.2.0.Final.jar:1.2.0.Final]
      [Host Controller] at org.jboss.dmr.ModelNode.keys(ModelNode.java:1291) [jboss-dmr-1.2.0.Final.jar:1.2.0.Final]
      [Host Controller] at org.jboss.as.domain.controller.operations.ApplyRemoteMasterDomainModelHandler.makeAffectedServersRestartRequired(ApplyRemoteMasterDomainModelHandler.java:383)
      [Host Controller] at org.jboss.as.domain.controller.operations.ApplyRemoteMasterDomainModelHandler.access$000(ApplyRemoteMasterDomainModelHandler.java:102)
      [Host Controller] at org.jboss.as.domain.controller.operations.ApplyRemoteMasterDomainModelHandler$1.execute(ApplyRemoteMasterDomainModelHandler.java:221)
      [Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:591) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final]
      [Host Controller] at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:469) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final]
      [Host Controller] at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:273) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final]
      [Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:268) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final]
      [Host Controller] at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:272) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final]
      [Host Controller] at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:146) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final]
      [Host Controller] at org.jboss.as.host.controller.RemoteDomainConnectionService.applyRemoteDomainModel(RemoteDomainConnectionService.java:470)
      [Host Controller] at org.jboss.as.host.controller.RemoteDomainConnectionService.access$200(RemoteDomainConnectionService.java:131)
      [Host Controller] at org.jboss.as.host.controller.RemoteDomainConnectionService$1.applyDomainModel(RemoteDomainConnectionService.java:411)
      [Host Controller] at org.jboss.as.host.controller.RemoteDomainConnection.applyDomainModel(RemoteDomainConnection.java:300)
      [Host Controller] at org.jboss.as.host.controller.RemoteDomainConnection$RegisterSubsystemsRequest$1.execute(RemoteDomainConnection.java:452)
      [Host Controller] at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:283) [wildfly-protocol-8.0.0.Final.jar:8.0.0.Final]
      [Host Controller] at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:504) [wildfly-protocol-8.0.0.Final.jar:8.0.0.Final]
      [Host Controller] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
      [Host Controller] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
      [Host Controller] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
      [Host Controller] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]
      [Host Controller]
      [Host Controller] 11:52:12,526 ERROR [org.jboss.as.domain] (domain-connection-threads - 2) JBAS016577: Failed to apply domain-wide configuration from master host controller. Operation outcome: failed. Failure description "JBAS014749: Operation handler failed: null"

      you have to manually stop the slave host controller and start it again. It will then reconnect and work as normal

      Show
      tested in 8.0.0 final How reproducible: always Steps to Reproduce: Standard security realm, without "local": host.xml: <security-realm name="ManagementRealm"> <authentication> <properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/> </authentication> <authorization map-groups-to-roles="false"> <properties path="mgmt-groups.properties" relative-to="jboss.domain.config.dir"/> </authorization> </security-realm> domain.xml: <management> <access-control provider="rbac"> <role-mapping> <role name="SuperUser"> <include> <user alias="admin" name="admin"/> </include> </role> </role-mapping> </access-control> </management> The user "admin" is added to the mgmt-users.properties Start the domain controller and a host controller connected to it (I use two machines for this setup) Start CLI, and verify that you can login with the admin user, and that you can get to the slave: [domain@orac.usersys.redhat.com:9999 /] /host=slave1/ (hit TAB) core-service interface jvm path server-config system-property execute: reload --host=master after a little while, you will see: the CLI loosing connection: Failed to establish connection in 10638ms: JBAS012144: Could not connect to http-remoting://orac.usersys.redhat.com:9990. The connection timed out the domain controller restarted re-login to the CLI, and "/host=" does not list the slave at all the slave starts throwing exceptions: [Host Controller] 11:52:12,393 INFO [org.jboss.as.host.controller] (domain-connection-threads - 1) JBAS010916: Reconnected to master [Host Controller] 11:52:12,521 ERROR [org.jboss.as.controller.management-operation] (domain-connection-threads - 2) JBAS014612: Operation ("apply-remote-domain-model") failed - address: ([]): java.lang.IllegalArgumentException [Host Controller] at org.jboss.dmr.ModelValue.getKeys(ModelValue.java:128) [jboss-dmr-1.2.0.Final.jar:1.2.0.Final] [Host Controller] at org.jboss.dmr.ModelNode.keys(ModelNode.java:1291) [jboss-dmr-1.2.0.Final.jar:1.2.0.Final] [Host Controller] at org.jboss.as.domain.controller.operations.ApplyRemoteMasterDomainModelHandler.makeAffectedServersRestartRequired(ApplyRemoteMasterDomainModelHandler.java:383) [Host Controller] at org.jboss.as.domain.controller.operations.ApplyRemoteMasterDomainModelHandler.access$000(ApplyRemoteMasterDomainModelHandler.java:102) [Host Controller] at org.jboss.as.domain.controller.operations.ApplyRemoteMasterDomainModelHandler$1.execute(ApplyRemoteMasterDomainModelHandler.java:221) [Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:591) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final] [Host Controller] at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:469) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final] [Host Controller] at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:273) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final] [Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:268) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final] [Host Controller] at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:272) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final] [Host Controller] at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:146) [wildfly-controller-8.0.0.Final.jar:8.0.0.Final] [Host Controller] at org.jboss.as.host.controller.RemoteDomainConnectionService.applyRemoteDomainModel(RemoteDomainConnectionService.java:470) [Host Controller] at org.jboss.as.host.controller.RemoteDomainConnectionService.access$200(RemoteDomainConnectionService.java:131) [Host Controller] at org.jboss.as.host.controller.RemoteDomainConnectionService$1.applyDomainModel(RemoteDomainConnectionService.java:411) [Host Controller] at org.jboss.as.host.controller.RemoteDomainConnection.applyDomainModel(RemoteDomainConnection.java:300) [Host Controller] at org.jboss.as.host.controller.RemoteDomainConnection$RegisterSubsystemsRequest$1.execute(RemoteDomainConnection.java:452) [Host Controller] at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:283) [wildfly-protocol-8.0.0.Final.jar:8.0.0.Final] [Host Controller] at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:504) [wildfly-protocol-8.0.0.Final.jar:8.0.0.Final] [Host Controller] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17] [Host Controller] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17] [Host Controller] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17] [Host Controller] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final] [Host Controller] [Host Controller] 11:52:12,526 ERROR [org.jboss.as.domain] (domain-connection-threads - 2) JBAS016577: Failed to apply domain-wide configuration from master host controller. Operation outcome: failed. Failure description "JBAS014749: Operation handler failed: null" you have to manually stop the slave host controller and start it again. It will then reconnect and work as normal

    Description

      Enable RBAC in an Wilfly domain setup. "reload --host=master" and the slaves will no longer be connected to the master

      Attachments

        Activity

          People

            emuckenhuber_jira Emanuel Muckenhuber (Inactive)
            tfonteyn Tom Fonteyne (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: