All Products
Search
Document Center

Mobile Platform as a Service:Gateway exception troubleshooting

Last Updated:Aug 10, 2023

Single request troubleshooting

1. Capture client-side request packets

Generally, Charles (recommended) or Fiddler tool is used to capture client-side packets. With the packet capture tool, you can find some critical data of the RPC requests.

Here is an example of packet capture:

  • Example of request header:

    38
  • Example of response header:

    39

2. Query MGS log by TraceId (for private cloud only)

  1. Obtain Mgw-TraceId from the response header.

  2. In mPaaS console, select the target App, go to the Mobile Gateway > Gateway management> Tools > Trace analysis page, and enter the TraceId to parse the corresponding MGS server IP and processing time of the request.

  3. Connect MGS server through SSH, and then query the request-related logs by TraceId.

    ssh -p2022 account@IP account/password
    cd /home/admin/logs/gateway
    grep #traceid# *.log
  4. Analyze logs according to the Gateway logs and Gateway result codes.

Cluster GREP troubleshooting (for private cloud only)

Sometimes, you may need to search a certain log in MGS cluster. At this time, you can use the open-source PSSH tool.

  1. Download PSSH tool.

  2. Export the server IP list of MGS from Gamma platform to mgs_host.txt file, for example:

     log@10.2.216.33:2022
     log@10.2.216.26:2022
     log@10.2.216.25:2022
  3. Run the following command:

    pssh -i -h mgs_host.txt -A -P 'grep "xxxx" /home/admin/logs/gateway/xxx.log'