[GH-ISSUE #218] ERROR: for frontend Container XXX is unhealthy #213

Closed
opened 2026-02-27 15:55:39 +03:00 by kerem · 4 comments
Owner

Originally created by @machetto on GitHub (Feb 1, 2019).
Original GitHub issue: https://github.com/RD17/ambar/issues/218

Getting this message:
ERROR: for frontend Container "5a4675b05333" is unhealthy.
ERROR: Encountered errors while bringing up the project.

Running "docker ps" shows an "ambar-webapi:latest" is in an "unhealthy" state.

Running "docker logs containerhash" returns the following:
Started on :::8080

Running "curl -f localhost:8080/api" returns some data:
"{"version":"2.1.18","uiLang":"en","rawConfig":{"localPort":8080,"bodyLimit":"1024mb","corsHeaders":["Link"],"mongoDbU......"

Rerunning "docker-compose up -d" doesnt fix anything.

Content of docker-compose.yml:

version: "2.1"
networks:
  internal_network:
services:
  db:
    restart: always
    networks:
      - internal_network
    image: ambar/ambar-mongodb:latest
    environment:
      - cacheSizeGB=2
    volumes:
      - /opt/ambar/db:/data/db
    expose:
      - "27017"
  es:
    restart: always
    networks:
      - internal_network
    image: ambar/ambar-es:latest
    expose:
      - "9200"
    environment:
      - cluster.name=ambar-es
      - ES_JAVA_OPTS=-Xms2g -Xmx2g
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    cap_add:
      - IPC_LOCK
    volumes:
      - /opt/ambar/es:/usr/share/elasticsearch/data
  rabbit:
    restart: always
    networks:
      - internal_network
    image: ambar/ambar-rabbit:latest
    hostname: rabbit
    expose:
      - "15672"
      - "5672"
    volumes:
      - /opt/ambar/rabbit:/var/lib/rabbitmq
  redis:
    restart: always
    sysctls:
      - net.core.somaxconn=1024
    networks:
      - internal_network
    image: ambar/ambar-redis:latest
    expose:
      - "6379"
  serviceapi:
    depends_on:
      redis:
        condition: service_healthy
      rabbit:
        condition: service_healthy
      es:
        condition: service_healthy
      db:
        condition: service_healthy
    restart: always
    networks:
      - internal_network
    image: ambar/ambar-serviceapi:latest
    expose:
      - "8081"
    environment:
      - mongoDbUrl=mongodb://db:27017/ambar_data
      - elasticSearchUrl=http://es:9200
      - redisHost=redis
      - redisPort=6379
      - rabbitHost=amqp://rabbit
      - langAnalyzer=ambar_en
  webapi:
    depends_on:
      serviceapi:
        condition: service_healthy
    restart: always
    networks:
      - internal_network
    image: ambar/ambar-webapi:latest
    expose:
      - "8080"
    ports:
      - "8080:8080"
    environment:
      - uiLang=en
      - mongoDbUrl=mongodb://db:27017/ambar_data
      - elasticSearchUrl=http://es:9200
      - redisHost=redis
      - redisPort=6379
      - serviceApiUrl=http://serviceapi:8081
      - rabbitHost=amqp://rabbit
  frontend:
    depends_on:
      webapi:
        condition: service_healthy
    image: ambar/ambar-frontend:latest
    restart: always
    networks:
      - internal_network
    ports:
      - "80:80"
    expose:
      - "80"
    environment:
      - api=http://10.138.79.170:8080
  pipeline0:
    depends_on:
      serviceapi:
        condition: service_healthy
    image: ambar/ambar-pipeline:latest
    restart: always
    networks:
      - internal_network
    environment:
      - id=0
      - api_url=http://serviceapi:8081
      - rabbit_host=amqp://rabbit
  testcrawler:
    depends_on:
      serviceapi:
        condition: service_healthy
    image: ambar/ambar-local-crawler
    restart: always
    networks:
      - internal_network
    expose:
      - "8082"
    environment:
      - name=testcrawler
    volumes:
      - /mnt/TestCrawl:/usr/data

Originally created by @machetto on GitHub (Feb 1, 2019). Original GitHub issue: https://github.com/RD17/ambar/issues/218 Getting this message: _ERROR: for frontend Container "5a4675b05333" is unhealthy. ERROR: Encountered errors while bringing up the project._ Running "docker ps" shows an "ambar-webapi:latest" is in an "unhealthy" state. Running "docker logs containerhash" returns the following: Started on :::8080 Running "curl -f localhost:8080/api" returns some data: "{"version":"2.1.18","uiLang":"en","rawConfig":{"localPort":8080,"bodyLimit":"1024mb","corsHeaders":["Link"],"mongoDbU......" Rerunning "docker-compose up -d" doesnt fix anything. Content of docker-compose.yml: ``` version: "2.1" networks: internal_network: services: db: restart: always networks: - internal_network image: ambar/ambar-mongodb:latest environment: - cacheSizeGB=2 volumes: - /opt/ambar/db:/data/db expose: - "27017" es: restart: always networks: - internal_network image: ambar/ambar-es:latest expose: - "9200" environment: - cluster.name=ambar-es - ES_JAVA_OPTS=-Xms2g -Xmx2g ulimits: memlock: soft: -1 hard: -1 nofile: soft: 65536 hard: 65536 cap_add: - IPC_LOCK volumes: - /opt/ambar/es:/usr/share/elasticsearch/data rabbit: restart: always networks: - internal_network image: ambar/ambar-rabbit:latest hostname: rabbit expose: - "15672" - "5672" volumes: - /opt/ambar/rabbit:/var/lib/rabbitmq redis: restart: always sysctls: - net.core.somaxconn=1024 networks: - internal_network image: ambar/ambar-redis:latest expose: - "6379" serviceapi: depends_on: redis: condition: service_healthy rabbit: condition: service_healthy es: condition: service_healthy db: condition: service_healthy restart: always networks: - internal_network image: ambar/ambar-serviceapi:latest expose: - "8081" environment: - mongoDbUrl=mongodb://db:27017/ambar_data - elasticSearchUrl=http://es:9200 - redisHost=redis - redisPort=6379 - rabbitHost=amqp://rabbit - langAnalyzer=ambar_en webapi: depends_on: serviceapi: condition: service_healthy restart: always networks: - internal_network image: ambar/ambar-webapi:latest expose: - "8080" ports: - "8080:8080" environment: - uiLang=en - mongoDbUrl=mongodb://db:27017/ambar_data - elasticSearchUrl=http://es:9200 - redisHost=redis - redisPort=6379 - serviceApiUrl=http://serviceapi:8081 - rabbitHost=amqp://rabbit frontend: depends_on: webapi: condition: service_healthy image: ambar/ambar-frontend:latest restart: always networks: - internal_network ports: - "80:80" expose: - "80" environment: - api=http://10.138.79.170:8080 pipeline0: depends_on: serviceapi: condition: service_healthy image: ambar/ambar-pipeline:latest restart: always networks: - internal_network environment: - id=0 - api_url=http://serviceapi:8081 - rabbit_host=amqp://rabbit testcrawler: depends_on: serviceapi: condition: service_healthy image: ambar/ambar-local-crawler restart: always networks: - internal_network expose: - "8082" environment: - name=testcrawler volumes: - /mnt/TestCrawl:/usr/data ```
kerem 2026-02-27 15:55:39 +03:00
  • closed this issue
  • added the
    wontfix
    label
Author
Owner

@speedmann commented on GitHub (Feb 5, 2019):

Find out which container is 5a4675b05333 do a docker show 5a4675b05333
for me it was the elasticsearch container which failed because i ignored the sysctl config settings

<!-- gh-comment-id:460734276 --> @speedmann commented on GitHub (Feb 5, 2019): Find out which container is `5a4675b05333` do a `docker show 5a4675b05333` for me it was the elasticsearch container which failed because i ignored the sysctl config settings
Author
Owner

@machetto commented on GitHub (Feb 5, 2019):

My sysctl settings are configured and elasticsearch is in a healthy state.
docker show command doesn't exist.. Did you mean docker logs?
5a4675b05333 is a webapi container:

CONTAINER ID        IMAGE                           COMMAND                  CREATED             STATUS                 
d25c0e982164        ambar/ambar-local-crawler       "/bin/sh -c 'node --…"   4 days ago          Up 4 days (healthy)    
0301345d7f53        ambar/ambar-pipeline:latest     "/bin/sh -c 'python …"   4 days ago          Up 4 days (healthy)    
5a4675b05333        ambar/ambar-webapi:latest       "/bin/sh -c 'node di…"   4 days ago          Up 4 days (unhealthy)  
fe2a87d80cce        ambar/ambar-serviceapi:latest   "/bin/sh -c 'node di…"   4 days ago          Up 4 days (healthy)    
03d9017d0782        ambar/ambar-mongodb:latest      "/entrypoint.sh"         4 days ago          Up 4 days (healthy)    
7b50a5b02c5f        ambar/ambar-rabbit:latest       "docker-entrypoint.s…"   4 days ago          Up 4 days (healthy)    
0f187eb59cbb        ambar/ambar-es:latest           "/docker-entrypoint.…"   4 days ago          Up 4 days (healthy)    
6ede14eac61c        ambar/ambar-redis:latest        "docker-entrypoint.s…"   4 days ago          Up 4 days (healthy)    
docker logs 5a4675b05333
Started on :::8080
<!-- gh-comment-id:460811910 --> @machetto commented on GitHub (Feb 5, 2019): My sysctl settings are configured and elasticsearch is in a healthy state. docker show command doesn't exist.. Did you mean docker logs? 5a4675b05333 is a webapi container: ``` CONTAINER ID IMAGE COMMAND CREATED STATUS d25c0e982164 ambar/ambar-local-crawler "/bin/sh -c 'node --…" 4 days ago Up 4 days (healthy) 0301345d7f53 ambar/ambar-pipeline:latest "/bin/sh -c 'python …" 4 days ago Up 4 days (healthy) 5a4675b05333 ambar/ambar-webapi:latest "/bin/sh -c 'node di…" 4 days ago Up 4 days (unhealthy) fe2a87d80cce ambar/ambar-serviceapi:latest "/bin/sh -c 'node di…" 4 days ago Up 4 days (healthy) 03d9017d0782 ambar/ambar-mongodb:latest "/entrypoint.sh" 4 days ago Up 4 days (healthy) 7b50a5b02c5f ambar/ambar-rabbit:latest "docker-entrypoint.s…" 4 days ago Up 4 days (healthy) 0f187eb59cbb ambar/ambar-es:latest "/docker-entrypoint.…" 4 days ago Up 4 days (healthy) 6ede14eac61c ambar/ambar-redis:latest "docker-entrypoint.s…" 4 days ago Up 4 days (healthy) ``` ``` docker logs 5a4675b05333 Started on :::8080 ```
Author
Owner

@machetto commented on GitHub (Feb 5, 2019):

Also even though:

[root@mypc01 WebApi]# curl -f localhost:8080/api
{"version":"2.1.18","uiLang":"en","rawConfig":{"localPort":8080,"bodyLimit"......

however:

[root@mypc01 WebApi]# docker exec -i -t 5a4675b05333 /bin/bash
root@5a4675b05333:/# curl -f localhost:8080/api
curl: (22) The requested URL returned error: 400 Bad Request
<!-- gh-comment-id:460839943 --> @machetto commented on GitHub (Feb 5, 2019): Also even though: ``` [root@mypc01 WebApi]# curl -f localhost:8080/api {"version":"2.1.18","uiLang":"en","rawConfig":{"localPort":8080,"bodyLimit"...... ``` however: ``` [root@mypc01 WebApi]# docker exec -i -t 5a4675b05333 /bin/bash root@5a4675b05333:/# curl -f localhost:8080/api curl: (22) The requested URL returned error: 400 Bad Request ```
Author
Owner

@stale[bot] commented on GitHub (Feb 20, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

<!-- gh-comment-id:465800966 --> @stale[bot] commented on GitHub (Feb 20, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ambar#213
No description provided.