将 api 生命周期状态更改为在 wso2 api 管理器 3.2.0 中发布时出错

Error when changing api lifecycle state to Publish in wso2 api manager 3.2.0

我在 wso2 api 管理器 3.2.0 中遇到以下异常,当将 api 生命周期状态更改为发布时。当我想更改状态以发布时,我遇到了错误,在重复并单击两次以上后,它更改了状态并抛出以下异常:

Error while updating the API in Gateway 7c395ffc-ad21-4a56-8dc1-e0cd459fa266




 ERROR - GovernanceArtifactImpl Invoking lifecycle action "Publish" failed. Execution failed for action : Publish Embedded error : FaultGatewaysException:{"PUBLISHED":{"Production and Sandbox":"Error while Deploying API "},"UNPUBLISHED":{}}
    org.wso2.carbon.registry.core.exceptions.RegistryException: Execution failed for action : Publish Embedded error : FaultGatewaysException:{"PUBLISHED":{"Production and Sandbox":"Error while Deploying API "},"UNPUBLISHED":{}}

在网关 7c395ffc-ad21-4a56-8dc1-e0cd459fa266 中更新 API 时出错

能否指导我解决以下问题

完整日志:

  nsumer#tokenRevocation
[2021-09-22 10:40:16,352]  WARN - OAuth2AuthzEndpoint No session state found for the received Session ID : e39a2551-0b03-4cdc-828f-245597734
[2021-09-22 10:41:54,194]  INFO - DataBridge user admin connected
[2021-09-22 10:41:54,377]  INFO - JMSConnectionFactory JMS ConnectionFactory : notificationJMSPublisher initialized
[2021-09-22 10:41:57,134]  INFO - CarbonAuthenticationUtil 'admin@carbon.super [-1234]' logged in at [2021-09-22 10:41:57,134+0330]
[2021-09-22 10:41:57,264]  INFO - DependencyTracker Local entry : 0a1f10b7-87e8-4bb2-b680-b64762218445 was added to the Synapse configtion successfully
[2021-09-22 10:41:57,274]  INFO - DependencyTracker Endpoint : x1--v1.0.0_APIproductionEndpoint was added to the Synapse configurationccessfully
[2021-09-22 10:41:57,279]  INFO - DependencyTracker Endpoint : x1--v1.0.0_APIsandboxEndpoint was added to the Synapse configuration sussfully
[2021-09-22 10:41:57,322] ERROR - SynapseConfiguration URL context: /shaparak/1.0.0 is already registered with the API: admin--serviceager:v1.0.0
[2021-09-22 10:41:57,323]  INFO - API {api:admin--x1:v1.0.0} Destroying API: admin--x1:v1.0.0
[2021-09-22 10:41:57,324]  WARN - APIAuthenticationHandler Unable to destroy uninitialized authentication handler instance
[2021-09-22 10:41:57,324] ERROR - SynapseConfiguration No API exists by the name: admin--x1:v1.0.0
[2021-09-22 10:41:57,343] ERROR - APIGatewayManager Error occurred when publish to gateway Production and Sandbox
org.apache.axis2.AxisFault: Error while Deploying API
        at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.deployAPI_aroundBody14(APIGatewayAdminClient.java:215) ~[org.wso2.con.apimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.deployAPI(APIGatewayAdminClient.java:210) ~[org.wso2.carbon.apimgt.l_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishAPIToGatewayEnvironment_aroundBody4(APIGatewayManager.java:214) [org.w.carbon.apimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishAPIToGatewayEnvironment(APIGatewayManager.java:192) [org.wso2.carbon.agt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGateway_aroundBody2(APIGatewayManager.java:144) [org.wso2.carbon.api.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGateway(APIGatewayManager.java:118) [org.wso2.carbon.apimgt.impl_6.76.jar:?]
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway_aroundBody116(APIProviderImpl.java:2438) [org.wso2.carbon.apimimpl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway(APIProviderImpl.java:2410) [org.wso2.carbon.apimgt.impl_6.7.20ar:?]
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.propergateAPIStatusChangeToGateways_aroundBody100(APIProviderImpl.java:2168) [owso2.carbon.apimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.propergateAPIStatusChangeToGateways(APIProviderImpl.java:2134) [org.wso2.carbonimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.propergateAPIStatusChangeToGateways_aroundBody28(UserAwareAPIProvider.java4) [org.wso2.carbon.apimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.propergateAPIStatusChangeToGateways(UserAwareAPIProvider.java:191) [org.wscarbon.apimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.executors.APIExecutor.changeLifeCycle_aroundBody4(APIExecutor.java:190) [org.wso2.carbon.apimgtpl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.executors.APIExecutor.changeLifeCycle(APIExecutor.java:158) [org.wso2.carbon.apimgt.impl_6.7.20ar:?]
        at org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute_aroundBody2(APIExecutor.java:132) [org.wso2.carbon.apimgt.impl_6.06.jar:?]
        at org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute(APIExecutor.java:93) [org.wso2.carbon.apimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle.runCustomExecutorsCode(DefaultLifeCycle.java:712) [.wso2.carbon.governance.registry.extensions_4.8.19.jar:?]
        at org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle.invoke(DefaultLifeCycle.java:450) [org.wso2.carbon.ernance.registry.extensions_4.8.19.jar:?]
        at org.wso2.carbon.governance.registry.eventing.handlers.GovernanceEventingHandler.invokeAspect(GovernanceEventingHandler.java6) [org.wso2.carbon.governance.registry.eventing_4.8.19.jar:?]
        at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.invokeAspect(HandlerManager.java:2794) [org.wso2.carbon.registryre_4.6.0.jar:?]
        at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.invokeAspect(HandlerLifecycleManager.java:518) [org.wsoarbon.registry.core_4.6.0.jar:?]
        at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAspect(EmbeddedRegistry.java:2607) [org.wso2.carbon.registry.core6.0.jar:?]
        at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.invokeAspect(CacheBackedRegistry.java:510) [org.wso2.carbon.regis.core_4.6.0.jar:?]
        at org.wso2.carbon.registry.core.session.UserRegistry.invokeAspect(UserRegistry.java:1964) [org.wso2.carbon.registry.core_4.6.ar:?]
        at org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.invokeAction(GovernanceArtifactImpl.java:829) [orgo2.carbon.governance.api_4.8.19.jar:?]
        at org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.invokeAction(GovernanceArtifactImpl.java:808) [orgo2.carbon.governance.api_4.8.19.jar:?]
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleStatus_aroundBody272(APIProviderImpl.java:5697) [org.wso2.carbonimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleStatus(APIProviderImpl.java:5620) [org.wso2.carbon.apimgt.impl_6206.jar:?]
        at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeCycleStatus_aroundBody74(UserAwareAPIProvider.java:358) [org.wsoarbon.apimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeCycleStatus(UserAwareAPIProvider.java:354) [org.wso2.carbon.apimimpl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.rest.api.publisher.v1.impl.ApisApiServiceImpl.apisChangeLifecyclePost(ApisApiServiceImpl.java:3932) asses/:?]
        at org.wso2.carbon.apimgt.rest.api.publisher.v1.ApisApi.apisChangeLifecyclePost(ApisApi.java:875) [classes/:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_291]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_291]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_291]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_291]
        at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) [cxf-core-3.2.8.jar:3.2.8]
        at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) [cxf-core-3.2.8.jar:3.2.8]
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:193) [cxf-rt-frontend-jaxrs-3.2.8.jar:3.2.8]
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103) [cxf-rt-frontend-jaxrs-3.2.8.jar:3.2.8]
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.run(ServiceInvokerInterceptor.java:59) [cxf-core-3.2.8.jar:3.2.8]
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) [cxf-core-3.2.8.jar:38]
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) [cxf-core-3.2.8.jar:3.2.8]
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-core-3.2.8.jar:3.2.8]
        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) [cxf-rt-transports-http-3.2.ar:3.2.8]
        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) [cxf-rt-transports-http-3..jar:3.2.8]
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) [cxf-rt-transports-http-3.2.8.jar:3.2
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) [cxf-rt-transports-http-3.2.8.jar:3.2
        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216) [cxf-rt-transports-http-3.2.8.jar2.8]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301) [cxf-rt-transports-http-3..jar:3.2.8]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:220) [cxf-rt-transports-http-3.2.8.jar2.8]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) [tomcat-servlet-api_9.0.31.wso2v1.jar:?]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276) [cxf-rt-transports-http-3.2.8.ja.2.8]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat_9.0.31.wso2v1.jar
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat_9.0.31.wso2v1.jar
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat_9.0.31.wso2v1.jar:?]
        at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:86) [org.wsoarbon.identity.context.rewrite.valve_1.4.0.jar:?]
        at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:110) [org.wso2.carbon.identity.authzlve_1.4.0.jar:?]
        at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:101) [org.wso2.carbon.identity.authlve_1.4.0.jar:?]
        at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99) [org.wso2.carbon.tomcat.ext_4.6jar:?]
        at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49) [org.wso2.carbon.tomcat.e4.6.0.jar:?]
        at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62) [org.wso2.carbon.tomcat.ext_4.6.0.jar:?]
        at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:145) [org.wsoarbon.tomcat.ext_4.6.0.jar:?]
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) [tomcat_9.0.31.wso2v1.jar:?]
        at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57) [org.wso2.carbon.tomcext_4.6.0.jar:?]
        at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:119) [org.wso2.carbon.tom.ext_4.6.0.jar:?]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat_9.0.31.wso2v1.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_291]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_291]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat_9.0.31.wso2v1.jar:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_291]
