Layer7 API Management

Expand all | Collapse all

Auto provisioning a Node in a cluster

  • 1.  Auto provisioning a Node in a cluster

    Posted 05-23-2018 03:59 AM

    Hi Team,

     

    I tried to add a new node to an existing cluster but fiund below error:

     

    [root@explore ~]# cat create-node.properties | /opt/SecureSpan/Gateway/config/bin/ssgconfig-headless create
    Exception configuring gateway: Unexpected error saving configuration 'default already exists'

     

    Please help.

     

    Thanks

    Pratyush



  • 2.  Re: Auto provisioning a Node in a cluster

    Posted 05-23-2018 07:40 PM

    The log, /opt/SecureSpan/Gateway/config/logs/config.log,  might provide more details



  • 3.  Re: Auto provisioning a Node in a cluster

    Posted 05-24-2018 05:52 AM

    I checked the logs, but i am not understanding any point , please help.

     

    [2018/05/24 at 15:20:04] - [WARNING]: Unexpected error saving configuration 'default already exists'
    javax.xml.ws.soap.SOAPFaultException: default already exists
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
    at com.sun.proxy.$Proxy42.createNode(Unknown Source)
    at com.l7tech.gateway.config.client.beans.NodeConfigurationBeanProvider.storeConfiguration(Unknown Source)
    at com.l7tech.gateway.config.client.beans.f.call(Unknown Source)
    at com.l7tech.gateway.config.client.beans.f.call(Unknown Source)
    at com.l7tech.gateway.config.client.beans.HeadlessConfigBean.configure(Unknown Source)
    at com.l7tech.gateway.config.client.HeadlessConfig.a(Unknown Source)
    at com.l7tech.gateway.config.client.HeadlessConfig.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.l7tech.util.ApplicationLauncher.main(Unknown Source)
    Caused by: org.apache.cxf.binding.soap.SoapFault: default already exists
    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84)
    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:51)
    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:40)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:114)
    at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
    at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:812)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1674)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1509)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1417)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:650)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:542)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:473)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:376)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:329)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:95)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
    ... 12 more
    [2018/05/24 at 15:20:04] - [WARNING]: Exception configuring gateway: Unexpected error saving configuration 'default already exists'
    com.l7tech.config.client.ConfigurationException: Exception configuring gateway: Unexpected error saving configuration 'default already exists'
    at com.l7tech.gateway.config.client.beans.HeadlessConfigBean.configure(Unknown Source)
    at com.l7tech.gateway.config.client.HeadlessConfig.a(Unknown Source)
    at com.l7tech.gateway.config.client.HeadlessConfig.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.l7tech.util.ApplicationLauncher.main(Unknown Source)
    Caused by: com.l7tech.config.client.ConfigurationException: Unexpected error saving configuration 'default already exists'
    at com.l7tech.gateway.config.client.beans.NodeConfigurationBeanProvider.storeConfiguration(Unknown Source)
    at com.l7tech.gateway.config.client.beans.f.call(Unknown Source)
    at com.l7tech.gateway.config.client.beans.f.call(Unknown Source)

     

    Thanks

    Pratyush



  • 4.  Re: Auto provisioning a Node in a cluster

    Posted 05-24-2018 09:04 PM

    Did you run headless configure on a fresh install gateway (without any configuration), or a configured gateway?



  • 5.  Re: Auto provisioning a Node in a cluster

    Posted 05-25-2018 08:45 AM

    Hi Zhijun,

     

    Thanks for reply. 

     

    I have configured a gateway in my local machine with failover connection. Below are details:

    -- 2 Gateway hosts i have configured : gateway1.l7tech.com(Primary Gateway Node) and gateway2.l7tech.com (Secondary Gateway Node) 

    -- Then i setup Database Replication Nodes 

    --  Configure slave permission on gateway1 for gateway2 user and vice versa.

    -- Configured replication on secondary gateway node : gateway1 and gateway2

    -- Created primary DB node on gateway1

    Once the replication was done then i ran the below command in root shell :

    1.)

    /opt/SecureSpan/Gateway/config/bin/ssgconfig-headless create -template > create-node.properties

     

    2.) Once the file created then i just edited the properties as per the guide provided by the CA document and now i am stuck with the below error:

     

    [root@gateway1 ~]# cat create-node.properties | /opt/SecureSpan/Gateway/config/bin/ssgconfig-headless create
    Exception configuring gateway: Missing configuration property 'database.pass'. Message: This property is needed when configuring a mysql database.
    [root@gateway1 ~]#

     

    If i will give the database.pass also then it will throw the same error:  Unexpected error saving configuration 'default already exists'.

     

    Please suggest me what steps i need to perform after the database node replication setup.

     

     

    Thanks

    Pratyush



  • 6.  Re: Auto provisioning a Node in a cluster

    Posted 05-25-2018 11:12 PM

    For Precise answer of your questions answer is below:

     

    Q: Did you run headless configure on a fresh install gateway (without any configuration), or a configured gateway?

    A: On Configred gateway.



  • 7.  Re: Auto provisioning a Node in a cluster

    Posted 05-27-2018 11:00 AM

    Hi All,

     

    The issue has been resolved . Thanks much .

     

    Regards

    Praty



  • 8.  Re: Auto provisioning a Node in a cluster

    Posted 05-27-2018 07:33 PM

    Hi pratysin ,

    The headless configuration is for fresh install gateway only(unconfigured gateway), please check the prerequisites,

    Auto-Provision a Gateway Node - CA API Gateway - 9.3 - CA Technologies Documentation 

     

    Regards,

    Mark



  • 9.  Re: Auto provisioning a Node in a cluster

    Posted 05-27-2018 09:44 PM

    Hi Mark,

     

    Please answer the 2 questions below:

    1.) If we need unconfigured gateway, then in pre-requisite why it has been mention like:

     

    -- Database replication should be configured prior to headless configuration, if desired. For more information, see Configuring Cluster Database Replication.

     

    So what un-configured gateway means?

     

    2.) In the document, in Step 2 "Edit the Template File" , what does this means: "Example properties for a database master..."

     

    Thanks much for your patience.

     

    Rgeards

    Praty



  • 10.  Re: Auto provisioning a Node in a cluster

    Posted 05-29-2018 01:52 AM

    More precisely, it's not "unconfigured gateway", it's "unconfigured gateway node". Configuring gateway node is different with configuring OS or database. The headless script is to configure the gateway node silently.

    Your original problem is that the gateway node had been configured, and node.properties already existed.

     

    for stand along gateway, gateway cluster with replicated databases, the node properties are different, that's why we need different property template file, the "Example properties for a database master..." is for gateway node which host the primary database.



  • 11.  Re: Auto provisioning a Node in a cluster

    Posted 05-29-2018 03:47 AM

    Thanks a lot for all the clarifications. It really helped a lot