Troubleshooting the WSO2 MicroGateway

Saneth Maduranga
2 min readDec 21, 2019

--

Source: https://vivaldi.com/blog/troubleshoot-common-problems-vivaldi/

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

[1] https://wso2.com/api-management/api-microgateway/

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Saneth Maduranga
Saneth Maduranga

No responses yet

Write a response