This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Troubleshooting the Microgateway
This documentation is for the API Microgateway component that is coupled with WSO2 API Manager 2.6.0.
View the documentation for the latest release - WSO2 API Microgateway 3.0.2.
When errors/exceptions occur in the system, the API Microgateway throws error responses to the client by default. The following sections explain about the different ways of troubleshooting common problems that might occur while you use the Microgateway.
Common exceptions and solutions
The table below shows the common exceptions that might occur when you are trying to use the API Microgateway, and how to fix them. These exceptions can happen due to misconfigurations.
Error log | Possible cause | Resolution |
---|---|---|
micro-gw: Error occurred while trying to connect with server. Is the server running at https://localhost:9443?
| The API Manager node (Publisher) is down when running the setup command in the Microgateway. | Verify the connectivity between the Microgateway and the API manager node. |
micro-gw: Error in client response : {message:"Network is unreachable: www.mocky.io/54.194.152.6:80", cause:null} | A connection to the backend could not be established because the network is unavailable. | Verify the network stability. |
Micro-gw: ERROR [src:0.0.0] - Error in client response : {message:"Connection refused: localhost/127.0.0.1:8080", cause:null} | Connection to the backend is refused. | Check the connection to the backend. |
error [docker plugin]: Unable to build docker image: {"message":"invalid reference format: repository name must be lowercase"} | The name of the docker images should be in lower case. When building the project with docker annotations, the docker image name is retrieved from the API name and version. If the API name contains a capital letter, then the docker image n ame would reflect that, resuling in this error. | When building the API microgateway project, provide a simple letter name for the docker image in the deployment.toml file as shown below.[docker] [docker.dockerConfig] enable = true name = "hello_world" |
| The Microgateway could not connect to the Key Manager for OAuth2 key validation. | Check the connection between the Microgateway and the Key Manager. |
ERROR [wso2/gateway:0.0.0] - Error occurred while reading the key validation response : {message:"General SSLEngine problem/192.168.8.101:9443", cause:null} ERROR [wso2/gateway:0.0.0] - Error occurred while converting the authorized value from the key validation response to a string value : {message:"'null' cannot be cast to 'string'", cause:null} | SSL hostname verification has failed in the key validation call. | The localhost hostname is supported by default.You need to add the public certificate of the Key Manager to the Microgateway truststore. Also, make sure that you change the certificateAlias accordingly. |
ERROR [ballerina/http] - Error while validating JWT token : {message:"Invalid signature", cause:null} | JWT signature verification has failed. | Verify the following:
|
ERROR {org.wso2.apimgt.gateway.cli.cmd.Main} - Internal error occurred while executing command. com.github.jknack.handlebars.HandlebarsException: /home/pubudu/Downloads/wso2am-micro-gw-toolkit-2.5.0/resources/templates/service.mustache:36:87: java.lang.IllegalStateException: Can't resolve: 'doc' | This is due to an issue in the Service template. |
|
Error responses
Error code | Error response | Possible reasons |
---|---|---|
101503 | { "fault": { "code": "101503", "message": "Runtime Error", "description": "Error connecting to the back end" } } |
|
101504 | { "fault": { "code": "101504", "message": "Runtime Error", "description": "Connection timed out" } } |
|
900900 | { "fault": { "code": 900900, "message": "Unclassified Authentication Failure", "description": "Unclassified Authentication Failure" } } |
|
Error codes
Given below are some API Manager-specific error codes and their meanings. For more details on error codes and their descriptions, see Error Handling.
Error code | Possible reason |
---|---|
900901 | The production/sandbox key offered by the requested endpoint is not specified. |
900900 | API-M authentication related error. |
900901 | Invalid access token. |
900902 | Missing credentials. |
900903 | Access token expired. |
900904 | Access token inactive. |
900905 | Incorrect access token type provided. |
900906 | No matching resource found in the API for the given request. |
900907 | The requested API is temporarily blocked. |
900908 | Resource forbidden. |
900909 | The subscription to the API is inactive. |
900910 | The access token does not allow you to access the requested resource. |
900803 | Application level throttled out. |
900804 | Subscription level throttled out. |
900808 | An internal error occurred in the Microgateway. |
900809 | An internal error occurred in the Microgateway, since a subscription or application throttle policy is not deployed. This might be due to adding a throttle policy to API-M and not regenerating the Microgateway. |