4 Replies Latest reply on Aug 20, 2014 4:34 AM by Rituraj Sinha

    Mod_cluster Enable , Disable not working with wildfly-8.1.0

    Rituraj Sinha Novice

      Hi

      we are trying to do rolling deployment and we want to disable the nodes in the server group or cluster so that

      any no request should come to these nodes ...but after disabling the context from the modcluster url

      we are able to create new request on the same node ....

      also we are using domain configuration. ..

      i Tried to disable it from cli command as well...but cant find from where/how can i do it?

      can someone give me the cli command to disable/enable context in wildfly-8.1.0version

      also modcluster version is 1.2.6.Final...

       

      thanks

      Rituraj

        • 1. Re: Mod_cluster Enable , Disable not working with wildfly-8.1.0
          Radoslav Husar Master

          There are 2 ways, you can use the CLI or mod_cluster console:

           

          Using CLI:

           

          [domain@localhost:9990 /] /host=master/server=server-one/subsystem=modcluster/:disable-context(virtualhost=default-host,context=/clusterbench)
          {
              "outcome" => "success",
              "result" => undefined
          }
          

           

          Open modcluster manager console and disable the context you want to disable, your URL will look something like this:

           

          http://localhost:9090/mod_cluster_manager?nonce=edb0ea1d-ee14-4f55-bb66-0f52c642b090&Cmd=DISABLE-APP&Range=NODE&JVMRoute=…

           

          Also make sure you are testing this correctly: disabling a context will not create new sessions on that context, but for existing sessions there will be no change so that you can continuously drain them until there are no requests on that context.

          • 2. Re: Re: Mod_cluster Enable , Disable not working with wildfly-8.1.0
            Radoslav Husar Master

            BTW Also tried on WildFly 8 and 9 (master) and behaves as expected:

             

            [domain@localhost:9990 /] /host=master/server=server-one/subsystem=modcluster:disable
            {
                "outcome" => "success",
                "result" => undefined
            }
            [domain@localhost:9990 /] /host=master/server=server-two/subsystem=modcluster:disable
            {
                "outcome" => "success",
                "result" => undefined
            }
            
            

             

            console shows:


            mod_cluster/1.3.1.dev
            
            
            Auto Refresh show DUMP output show INFO output
            Node master:server-two (ajp://localhost:8159):
            
            
            Enable Contexts Disable Contexts Stop Contexts
            Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 2,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 53
            Virtual Host 1:
            
            
            Contexts:
            
            
            /clusterbench-passivating, Status: DISABLED Request: 0 Enable  Stop
            /clusterbench, Status: DISABLED Request: 0 Enable  Stop
            Aliases:
            
            
            localhost
            default-host
            Node master:server-one (ajp://localhost:8009):
            
            
            Enable Contexts Disable Contexts Stop Contexts
            Balancer: mycluster,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 2,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 56
            Virtual Host 1:
            
            
            Contexts:
            
            
            /clusterbench-passivating, Status: DISABLED Request: 0 Enable  Stop
            /clusterbench, Status: DISABLED Request: 0 Enable  Stop
            Aliases:
            
            
            localhost
            default-host
            
            
            • 3. Re: Mod_cluster Enable , Disable not working with wildfly-8.1.0
              Rituraj Sinha Novice

              Thanks Rado for the solution!!

               

              1) although didn't find a way to get the "status"(disable,enable,stop) of context through cli command ....we are working on rolling deployment script and it is required for us to know the status of context before running disable enable or stop start....

               

               

              2) need your suggestion for what should be used during rolling deployment....we want to use the stop-context instead of disable-context as it is in continuation with draining the session...but we want to get rid of draining but when we use stop-context we are seeing

              [Server:node1] 02:20:56,172 WARN  [org.jboss.modcluster] (ServerService Thread Pool -- 103) MODCLUSTER000025: Failed to drain 6 remaining active sessions from default-host:/partsdirect within 10.0 seconds

               

              and in the web-tier logs we see

              [20/Aug/2014:02:23:59 -0500]"DISABLE-APP / HTTP/1.1"    200

               

              Thanks

              Rituraj

              • 4. Re: Mod_cluster Enable , Disable not working with wildfly-8.1.0
                Rituraj Sinha Novice

                Hi Rado,

                 

                please correct my understanding


                do we really need to explicitly take out the app out of rotation so that no request should come to it during deployment in domain mode ....i feel its not required

                as undeploying an app automatically goes through all the life cycle which we are trying to achieve as

                -   -   [20/Aug/2014:02:53:45 -0500]"DISABLE-APP / HTTP/1.1"    200 -   "-"  "ClusterListener/1.0"106 "-" "-" "-" "-" "-"
                -   -   [20/Aug/2014:02:53:45 -0500]"DISABLE-APP / HTTP/1.1"    200 -   "-"  "ClusterListener/1.0"76  "-" "-" "-" "-" "-"
                -   -   [20/Aug/2014:02:53:45 -0500]"STOP-APP / HTTP/1.1"   200 89  "-" "ClusterListener/1.0" 94  "-" "-" "-" "-" "-"
                -   -   [20/Aug/2014:02:53:45 -0500]"REMOVE-APP / HTTP/1.1" 200 -   "-" "ClusterListener/1.0" 92  "-" "-" "-" "-" "-"
                -   -   [20/Aug/2014:02:53:45 -0500]"STOP-APP / HTTP/1.1"   200 93  "-" "ClusterListener/1.0" 117 "-" "-" "-" "-" "-"
                -   -   [20/Aug/2014:02:53:45 -0500]"REMOVE-APP / HTTP/1.1" 200 -   "-" "ClusterListener/1.0" 135 "-" "-" "-" "-" "-"

                 

                so as per my observation this is being handled by the modcluster itself and we need not do anything explicitly....

                we are just worried about the session which are active during deployment ....

                 

                Thanks

                RIturaj