'WSO2 APIM 4.0 : Error Deploying api in Gateway

I have setup a distributed wso2 APIM 4.0.0 platfom as follow :

1 ISKM , 1 GW , 1 Controle plan, 1 Traffic manager separated from the controle plan

Everything seems fine when i start my componants. when I try to publish an api I see that it is marked " published " in the publisher componant . but I am getting the follwing error in the Gateway logs :

ERROR {org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer} - Error deploying 93691a7d-b4c4-4857-b51f-d033c3b5b86c in Gateway org.wso2.carbon.apimgt.impl.gatewayartifactsynchronizer.exception.ArtifactSynchronizerException: Error deploying 93691a7d-b4c4-4857-b51f-d033c3b5b86c in Gateway
        at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.retrieveArtifact_aroundBody2(InMemoryAPIDeployer.java:130)
        at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.retrieveArtifact(InMemoryAPIDeployer.java:110)
        at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.deployAPI_aroundBody0(InMemoryAPIDeployer.java:87)
        at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.deployAPI(InMemoryAPIDeployer.java:82)
        at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener.handleNotificationMessage_aroundBody2(GatewayJMSMessageListener.java:152)
        at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener.handleNotificationMessage(GatewayJMSMessageListener.java:122)
        at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener.onMessage_aroundBody0(GatewayJMSMessageListener.java:97)
        at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener.onMessage(GatewayJMSMessageListener.java:73)
        at org.wso2.carbon.apimgt.common.jms.JMSTaskManager$MessageListenerTask.handleMessage(JMSTaskManager.java:656)
        at org.wso2.carbon.apimgt.common.jms.JMSTaskManager$MessageListenerTask.run(JMSTaskManager.java:555)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.wso2.carbon.apimgt.impl.gatewayartifactsynchronizer.exception.ArtifactSynchronizerException: {"code":900967,"message":"General Error","description":"Server Error Occurred","moreInfo":"","error":[]}Event-Hub status code is : 500
        at org.wso2.carbon.apimgt.impl.gatewayartifactsynchronizer.DBRetriever.retrieveArtifact_aroundBody4(DBRetriever.java:115)
        at org.wso2.carbon.apimgt.impl.gatewayartifactsynchronizer.DBRetriever.retrieveArtifact(DBRetriever.java:96)
        at org.wso2.carbon.apimgt.impl.gatewayartifactsynchronizer.DBRetriever.retrieveArtifact_aroundBody2(DBRetriever.java:83)
        at org.wso2.carbon.apimgt.impl.gatewayartifactsynchronizer.DBRetriever.retrieveArtifact(DBRetriever.java:67)
        at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.retrieveArtifact_aroundBody2(InMemoryAPIDeployer.java:119)
        ... 13 more

I am also getting the following error In the Traffic manager node logs :

[internal/data/v1] [2022-03-09 18:58:00,686] ERROR {org.wso2.carbon.apimgt.rest.api.util.exception.GlobalThrowableMapper} - Configured read only environment not found: Default

Help a brother =)

best regards



Solution 1:[1]

This has been fixed in the new version 4.1

Solution 2:[2]

I think you need to add the section [[apim.gateway.environment]] on your Traffic Manager node configuration too to make him know the 'Default' environement name

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Soufiane
Solution 2 Bruno