我們即將停用內部部署 API。請參閱我們的內部部署 API 停用文件以取得詳細資訊,並瞭解如何轉移到我們的新一代雲端 API。
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.
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 that you can reference in Direct Support for quicker investigations.
If you are unable to use the WADebug tool, you can use the docker logs
command to retrieve logs from each container individually. For example, to retrieve logs from the waweb
container, run the following command:
docker logs <container id of waweb> >> waweb.log
You can use the various docker logs
command options to limit the size of the log files. For example, to only get the last 1000 lines of logs from the waweb
container, run the following command:
docker logs <container id of waweb> --tail 1000 >> waweb.log
To only get the waweb
container logs between a specific time duration, run the command with the --since
and --until
options, for example:
docker logs <container id of waweb> --since 2020-01-20T20:00:00Z --until 2020-01-21T08:00:00Z >> waweb.log
Run the command with all WhatsApp containers, and send those files to WhatsApp for analysis and debugging. Refer to the official docker logs
documentation for more options.
Note: All container logs are in GMT timezone. You need to pass GMT timestamps to --since
and --until
parameters.
To obtain all logs from all WhatsApp containers, run the following command:
WA_API_VERSION=new-whatsapp-version docker-compose logs > debug_output.txt
Note: This command can generate very large log files. Refer to the "Using Docker" section for options to retrieve smaller and more relevant logs.
You can then send those files to WhatsApp for analysis and debugging.
We implemented a new crash logging system in version 2.53
, which saves dump files whenever a crash occurs. These files, known as crash dumps, are stored in the logs/
directory and are kept for 30 days. The files are only stored locally on machines and can be retrieved in the same manner as log files. Crash dumps may include memory data associated with the crashed thread.
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.
Please follow the below steps to capture the logs on an AWS setup:
Rollback on Failure
to No
to ensure logs are not deleted on failureThis needs to be set during stack creation/updating step, as seen below:
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.
Once you have access to the container, please capture the following logs and attach them to a Direct Support ticket.
sudo docker logs ecs-agent > ecs-agent.log
wadebug logs
commands to collect all container logs.WADebug
cannot be used in step 3, run the following commands to collect logs manually:
docker ps -a
to list all running containers and share the outputdocker logs <docker container id of the core app> >> wacore.log
and share logsdocker logs <docker container id of the web app> >> waweb.log
and share logsdocker cp <docker container id of the web app>:/var/log/whatsapp/web.log ./web.log
and share logsdocker cp <docker container id of the web app>:/var/log/lighttpd/error.log ./error.log
and share logsIf 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. Then select the appropriate group for the stack that has issue and select the Activity History tab.
Beginning with v2.21.3
, the WhatsApp Business API generates 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, include the values of the X-Request-ID
and X-Internal-Request-IDS
response headers in your ticket to help pinpoint and reproduce your issue.