Posts tagged with docker-compose

After proceed with the installation of WhatsApp Business API (developer single instance) in docker on windows 10 Enterprise, I´m facing the following msg error when using https://192.168.43.200:8080/v1/health by postman Error msg: { "meta": { "version": "v2.33.3", "api_status": "stable" }, "errors": [ { "code": 1014, "title": "Internal error", "details": "php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution. Please check if wacore is running: wacore:6252" } ] }

Looking in log files it´s seems that the core is listening in one port that is different from expected by web

---> Web log [2021-02-24 12:46:38.560338] app.INFO: [064af96616514f6f8b41fc530047db4b] Matched route "{route}". {"route":"GET_v1_health","route_parameters":{"_controller":"WhatsApp\Controller\HealthController::getHealth","_route":"GET_v1_health"},"request_uri":"https://192.168.43.200:8080/v1/health","method":"GET"} []

[2021-02-24 12:46:38.587929] app.INFO: [064af96616514f6f8b41fc530047db4b] Guard authentication successful! {"token":"[object] (Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken: PostAuthenticationGuardToken(user="admin", authenticated=true, roles="ROLE_ADMIN"))","authenticator":"WhatsApp\Security\TokenAuthenticator"} []

[2021-02-24 12:47:14.646964] app.INFO: [064af96616514f6f8b41fc530047db4b] Response: {"meta":{"version":"v2.33.3","api_status":"stable"},"errors":[{"code":1014,"title":"Internal error","details":"php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution. Please check if wacore is running: wacore:6252"}]} []

[2021-02-24 12:47:14.650236] app.INFO: [064af96616514f6f8b41fc530047db4b] Request GET_/v1/health returns 500 in 36269.15 ms [] []

=================================================================================== Core log D 2021-02-24 12:10:39.282 UTC 28 apiendpointmanager.cpp:190] Endpoint "healthcheck" is listening on address "0.0.0.0" port 6253 req_id=Main D 2021-02-24 12:10:39.282 UTC 29 apiendpointmanager.cpp:190] Endpoint "control" is listening on address "0.0.0.0" port 6252 req_id=Main

===================================================================================

$ docker network ls NETWORK ID NAME DRIVER SCOPE 9d811d5d3283 Default Switch ics local 27dc22b69113 nat nat local 4e2733cd792d none null local

$ docker container ls -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8d7000856b95 docker.whatsapp.biz/web:v2.33.3 "/opt/whatsapp/bin/w…" 17 hours ago Exited (4294967295) 6 minutes ago postgres_waweb_1 909781cdb775 docker.whatsapp.biz/coreapp:v2.33.3 "/opt/whatsapp/bin/w…" 17 hours ago Up 5 minutes 6250-6253/tcp postgres_wacore_1 7d68b7a61cad postgres:10.6 "docker-entrypoint.s…" 17 hours ago Up 6 minutes 5432/tcp, 33060/tcp, 0.0.0.0:33060->3306/tcp postgres_db_1 219b1e393f21 nginx "/docker-entrypoint.…" 42 hours ago Exited (4294967295) 41 hours ago nostalgic_jennings

Regards,

Currently i am working on whatsapp business api setup using docker . I have followed the instructions specified in installation document.

Installation done successfully and all containers are running fine. When i am performing the health check getting the below response

{     "health": {         "192.168.99.124:337e5a74fec8": {             "gateway_status": "unregistered",             "role": "primary_master"         },         "192.168.99.125:f6d56ce7a303": {             "errors": [                 {                     "code": 1011,                     "title": "Service not ready",                     "details": "Wacore is not instantiated. Please check wacore log for details."                 }             ]         },         "192.168.99.125:f18358cd1dff": {             "errors": [                 {                     "code": 1011,                     "title": "Service not ready",                     "details": "Wacore is not instantiated. Please check wacore log for details."                 }             ]         }     },     "meta": {         "version": "v2.25.5",         "api_status": "stable"     } } 

Two of the core containers (master and wacore) not getting instantiated. i verified my containers, all are running .

Does any one faced this issue ? or this one is the normal because response always giving 200 status code .

I am trying to use whatsapp business api. But the problem is when I run docker-compose up I get the error Mysql not yet started. Though the wadebug tool shows everything correct. I am not able to hit any api eg GET https://localhost:9090/v1/settings/application I am getting connection refused in this request.enter image description here

I have also one more doubt.Am I hitting the right api or is there any different. In their documentation it is written your app hostname. Docker-compose ps shows 0.0.0.0:9000->443. So is it right?

Here is my docker-compose file:

   version: '3' volumes:   whatsappMedia:     driver: local   mysqlData:     driver: local services:   db:     image: mysql:5.7.22     restart: always     environment:       MYSQL_ROOT_PASSWORD: hello123       MYSQL_USER: root       MYSQL_PASSWORD: hello123     expose:         - "33060"     ports:         - "33060:3306"     volumes:      - mysqlData:/var/lib/mysql     network_mode: bridge   wacore:     image: docker.whatsapp.biz/coreapp:v${WA_API_VERSION:?Run docker-compose with env var WA_API_VERSION (ex. WA_API_VERSION=2.25.1 docker-compose <command> <options>)}     command: ["/opt/whatsapp/bin/wait_on_mysql.sh", "/opt/whatsapp/bin/launch_within_docker.sh"]     volumes:      - whatsappMedia:/usr/local/wamedia     env_file:       - db.env     environment:       # This is the version of the docker templates being used to run WhatsApp Business API       WA_RUNNING_ENV_VERSION: v2.2.3       ORCHESTRATION: DOCKER-COMPOSE     depends_on:       - "db"     network_mode: bridge     links:       - db   waweb:     image: docker.whatsapp.biz/web:v${WA_API_VERSION:?Run docker-compose with env var WA_API_VERSION (ex. WA_API_VERSION=2.25.1 docker-compose <command> <options>)}     command: ["/opt/whatsapp/bin/wait_on_mysql.sh", "/opt/whatsapp/bin/launch_within_docker.sh"]     ports:      - "9090:443"     volumes:      - whatsappMedia:/usr/local/wamedia     env_file:       - db.env     environment:       WACORE_HOSTNAME: wacore       # This is the version of the docker templates being used to run WhatsApp Business API       WA_RUNNING_ENV_VERSION: v2.2.3       ORCHESTRATION: DOCKER-COMPOSE     depends_on:       - "db"       - "wacore"     links:       - db       - wacore     network_mode: bridge 

While trying Developer setup: Single Instance from WhatsApp Business Api with following documentation at https://developers.facebook.com/docs/whatsapp/installation/dev-single-instance#setup

Getting the following error while trying Initial Setup#Step 7

Their was an error in connecting https://localhost:9090/v1/health 

Using postman collection as suggested in Step 6. Seems to be docker issue, but not sure.

Any idea?

I am trying to configure or setup the production environment of whatsapp business api as mentioned in the link https://developers.facebook.com/docs/whatsapp/installation/prod-single-instance I have done everything mentioned in this my dockers are also running on port:9090 as can be seen in the image still I can't access it. Whenever I try to call https://localhost:9090 the error with "This site can’t be reached" occurs. Whatsapp business api does not have good documentation or tutorials till now. So this site is the only last way for me.