0

This is a related question from my previous post

After I successfully created API and publish it (all working fine) and if I kill any one of the two nodes, and let AWS auto scaling to start a new instance. Once the node is up, gateway seems to be up and working well.

[2016-11-02 06:54:19,532]  INFO - API Initializing API: admin--xxxAPI:vv1
[2016-11-02 06:54:19,533]  INFO - DependencyTracker API : admin--xxxAPI:vv1    was added to the Synapse configuration successfully
[2016-11-02 06:54:19,533]  INFO - APIDeployer API named 'admin--xxxAPI:vv1' has been deployed from file : /opt/wso2am-2.0.0/repository/deployment/server/synapse-configs/default/api/admin--xxxAPI_vv1.xml
[2016-11-02 06:55:17,475]  INFO - AndesRecoveryTask Running DB sync task.

And proper clustering seems to take place too.

[2016-11-02 05:25:18,325]  INFO - HazelcastClusteringAgent Using aws based membership management scheme
[2016-11-02 07:12:59,288]  INFO - AWSBasedMembershipScheme Member left [5d56f7b3-215a-4689-868f-9f5963c8ed15]: /10.0.4.4:5701
[2016-11-02 07:20:11,780]  INFO - AWSBasedMembershipScheme Member joined [ab712a93-a735-4fd4-b040-4ac90b99c65b]: /10.0.4.124:5701

However noticed publisher from the new node does not show the API (xxxAPI). Worse, if both instances are new, in this case gateway able to work but the API is completely missing from publisher. Had to use publisher Rest API to delete and recreate.

Following are DBs that shared from mysql by both nodes:

  1. WSO2_CARBON_DB
  2. WSO2AM_DB
  3. WSO2UM_DB
  4. WSO2REG_DB
  5. WSO2AM_STATS_DB
  6. WSO2_MB_STORE_DB

i.e only one that not shared is WSO2_METRICS_DB

SVN depsync is in place as well.

Is there any other data/file should be shared/saved for the new node to show up the API? Thanks.

Summary/how to reproduce

Scenario 1

  1. Create setup with 2 nodes (aws scheme clustered, mysql, svn). AWS Auto scale as 2 nodes, with image of the node contains API-1 already, Node-1 and Node-2.
  2. Create a new API, API-2
  3. Force kill Node-2.
  4. This will cause AWS auto scale to launch a new node, Node-3.
  5. Now login to Node-1 publisher, you will notice API-1 and API-2 are available.
  6. Test API-1 and API-2 on Node-1, both are successful.
  7. Node login to Node-3 publisher, you will notice only API-1 is available.
  8. Test API-1 and API-2 on Node 3, both are successful.

Scenario 2

  1. Create setup with 2 nodes (aws scheme clustered, mysql, svn). AWS Auto scale as 2 nodes, with image of the node contains API-1 already, Node-1 and Node-2.
  2. Create a new API, API-2
  3. Force kill Node-1.
  4. Force kill Node-2.
  5. This will cause AWS auto scale to launch new nodes, Node-3 and Node-4.
  6. Now login to Node-3 publisher, you will notice only API-1 is available.
  7. Test API-1 and API-2 on Node-3, both are successful.
  8. Node login to Node-4 publisher, you will notice only API-1 is available.
  9. Test API-1 and API-2 on Node 4, both are successful.

Expectation

  1. Both APIs are available in both nodes' publisher.
Community
  • 1
  • 1
Ravi N.
  • 81
  • 2
  • 10
  • Have you configured your registry.xml correctly on both publisher nodes (to use WSO2CarbonDB as the wso2registry and WSO2REG_DB as mounted governance registry)? Can you share that configuration? It's important (apparently) that the wso2registry points to the flat h2 file, which contains configuration for mounting remote registries. https://docs.wso2.com/display/CLUSTER420/Clustering+API+Manager#ClusteringAPIManager-Installingandconfiguringthedatabases – Kjata30 Nov 11 '16 at 16:56
  • if apis are working fine not getting displayed in store/publishr, it can be related to registry indexing http://wso2.com/library/articles/2015/01/wso2-api-manager-deployment-customization-and-troubleshooting-part-02/ – Jenananthan Dec 08 '16 at 08:33

0 Answers0