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:
WSO2_CARBON_DB
WSO2AM_DB
WSO2UM_DB
WSO2REG_DB
WSO2AM_STATS_DB
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
- 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.
- Create a new API, API-2
- Force kill Node-2.
- This will cause AWS auto scale to launch a new node, Node-3.
- Now login to Node-1 publisher, you will notice API-1 and API-2 are available.
- Test API-1 and API-2 on Node-1, both are successful.
- Node login to Node-3 publisher, you will notice only API-1 is available.
- Test API-1 and API-2 on Node 3, both are successful.
Scenario 2
- 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.
- Create a new API, API-2
- Force kill Node-1.
- Force kill Node-2.
- This will cause AWS auto scale to launch new nodes, Node-3 and Node-4.
- Now login to Node-3 publisher, you will notice only API-1 is available.
- Test API-1 and API-2 on Node-3, both are successful.
- Node login to Node-4 publisher, you will notice only API-1 is available.
- Test API-1 and API-2 on Node 4, both are successful.
Expectation
- Both APIs are available in both nodes' publisher.