1

I have a distributed setup (WSO2 APIM 191) like this:

  • 2 servers working with store and pubisher in cluster; (Server A and B);
  • 2 servers working with gateway-workers and keymanager in cluster; (Server C and D);
  • 1 server working as gateway-manager; (Server E);
  • 1 server working with a BAM; (Server F);
  • 2 postgres in cluster;

All is configured and works well. But when I registry a API at "A" this API is not shown by the server "C" or "D".

When i call this API by "curl" this is the mistake:

<am:fault xmlns:am="http://wso2.org/apimanager">
  <am:code>404</am:code>
  <am:type>Status report</am:type>
  <am:message>Not Found</am:message>
  <am:description>
       The requested resource (/test/1/ping) is not available. 
  </am:description>

When I see carbon at "C" or "D" (Main > Metadata > List > APis) the API is there. I dont know why this mistake.

1 Answers1

2

Did you setup deployment synchronizer? see SVN-Based Deployment Synchronizer for Carbon 4.2.0-Based Products .

When you publish an api from the publisher, it creates relevant synapse configurations to handle request related to this api in the manager node (see AM_HOME/repository/deployment/server/synapse-configs/default/api in the manager node and you would find a xml with the api name.) . Since gateway worker nodes handle requests, these files should be in the worker nodes. deployment synchronizer is used to move this configurations to the worker nodes automatically. You can do this manually by copying content in synapse-configs folder in the manager node to all the worker nodes if you do not want a svn base synchronizer

Chamila Adhikarinayake
  • 3,588
  • 5
  • 25
  • 32
  • Is there another way to solve this? I can`t use SVN and I can`t do it manually. – Eliezer Trajano May 23 '16 at 15:03
  • 1
    You could write a cron job in the gw master node to copy the deployment folder to worker node in a scheduled manager. one downside of this is that worker nodes won't get the updated configs the moment it gets updated. (depsync does this. it sends cluster msg to worker node once a update is done. workers will then get a svn update). Another method is remove the worker node and set the worker nodes as normal gw nodes and set the both gateways urls as the Gateway endpoint in publisher's api-manager.xml. this will publish api to both gateways. – Chamila Adhikarinayake May 24 '16 at 04:14
  • _"Another method is remove the worker node and set the worker nodes as normal gw nodes and set the both gateways urls as the Gateway endpoint in publisher's api-manager.xml. this will publish api to both gateways"_ . Today I have 1 GM and 2 GW. So Can I have 3 GM working in my setup? – Eliezer Trajano May 24 '16 at 19:01