0
votes

We have a setup of WSO2 API Management in a distributed pattern (pattern-3) in Kubernetes. We are using a PostgreSQL DB which is running outside the Kubernetes cluster for all the databases.

I have published some APIs in the publisher and am able to invoke them from the store.

I had to make a change in api-manager.xml for the API Publisher and API Store configmap files and recreated the pod. When the pods were available, I observed that the APIs that I had published and working earlier are not visible anymore.

I tried to add the same APIs again and it is complaining that the APIs by that name already exists.

Following is the log from the plubisher pod:

[2019-05-16 08:19:38,266] ERROR - APIProviderHostObject Error occurred while adding the document. PizzaShack API Documentation already exists for API PizzaShackAPI-1.0.0
[2019-05-16 08:19:38,273] ERROR - docs:jag org.wso2.carbon.apimgt.api.APIManagementException: Error occurred while adding the document. PizzaShack API Documentation already exists for API PizzaShackAPI-1.0.0

While creating the API again on the Publisher, following error is displayed: "Duplicate API Name"

It clearly seems to be some synchronization issue. How can this issue be fixed?

1
you have to check it's database whether it's really delete or not. Because when you just delete from UI, WSO doesn't actually handles complete deleting cycle. Also make sure by logging into carbon, that users/roles related to this API names are deleted.AshwinK
@AshwinK, I have not deleted any API from the UI. I only recreated the pod for publisher and store. The API definition is in the DB. What I do not understand is why the new pod is unable to synchronize what it shows on the GUI with the DB.AKB

1 Answers

0
votes

I had shared the instance of Carbon DB across the components. This was causingthe issue. Using separate instance for each component in disbuted mode solved it