'Whatsapp Business API Developer not working
I was tring to configure and setup the developer environment of a single instance of the WhatsApp Business API.I had finished #Step 5 https://developers.facebook.com/docs/whatsapp/installation/dev-single-instance#step-5--verify-containers-are-running and the docker is running. enter image description here
Whenever I try to call https://localhost:9090 in browser but the error is "This site can’t be reached".
then i used the command docker-compose logs,the error is MySQL is not up yet - sleeping and getaddrinfo for host "db" port 3306: Name or service not known
enter image description here
Here is db.env code
WA_DB_ENGINE=MYSQL
WA_DB_HOSTNAME=db
WA_DB_PORT=3306
WA_DB_USERNAME=root
WA_DB_PASSWORD=testpass
WA_DB_CONNECTION_IDLE_TIMEOUT=180000
So anyone have idea please, thanks a lot.
Solution 1:[1]
In db name you must put the address that the docker container will have.
db.env file
WA_DB_ENGINE=MYSQL
WA_DB_HOSTNAME=172.17.0.2
WA_DB_PORT=3306
WA_DB_USERNAME=userName
WA_DB_PASSWORD=Pass123
WA_DB_CONNECTION_IDLE_TIMEOUT=180000
docker-compose.yml file
environment:
MYSQL_ROOT_PASSWORD: Pass123
MYSQL_USER: userName
MYSQL_PASSWORD: Pass123
Solution 2:[2]
System is not able to resolve "db" to your mysql container. Use the name of the mysql container in WA_DB_HOSTNAME. Alternatively, point "db" to the correct mysql container by making /etc/hosts entry.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | jose insfran |
| Solution 2 | Tarun Dev |

