2 Replies Latest reply on Oct 11, 2013 7:06 PM by rhusar

    How to config proxy-lists.CLI is not available.

    sndaemon

      pferraro

      aloubyansky

      Hi,i have a question about configuration of mod_cluster .

      I set proxy-list element in domain.xml, which defines the list of httpd servers with which the AS will initially communicate.

       

       

      There is only one httpd server,if i have two httpd servers communicated,how to config?

       

      I tried to use the command-line management interface to set more proxies for each server,it seems working.:

      [domain@10.19.222.52:9990 /] /host=master/server=server-one/subsystem=modcluster:add-proxy(host=10.19.222.50,port=6666) 
      {
          "outcome" => "success",
          "result" => undefined
      }
      [domain@10.19.222.52:9990 /] /host=master/server=server-one/subsystem=modcluster:add-proxy(host=10.19.222.51,port=6666) 
      {
          "outcome" => "success",
          "result" => undefined
      }
      [domain@10.19.222.52:9990 /] /host=master/server=server-one/subsystem=modcluster:list-proxies
      {
          "outcome" => "success",
          "result" => [
              "pre05web02.cnxmxt.com:6666",
              "pre05web01.cnxmxt.com:6666"
          ]
      }
      [domain@10.19.222.52:9990 /] /host=slave/server=server-one/subsystem=modcluster:add-proxy(host=10.19.222.50,port=6666) 
      {
          "outcome" => "success",
          "result" => undefined
      }
      [domain@10.19.222.52:9990 /] /host=slave/server=server-one/subsystem=modcluster:add-proxy(host=10.19.222.51,port=6666) 
      {
          "outcome" => "success",
          "result" => undefined
      }
      [domain@10.19.222.52:9990 /] /host=slave/server=server-one/subsystem=modcluster:list-proxies
      {
          "outcome" => "success",
          "result" => [
              "pre05web02.cnxmxt.com:6666",
              "pre05web01.cnxmxt.com:6666"
          ]
      }
      

      But it was not synchronized to XML file,once restarted appliaction server,it would rollback.

      [domain@10.19.222.52:9990 /] /host=master/server=server-one/subsystem=modcluster:list-proxies
      {
          "outcome" => "success",
          "result" => undefined
      }
      [domain@10.19.222.52:9990 /] /host=slave/server=server-one/subsystem=modcluster:list-proxies
      {
          "outcome" => "success",
          "result" => undefined
      }
      [domain@10.19.222.52:9990 /] 
      

       

      Versions of my softwares as follows:

      wildfly-8.0.0.Beta1

      mod_cluster-1.2.0.Final-linux2-x64-ssl.tar.gz

       

       

      I also tried JBOSS AS7 with CLI,but commands are not available.It has no add-proxy command:

      [domain@10.19.222.52:9999 /] /host=master/server=server-1/subsystem=modcluster:add-proxy(host=10.19.222.51,port=6666) 
      Failed to get the list of the operation properties: "JBAS014753: There is no operation add-proxy registered at address [("subsystem" => "modcluster")]"
      [domain@10.19.222.52:9999 /] /host=master/server=server-1/subsystem=modcluster:read-operation-names
      {
          "outcome" => "success",
          "result" => [
              "list-proxies",
              "read-attribute",
              "read-children-names",
              "read-children-resources",
              "read-children-types",
              "read-operation-description",
              "read-operation-names",
              "read-proxies-configuration",
              "read-proxies-info",
              "read-resource",
              "read-resource-description",
              "refresh",
              "reset"
          ]
      }
      [domain@10.19.222.52:9999 /] 
      


      A set of commands with WildFly8 as follows:

      [domain@10.19.222.52:9990 /]  /host=master/server=server-one/subsystem=modcluster:read-operation-names
      {
          "outcome" => "success",
          "result" => [
              "add-proxy",
              "disable",
              "disable-context",
              "enable",
              "enable-context",
              "list-proxies",
              "read-attribute",
              "read-children-names",
              "read-children-resources",
              "read-children-types",
              "read-operation-description",
              "read-operation-names",
              "read-proxies-configuration",
              "read-proxies-info",
              "read-resource",
              "read-resource-description",
              "refresh",
              "remove-proxy",
              "reset",
              "stop",
              "stop-context",
              "undefine-attribute",
              "write-attribute"
          ]
      }
      [domain@10.19.222.52:9990 /] 
      
        • 1. Re: How to config proxy-lists.CLI is not available.
          sndaemon

          OK.I know how to config one more httpd servers,just use proxy-list element:

           

          <mod-cluster-config advertise-socket="modcluster" proxy-list="10.19.222.50:6666,10.19.222.51:6666">

           

           

          But why using CLI can't  write to the XML files and it rollback when restart.

          • 2. Re: Re: How to config proxy-lists.CLI is not available.
            rhusar

            :add-proxy() is an operation that affects only runtime.

             

            To change the configuration permanently, you need to use :write-attribute() operation:

             

            [standalone@localhost:9990 /] /subsystem=modcluster/mod-cluster-config=configuration/:write-attribute(name=proxy-list,value="localhost:6666")
            {
                "outcome" => "success",
                "response-headers" => {
                    "operation-requires-reload" => true,
                    "process-state" => "reload-required"
                }
            }
            
            

             

            I suppose it's a little confusing. Any suggestion for improvement?