0
votes

I have setup a distributed, clustered WSO2 API Manager 1.6.0 environment with SVN-based Deployment Synchronizing. The SVN Jar will execute upon start-up, picking up any new additions to the SVN respository.

TID: [0] [AM] [2014-10-30 14:52:57,790]  INFO {org.apache.synapse.rest.API} -  Initializing API: admin--TestAPI_Phil:v0.1 {org.apache.synapse.rest.API}
TID: [0] [AM] [2014-10-30 14:52:57,798]  INFO {org.apache.synapse.deployers.APIDeployer} -  API named 'admin--TestAPI_Phil:v0.1' has been deployed from file : /opt/wso2am-1.6.0/repository/deployment/server/synapse-configs/default/api/admin--TestAPI_Phil_v0.1.xml {org.apache.synapse.deployers.APIDeployer}

However, after a few minutes, and the svnClientBundle jar performs its job, it goes to sleep, and will not reactivate upon update, even though the Store/Publisher says that the Gateways have been updated:

TID: [0] [AM] [2014-10-30 15:21:06,965]  INFO {org.apache.synapse.rest.API} -  Initializing API: admin--TestAPI-2:v0.1 {org.apache.synapse.rest.API}
TID: [0] [AM] [2014-10-30 15:21:20,115]  INFO {org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask} -  Sent [SynchronizeRepositoryRequest{tenantId=-1234, tenantDomain='carbon.super', messageId=a3e77858-985d-4616-9b50-d6c9b47c0bf2}] {org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask}

The Gateways do not pick up the new API being pushed out. How would I go about making WSO2 realize there is an update, or script using the svnClientBundle-1.0.0.jar to periodically check the SVN repository? Should I make a BeanShell script?

GitHub Gists with the full log output are located here: https://gist.github.com/predatorian3/024193918330af2140bb

I have also followed hte documentation:
https://docs.wso2.com/display/AM140/SVN-Based+Deployment+Synchronizer
https://docs.wso2.com/display/CLUSTER420/SVN-based+Deployment+Synchronizer
https://docs.wso2.com/display/CLUSTER420/Clustering+API+Manager#ClusteringAPIManager-Installingandconfiguringthedatabases

The Documentation for the SVN-based Deployment Sync and Clustering API manager conflict and say that the svnClientBundle-1.0.0.jar need to be in different places.

1

1 Answers

1
votes

As you have seen from the docs [1], the svnClientBundle-1.0.0.jar must always be copied to the <PRODUCT_HOME>/repository/components/dropins directory.

The Deployment Synchronizer depends on the cluster messages and therefore you need to make sure that the product cluster is working properly. As you have observed, the server will checkout artifacts at the server start up. After that the artifacts are only updated when the server gets a cluster message.

The product cluster should be in same domain as mentioned in [2]. We recommend to use wka membership scheme.

Please start your wka members first and then start other servers. You must see "Join" messages in the logs of your wka members. If you don't see that, there must be something wrong with the clustering configurations in <AM_HOME>/repository/conf/axis2/axis2.xml. Please make sure to use IP addresses in the clustering configurations.

I don't see join messages in your logs. Please check your configurations.

Please refer the docs for clustering the Gateway [3]. Since you are not using ELB, you just have to avoid adding the ELB details to axis2.xml.

For example, if you have two gateway nodes, following are the configurations required in axis2.xml

Gateway 1:

<clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent" enable="true">
    <parameter name="membershipScheme">wka</parameter>
    <parameter name="domain">wso2.am.domain</parameter>
    <parameter name="localMemberHost">192.168.10.1</parameter>
    <parameter name="localMemberPort">4100</parameter>
    <parameter name="properties">
        <property name="backendServerURL" value="https://${hostName}:${httpsPort}/services/"/>
        <property name="mgtConsoleURL" value="https://${hostName}:${httpsPort}/"/>
    </parameter>
    <members>
    </members>
</clustering>

Gateway 2:

<clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent" enable="true">
    <parameter name="membershipScheme">wka</parameter>
    <parameter name="domain">wso2.am.domain</parameter>
    <parameter name="localMemberHost">192.168.10.2</parameter>
    <parameter name="localMemberPort">4101</parameter>
    <parameter name="properties">
        <property name="backendServerURL" value="https://${hostName}:${httpsPort}/services/"/>
        <property name="mgtConsoleURL" value="https://${hostName}:${httpsPort}/"/>
    </parameter>
    <members>
        <member>
              <hostName>192.168.10.1</hostName>
              <port>4100</port>
        </member>
    </members>
</clustering>

I hope this helps.

[1] https://docs.wso2.com/display/CLUSTER420/SVN-based+Deployment+Synchronizer

[2] https://docs.wso2.com/display/CLUSTER420/Clustering+API+Manager#ClusteringAPIManager-ConfiguringtheAPIPublisherandAPIStoretobeonthesameclusterdomain

[3] https://docs.wso2.com/display/CLUSTER420/Clustering+the+Gateway