Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't redeploy the particular API after failing the revision deployment with the endpoint exists by the key/name error. #2010

Closed
sajith-madhusanka opened this issue Jul 18, 2023 · 1 comment · Fixed by wso2/product-apim#13266

Comments

@sajith-madhusanka
Copy link

Description

The API revision deployment fails with the "No endpoint exists by the key/name" error message when trying to deploy the revision when there is high traffic for the particular API. However, it Can't redeploy the particular API even in the no traffic due to No endpoint exists by the key/name issue. It requires restarting the server to recover.

Steps to Reproduce

  • Deployed a sample API.
  • Conducted a load test on the deployed API with Jmeter (No of threads: 600, Loop Count: infinite)
  • Tried to update the sample API (by deploying a new revision) during the load test and was able to observe that API invocations failed with 404 HTTP status after that.
  • The API revision deployment failed with the No endpoint exists by the key/name error message.
  • Stopped the load test and tried to redeploy the API.
  • The API revision deployment failed with the same error message.

Affected Component

APIM

Version

4.0.0

Environment Details (with versions)

No response

Relevant Log Output

TID: [] [] [2023-06-07 16:50:46,511] ERROR {org.wso2.carbon.apimgt.gateway.utils.EndpointAdminServiceProxy} - Error deleting endpoint from gateway org.apache.synapse.SynapseException: No endpoint exists by the key/name : sample1--vv1_APIproductionEndpoint
    at org.apache.synapse.config.SynapseConfiguration.handleException(SynapseConfiguration.java:1800)
    at org.apache.synapse.config.SynapseConfiguration.removeEndpoint(SynapseConfiguration.java:1218)
    at org.wso2.carbon.endpoint.service.EndpointAdmin.deleteEndpoint(EndpointAdmin.java:292)
    at org.wso2.carbon.apimgt.gateway.utils.EndpointAdminServiceProxy.deleteEndpoint_aroundBody2(EndpointAdminServiceProxy.java:82)
    at org.wso2.carbon.apimgt.gateway.utils.EndpointAdminServiceProxy.deleteEndpoint(EndpointAdminServiceProxy.java:1)
    at org.wso2.carbon.apimgt.gateway.service.APIGatewayAdmin.unDeployAPI_aroundBody98(APIGatewayAdmin.java:827)
    at org.wso2.carbon.apimgt.gateway.service.APIGatewayAdmin.unDeployAPI(APIGatewayAdmin.java:1)
    at org.wso2.carbon.apimgt.gateway.service.APIGatewayAdmin.unDeployAPI_aroundBody100(APIGatewayAdmin.java:895)
    at org.wso2.carbon.apimgt.gateway.service.APIGatewayAdmin.unDeployAPI(APIGatewayAdmin.java:1)
    at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.unDeployAPI_aroundBody8(InMemoryAPIDeployer.java:302)
    at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.unDeployAPI(InMemoryAPIDeployer.java:1)
    at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.deployAPI_aroundBody0(InMemoryAPIDeployer.java:96)
    at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.deployAPI(InMemoryAPIDeployer.java:1)
    at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener$1.run_aroundBody0(GatewayJMSMessageListener.java:177)
    at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener$1.run(GatewayJMSMessageListener.java:1)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

TID: [] [] [2023-06-07 16:50:46,511] ERROR {org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer} - Error deploying 2fce91db-21d5-4ba8-a8c5-f31c9c543340 in Gateway org.apache.axis2.AxisFault: Error while deleting the endpoint fileNo endpoint exists by the key/name : sample1--vv1_APIproductionEndpoint
    at org.wso2.carbon.apimgt.gateway.utils.EndpointAdminServiceProxy.deleteEndpoint_aroundBody2(EndpointAdminServiceProxy.java:88)
    at org.wso2.carbon.apimgt.gateway.utils.EndpointAdminServiceProxy.deleteEndpoint(EndpointAdminServiceProxy.java:1)
    at org.wso2.carbon.apimgt.gateway.service.APIGatewayAdmin.unDeployAPI_aroundBody98(APIGatewayAdmin.java:827)
    at org.wso2.carbon.apimgt.gateway.service.APIGatewayAdmin.unDeployAPI(APIGatewayAdmin.java:1)
    at org.wso2.carbon.apimgt.gateway.service.APIGatewayAdmin.unDeployAPI_aroundBody100(APIGatewayAdmin.java:895)
    at org.wso2.carbon.apimgt.gateway.service.APIGatewayAdmin.unDeployAPI(APIGatewayAdmin.java:1)
    at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.unDeployAPI_aroundBody8(InMemoryAPIDeployer.java:302)
    at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.unDeployAPI(InMemoryAPIDeployer.java:1)
    at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.deployAPI_aroundBody0(InMemoryAPIDeployer.java:96)
    at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.deployAPI(InMemoryAPIDeployer.java:1)
    at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener$1.run_aroundBody0(GatewayJMSMessageListener.java:177)
    at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener$1.run(GatewayJMSMessageListener.java:1)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.synapse.SynapseException: No endpoint exists by the key/name : sample1--vv1_APIproductionEndpoint
    at org.apache.synapse.config.SynapseConfiguration.handleException(SynapseConfiguration.java:1800)
    at org.apache.synapse.config.SynapseConfiguration.removeEndpoint(SynapseConfiguration.java:1218)
    at org.wso2.carbon.endpoint.service.EndpointAdmin.deleteEndpoint(EndpointAdmin.java:292)
    at org.wso2.carbon.apimgt.gateway.utils.EndpointAdminServiceProxy.deleteEndpoint_aroundBody2(EndpointAdminServiceProxy.java:82)
    ... 16 more

Related Issues

No response

Suggested Labels

No response

@YasasRangika
Copy link

YasasRangika commented Jan 12, 2024

Need to merge master fix PRs:
wso2/carbon-apimgt#12137
wso2/product-apim#13266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment