2

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.

Yuchi Wang
  • 21
  • 3

2 Answers2

1

In db name you must put the address that the docker container will have.

run command iptables -L -n enter image description here

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
-1

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.

Tarun Dev
  • 19
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 22 '21 at 08:40