Troubleshooting the WSO2 MicroGateway

What is WSO2 API Microgateway?
The Microgateway can be defined as a lightweight message processor for the APIs. It has the capability of message security, transport security, routing, and other common API management related functions. The Microgateway is also capable of processing the incoming and outgoing message while performing throttling by collecting the processed details.
Why Microgateway?
WSO2 API Microgateway simplifies the process of creating, deploying and securing APIs within distributed microservice architectures.[1]
Troubleshooting
In order to troubleshoot the Microgateway, here I will guide you to enable two kinds of logs as HTTP-TRACE logs and the SSL-DEBUG logs.
- HTTP-TRACE logs
You can enable the HTTP-TRACE logs by starting the Microgateway-Runtime using the below command.
gateway <path-to-MGW-executable-file> -e b7a.http.tracelog.console=true
Example command
gateway /Users/saneth/TestProjoct/petstore-project/target/petstore-project.balx -e b7a.http.tracelog.console=true
Then the details will be printed like below.
[2019–12–21 13:26:08,461] TRACE {http.tracelog.upstream} — [
[2019–12–21 13:26:08,243] TRACE {http.tracelog.downstream} — [
Please refer to the sample log for a MockAPI at the bottom of this blog.
- SSL-DEBUG logs
To enable the SSL-DEBUG logs, add the below segment to the ‘ballerina.sh’ file located in the ‘<MICRO_GW_HOME>/runtime/bin’ directory.
-Djavax.net.debug=ssl:handshake \
So the ‘$JAVACMD’ block will look like below.

Sample TRACE log


References