Caused by: org.apache.axis2.AxisFault: Error while publishing API to the Gateway. No API exists by the name: admin--x1:v1.0.0
        at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531) ~[axis2_1.6.1.wso2v41.jar:?]
        at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:382) ~[axis2_1.6.1.wso2v41.jar
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:457) ~[axis2_1.6.1.wso2v41.jar:?]
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) ~[axis2_1.6.1.wso2v41.jar:?]
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) ~[axis2_1.6.1.wso2v41.jar:?]
        at org.wso2.carbon.apimgt.gateway.stub.APIGatewayAdminStub.deployAPI(APIGatewayAdminStub.java:4705) ~[org.wso2.carbon.apimgt.gway.stub_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient.deployAPI_aroundBody14(APIGatewayAdminClient.java:213) ~[org.wso2.con.apimgt.impl_6.7.206.jar:?]
        ... 83 more
[2021-09-22 10:41:57,476]  INFO - CarbonAuthenticationUtil 'admin@carbon.super [-1234]' logged in at [2021-09-22 10:41:57,476+0330]
[2021-09-22 10:41:58,114]  INFO - CarbonAuthenticationUtil 'admin@carbon.super [-1234]' logged in at [2021-09-22 10:41:58,114+0330]
[2021-09-22 10:41:58,443] ERROR - APIExecutor Failed to publish service gateway while executing APIExecutor.
org.wso2.carbon.apimgt.api.FaultGatewaysException: null
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPIforStateChange_aroundBody104(APIProviderImpl.java:2292) ~[org.wso2.car.apimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPIforStateChange(APIProviderImpl.java:2199) ~[org.wso2.carbon.apimgt.imp.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.updateAPIforStateChange_aroundBody32(UserAwareAPIProvider.java:207) ~[org.2.carbon.apimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.updateAPIforStateChange(UserAwareAPIProvider.java:204) ~[org.wso2.carbon.agt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.executors.APIExecutor.changeLifeCycle_aroundBody4(APIExecutor.java:200) ~[org.wso2.carbon.apimgmpl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.executors.APIExecutor.changeLifeCycle(APIExecutor.java:158) ~[org.wso2.carbon.apimgt.impl_6.7.2jar:?]
        at org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute_aroundBody2(APIExecutor.java:132) [org.wso2.carbon.apimgt.impl_6.06.jar:?]
        at org.wso2.carbon.apimgt.impl.executors.APIExecutor.execute(APIExecutor.java:93) [org.wso2.carbon.apimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle.runCustomExecutorsCode(DefaultLifeCycle.java:712) [.wso2.carbon.governance.registry.extensions_4.8.19.jar:?]
        at org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle.invoke(DefaultLifeCycle.java:450) [org.wso2.carbon.ernance.registry.extensions_4.8.19.jar:?]
        at org.wso2.carbon.governance.registry.eventing.handlers.GovernanceEventingHandler.invokeAspect(GovernanceEventingHandler.java6) [org.wso2.carbon.governance.registry.eventing_4.8.19.jar:?]
        at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.invokeAspect(HandlerManager.java:2794) [org.wso2.carbon.registryre_4.6.0.jar:?]
        at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.invokeAspect(HandlerLifecycleManager.java:518) [org.wsoarbon.registry.core_4.6.0.jar:?]
        at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAspect(EmbeddedRegistry.java:2607) [org.wso2.carbon.registry.core6.0.jar:?]
        at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.invokeAspect(CacheBackedRegistry.java:510) [org.wso2.carbon.regis.core_4.6.0.jar:?]
        at org.wso2.carbon.registry.core.session.UserRegistry.invokeAspect(UserRegistry.java:1964) [org.wso2.carbon.registry.core_4.6.ar:?]
        at org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.invokeAction(GovernanceArtifactImpl.java:829) [orgo2.carbon.governance.api_4.8.19.jar:?]
        at org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.invokeAction(GovernanceArtifactImpl.java:808) [orgo2.carbon.governance.api_4.8.19.jar:?]
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleStatus_aroundBody272(APIProviderImpl.java:5697) [org.wso2.carbonimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleStatus(APIProviderImpl.java:5620) [org.wso2.carbon.apimgt.impl_6206.jar:?]
        at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeCycleStatus_aroundBody74(UserAwareAPIProvider.java:358) [org.wsoarbon.apimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.changeLifeCycleStatus(UserAwareAPIProvider.java:354) [org.wso2.carbon.apimimpl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.rest.api.publisher.v1.impl.ApisApiServiceImpl.apisChangeLifecyclePost(ApisApiServiceImpl.java:3932) asses/:?]
        at org.wso2.carbon.apimgt.rest.api.publisher.v1.ApisApi.apisChangeLifecyclePost(ApisApi.java:875) [classes/:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_291]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_291]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_291]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_291]
        at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) [cxf-core-3.2.8.jar:3.2.8]
        at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) [cxf-core-3.2.8.jar:3.2.8]
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:193) [cxf-rt-frontend-jaxrs-3.2.8.jar:3.2.8]
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103) [cxf-rt-frontend-jaxrs-3.2.8.jar:3.2.8]
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.run(ServiceInvokerInterceptor.java:59) [cxf-core-3.2.8.jar:3.2.8]
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) [cxf-core-3.2.8.jar:38]
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) [cxf-core-3.2.8.jar:3.2.8]
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-core-3.2.8.jar:3.2.8]
        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) [cxf-rt-transports-http-3.2.ar:3.2.8]
        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) [cxf-rt-transports-http-3..jar:3.2.8]
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) [cxf-rt-transports-http-3.2.8.jar:3.2
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) [cxf-rt-transports-http-3.2.8.jar:3.2
        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216) [cxf-rt-transports-http-3.2.8.jar2.8]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301) [cxf-rt-transports-http-3..jar:3.2.8]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:220) [cxf-rt-transports-http-3.2.8.jar2.8]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) [tomcat-servlet-api_9.0.31.wso2v1.jar:?]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276) [cxf-rt-transports-http-3.2.8.ja.2.8]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat_9.0.31.wso2v1.jar
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat_9.0.31.wso2v1.jar
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat_9.0.31.wso2v1.jar:?]
        at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:86) [org.wsoarbon.identity.context.rewrite.valve_1.4.0.jar:?]
        at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:110) [org.wso2.carbon.identity.authzlve_1.4.0.jar:?]
        at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:101) [org.wso2.carbon.identity.authlve_1.4.0.jar:?]
        at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99) [org.wso2.carbon.tomcat.ext_4.6jar:?]
        at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49) [org.wso2.carbon.tomcat.e4.6.0.jar:?]
        at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62) [org.wso2.carbon.tomcat.ext_4.6.0.jar:?]
        at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:145) [org.wsoarbon.tomcat.ext_4.6.0.jar:?]
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) [tomcat_9.0.31.wso2v1.jar:?]
        at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57) [org.wso2.carbon.tomcext_4.6.0.jar:?]
        at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:119) [org.wso2.carbon.tom.ext_4.6.0.jar:?]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) [tomcat_9.0.31.wso2v1.jar:?]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat_9.0.31.wso2v1.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_291]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_291]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat_9.0.31.wso2v1.jar:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_291]
