0
votes

I have recently upgraded the WSO2 APIM from 2.5.0 to 2.6.0

Currently, performing basic tests and things are working fine. I am also using MSSQL database.

Now, using restAPIs, I am creating APIs in publisher and then I am publishing the APIs. Both of the functionalities are working fine. But, I do see one issue while invoking the API.

So to test it, I am subscribing to the API which is published and using correct token I am invoking it. While invoking the API for the first time, I am getting below error

    TID: [-1234] [] [2019-10-08 14:58:16,263]  WARN {org.wso2.carbon.apimgt.keymgt.service.thrift.APIKeyValidationServiceImpl} -  Invalid session id for thrift authenticator. {org.wso2.carbon.apimgt.keymgt.service.thrift.APIKeyValidationServiceImpl}
    TID: [-1234] [] [2019-10-08 14:58:16,263] ERROR {org.wso2.carbon.apimgt.keymgt.service.thrift.APIKeyValidationServiceImpl} -  Error in invoking validate key via thrift.. {org.wso2.carbon.apimgt.keymgt.service.thrift.APIKeyValidationServiceImpl}
    TID: [-1234] [] [2019-10-08 14:58:16,264]  WARN {org.wso2.carbon.apimgt.gateway.handlers.security.thrift.ThriftKeyValidatorClient} -  Login failed.. Authenticating again.. {org.wso2.carbon.apimgt.gateway.handlers.security.thrift.ThriftKeyValidatorClient}
    TID: [-1234] [] [2019-10-08 14:58:16,338]  INFO {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} -  '[email protected] [-1234]' logged in at [2019-10-08 14:58:16,338+0000] from IP address  {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil}
    TID: [-1234] [] [2019-10-08 14:58:16,370]  WARN {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler} -  API authentication failure due to No matching resource found in the API for the given request {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler}

then, subsequent Invokes give below

    TID: [-1234] [] [2019-10-08 14:59:29,462]  WARN {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler} -  API authentication failure due to No matching resource found in the API for the given request {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler}

Now, What I do is I republish the API from the /publisher portal and then I again invoke that using same oauth token, it works fine without any issue.

Can someone please help me here. Anyone got this issue in 2.6.0?

Thanks

1

1 Answers

0
votes

"API authentication failure due to No matching resource found in the API for the given request"

The reason for this is resource validation fails after dispatching the API invocation request. And it may be due to corresponding API resources cannot be found in the database or resource ambiguous scenarios. So please check in the database after publishing and invoking the API via the Rest API whether the exact resources exist in the database.