Support Logs

In addition to using the support node to retrieve your support information, you can also retrieve Docker logs, AWS logs, and HTTP Request IDs to troubleshoot issues.

This document covers:

See Contact Support for more information on opening a Direct Support ticket.

Retrieve Docker Logs

Using WADebug (preferred)

You can use the WADebug tool to automatically collect and upload logs. You will receive a run_id as part of the response, which you can reference in Direct Support for quicker investigations. It's as simple as running the following command:

  wadebug logs --send

Note: For High Availability/Multiconnect mode where containers are installed on one or multiple hosts, you need to log onto each host, install WADebug and run the command above. You will get one run_id from each successful run of the command, which you can reference in Direct Support for quicker investigations.

Using Docker Compose

To obtain logs for troubleshooting, run the following command:

WA_API_VERSION=new-whatsapp-version docker-compose logs > debug_output.txt

You can then send those files to WhatsApp for analysis and debugging.

Retrieve Kubernetes Logs

Using kubectl

To obtain logs for a particular deployed service, such as the Webapp, in the Kubernetes setup, run the following command:

kubectl logs deployments/whatsapp-web-deployment > whatsapp-web-deployment.txt

You can then send the file to WhatsApp for analysis and debugging.

Retrieve AWS Logs

Please follow the below steps to capture the logs on an AWS setup:

Set Rollback on Failure to No to ensure logs are not deleted on failure

This needs to be set during stack creation/updating step, as seen below:

Get CloudFormation Stack creation logs and events from CloudWatch console

Connect to your EC2 instance (if created successfully)

Follow the AWS guide on how to SSH into your EC2 instance. Note that during WhatsApp Business API stack creation/updating, you can select to use either a private or public VPC. With a private VPC, you need to follow the section Securely Connect to Linux Instances Running in a Private Amazon VPC.

Getting logs

Once you have access to the container, please capture the following logs and attach them to a Direct Support ticket.

  1. sudo docker logs ecs-agent > ecs-agent.log
  2. Zip and retrieve /var/log of all EC2 instances created by the stack
  3. Install WADebug on all EC2 instances and run the wadebug logs commands to collect all container logs.
  4. If WADebug cannot be used in step 3, run the following commands to collect logs manually:
    • Run docker ps -a to list all running containers and share the output
    • Run docker logs <docker container id of the core app> >> wacore.log and share logs
    • Run docker logs <docker container id of the web app> >> waweb.log and share logs
    • Run docker cp <docker container id of the web app>:/var/log/whatsapp/web.log ./web.log and share logs
    • Run docker cp <docker container id of the web app>:/var/log/lighttpd/error.log ./error.log and share logs

Activity History

If EC2 instance is not created, then "Activity History" of appropriate Auto scaling group is required. This can be found in EC2 console -> Auto Scaling -> Auto Scaling Groups -> Select appropriate group for the stack that has issue -> Activity History

Collecting HTTP Request IDs

Beginning with v2.21.3, the WhatsApp Business API will generate unique request IDs for every incoming HTTP request that it receives. These request IDs are used to help pinpoint logs related to a particular request for fast troubleshooting. If you want to report a bug, please include values of the X-Request-ID and X-Internal-Request-IDS response headers in your ticket to help pinpoint and reproduce your issue.