[2021-09-22 10:41:58,449] ERROR - DefaultLifeCycle org.wso2.carbon.registry.core.exceptions.RegistryException: Execution failed for acn : Publish Embedded error : FaultGatewaysException:{"PUBLISHED":{"Production and Sandbox":"Error while Deploying API "},"UNPUBLISHED"}
[2021-09-22 10:41:58,473] ERROR - GovernanceArtifactImpl Invoking lifecycle action "Publish" failed. Execution failed for action : Pubh Embedded error : FaultGatewaysException:{"PUBLISHED":{"Production and Sandbox":"Error while Deploying API "},"UNPUBLISHED":{}}
org.wso2.carbon.registry.core.exceptions.RegistryException: Execution failed for action : Publish Embedded error : FaultGatewaysExcept:{"PUBLISHED":{"Production and Sandbox":"Error while Deploying API "},"UNPUBLISHED":{}}
        at org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle.invoke(DefaultLifeCycle.java:482) ~[org.wso2.carbonvernance.registry.extensions_4.8.19.jar:?]
        at org.wso2.carbon.governance.registry.eventing.handlers.GovernanceEventingHandler.invokeAspect(GovernanceEventingHandler.java6) ~[org.wso2.carbon.governance.registry.eventing_4.8.19.jar:?]
        at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.invokeAspect(HandlerManager.java:2794) ~[org.wso2.carbon.registrore_4.6.0.jar:?]
        at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.invokeAspect(HandlerLifecycleManager.java:518) ~[org.wscarbon.registry.core_4.6.0.jar:?]
        at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAspect(EmbeddedRegistry.java:2607) ~[org.wso2.carbon.registry.cor.6.0.jar:?]
        at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.invokeAspect(CacheBackedRegistry.java:510) ~[org.wso2.carbon.regiy.core_4.6.0.jar:?]
        at org.wso2.carbon.registry.core.session.UserRegistry.invokeAspect(UserRegistry.java:1964) ~[org.wso2.carbon.registry.core_4.6jar:?]
        at org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.invokeAction(GovernanceArtifactImpl.java:829) [orgo2.carbon.governance.api_4.8.19.jar:?]
        at org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl.invokeAction(GovernanceArtifactImpl.java:808) [orgo2.carbon.governance.api_4.8.19.jar:?]
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleStatus_aroundBody272(APIProviderImpl.java:5697) [org.wso2.carbonimgt.impl_6.7.206.jar:?]
        at org.wso2.carbon.apimgt.impl.APIProviderImpl.changeLifeCycleStatus(APIProviderImpl.java:5620) [org.wso2.carbon.apimgt.impl_6206.jar:?]

根据日志,这个问题似乎只发生在一个特定的 API 上。在共享碳日志文件中,以下行表示 admin--x1:v1.0.0 API 已被删除。

[2021-09-22 10:41:57,323]  INFO - API {api:admin--x1:v1.0.0} Destroying API: admin--x1:v1.0.0

在接下来的几行中,您会看到一条错误消息,指出您尝试发布的 API 不存在。

[2021-09-22 10:41:57,324] ERROR - SynapseConfiguration No API exists by the name: admin--x1:v1.0.0
[2021-09-22 10:41:57,343] ERROR - APIGatewayManager Error occurred when publish to gateway Production and Sandbox
org.apache.axis2.AxisFault: Error while Deploying API

可能的原因可能是 API admin--x1:v1.0.0 已从系统中完全删除或已部分删除并且仍然显示在发布者门户中。如果它被部分删除,那么您可以从其所有引用位置完全删除 API 并创建一个新的 API。然后你可以尝试发布那个API。您可以参考 https://m-saranki.medium.com/right-the-wrong-get-rid-of-partially-deleted-apis-in-wso2-apim-29c2bdd564e4 完全删除部分删除的 API。该博客针对 APIM-2.X.X 显示,但它也适用于 APIM-3.2.0。