WSO2 API管理器API身份验证失败

WSO2 API管理器API身份验证失败,api,security,wso2,wso2carbon,Api,Security,Wso2,Wso2carbon,有人能告诉我为什么WSo2 API管理器不进行身份验证吗?我已经设置了两个WSo2 API Manager 1.8.0实例并创建了一个API。它作为原型API运行良好。之后,保存、发布并使用访问令牌调用api 获取以下响应 <ams:fault xmlns:ams="http://wso2.org/apimanager/security"> <ams:code>900906</ams:code> <ams:message> No matching

有人能告诉我为什么WSo2 API管理器不进行身份验证吗?我已经设置了两个WSo2 API Manager 1.8.0实例并创建了一个API。它作为原型API运行良好。之后,保存、发布并使用访问令牌调用api 获取以下响应

<ams:fault xmlns:ams="http://wso2.org/apimanager/security">
<ams:code>900906</ams:code>
<ams:message>
No matching resource found in the API for the given request
</ams:message>
<ams:description>
Access failure for API: /api/stature, version: 1.0.0 with key: null
</ams:description>
</ams:fault>
  • 当您的请求URL错误且APIManager无法将其与现有发布的API匹配时,就会出现上述问题
  • 如果发布的API配置未在网关中正确部署。您可以通过浏览网关的synapse配置文件夹/api文件夹来检查这一点。(在/repository/deployment/server中)
  • 如果APIM DB中缺少相关API条目

  • 您是否尝试使用分布式设置?你换了DBs吗?检查以上三点,然后您可以快速找出问题所在。

    您是如何发送请求的?通过poster发送请求的。我的意思是,您发送了哪些参数?从publisher编辑API(设计向导)并仔细检查资源名称的可用性。我对新安装的WSO2也有同样的问题。如果synapse config文件夹/api文件夹中有一个文件,是否意味着该文件“已正确部署”?我可以在DB中检查什么以确保正确设置?谢谢。我得到了与这个问题中描述的相同的错误。从API publisher添加新API时。在API定义中,我添加了类似于
    /test
    的资源,但在从邮递员处调用API时,我没有添加
    /test
    ,所以我只添加了这个,错误消失了。
    TID[-1234] [AM] [2015-01-19 00:12:47,263] ERROR {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler} - 
    API authentication failure org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator.authenticate(OAuthAuthenticator.java:212) 
    org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler.handleRequest(APIAuthenticationHandler.java:94) 
    org.apache.synapse.rest.API.process(API.java:284) org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:83) 
    org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:64) 
    org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:220) 
    org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83) 
    org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) 
    org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:344) 
    org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:168) 
    org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) 
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
    java.lang.Thread.run(Thread.java:745) 
    
    No matching resource found in the API for the given request