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

Cannot register a secondary host controller after restarting it when admin-policy is fetch-from-domain-controller

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 19.0.0.Final
    • 19.0.0.Beta8
    • Management
    • None
    • Hide
      1. cp -a $WFLY_HOME/domain/ $WFLY_HOME/secondary
      2. $WFLY_HOME/bin/domain.sh --host-config=host-primary.xml
      3. $WFLY_HOME/bin/domain.sh -Djboss.domain.primary.address=localhost -Djboss.domain.base.dir=$WFLY_HOME/secondary/ -Djboss.management.http.port=19990 --host-config=host-secondary.xml
      4. secondary CLI
        1. $WFLY_HOME/bin/jboss-cli.sh -c --controller=localhost:19990
        2. [domain@localhost:19990 /] /host=<secondary>:write-attribute(name=domain-controller.remote.admin-only-policy,value=fetch-from-domain-controller)
        3. [domain@localhost:19990 /] reload --host=<secondary>
      5. domain CLI
        1. $WFLY_HOME/bin/jboss-cli.sh -c
        2. [domain@localhost:9990 /] /host=<secondary>:reload(admin-only=true)
      6. secondary CLI
        1. [domain@localhost:19990 /] shutdown --host=<secondary> --restart=true
      Show
      cp -a $WFLY_HOME/domain/ $WFLY_HOME/secondary $WFLY_HOME/bin/domain.sh --host-config=host-primary.xml $WFLY_HOME/bin/domain.sh -Djboss.domain.primary.address=localhost -Djboss.domain.base.dir=$WFLY_HOME/secondary/ -Djboss.management.http.port=19990 --host-config=host-secondary.xml secondary CLI $WFLY_HOME/bin/jboss-cli.sh -c --controller=localhost:19990 [domain@localhost:19990 /] /host=<secondary>:write-attribute(name=domain-controller.remote.admin-only-policy,value=fetch-from-domain-controller) [domain@localhost:19990 /] reload --host=<secondary> domain CLI $WFLY_HOME/bin/jboss-cli.sh -c [domain@localhost:9990 /] /host=<secondary>:reload(admin-only=true) secondary CLI [domain@localhost:19990 /] shutdown --host=<secondary> --restart=true
    • Hide

      To add the ability to be able to register the secondary host, stop it, reload the Domain Controller, and start the secondary host controller.

      Show
      To add the ability to be able to register the secondary host, stop it, reload the Domain Controller, and start the secondary host controller.

      When the admin-only-policy is fetch from master, the secondary host is unable to be registered on the domain after restarting/reloading it.

      The following error trace is shown when the secondary host is restarted/reloaded:

      [Host Controller] 13:54:35,270 WARN  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0001: Could not connect to remote domain controller remote+http://localhost:9990: 2-$-WFLYDC0015: There is already a registered host named 'yborgess.local'
      [Host Controller] 	at org.jboss.as.host-controller@18.0.4.Final//org.jboss.as.host.controller.RemoteDomainConnection$HostControllerConnectRequest.handleRequest(RemoteDomainConnection.java:380)
      [Host Controller] 	at org.jboss.as.protocol@18.0.4.Final//org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:321)
      [Host Controller] 	at org.jboss.as.protocol@18.0.4.Final//org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleRequest(AbstractMessageHandler.java:286)
      [Host Controller] 	at org.jboss.as.protocol@18.0.4.Final//org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:234)
      [Host Controller] 	at org.jboss.as.protocol@18.0.4.Final//org.jboss.as.protocol.mgmt.ManagementChannelReceiver.handleMessage(ManagementChannelReceiver.java:85)
      [Host Controller] 	at org.jboss.remoting@5.0.23.Final//org.jboss.remoting3.remote.RemoteConnectionChannel.lambda$handleMessageData$3(RemoteConnectionChannel.java:432)
      [Host Controller] 	at org.jboss.remoting@5.0.23.Final//org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:991)
      [Host Controller] 	at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      [Host Controller] 	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
      [Host Controller] 	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      [Host Controller] 	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      [Host Controller] 	at org.jboss.xnio@3.8.5.Final//org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280)
      [Host Controller] 	at java.base/java.lang.Thread.run(Thread.java:834)
      [Host Controller]
      [Host Controller] 13:54:35,271 WARN  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0147: No domain controller discovery options remain.
      [Host Controller] 13:54:35,271 ERROR [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0002: Could not connect to master. Error was: java.lang.IllegalStateException: WFLYHC0120: Tried all domain controller discovery option(s) but unable to connect
      [Host Controller] 13:54:35,272 FATAL [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0178: Aborting with exit code 99
      [Host Controller] 13:54:35,284 INFO  [org.jboss.as] (MSC service thread 1-6) WFLYSRV0050: WildFly Full 26.0.1.Final (WildFly Core 18.0.4.Final) stopped in 9ms
      

      The workaround is to reload the Domain Controller when the secondary Host Controller is stopped.

            mpetrov@redhat.com Michal Petrov
            yborgess1@redhat.com Yeray Borges Santana
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: