Nginx stucks at 'starting nginx...'

Infos:

  • Used Zammad version: zammad/zammad-docker-compose:5.4.0
  • Used Zammad installation type: docker-compose
  • Operating system: Ubuntu 20.04
  • Browser + version: 111.0.5563.146

Expected behavior:

  • Any kind of logs to indentify to issue

Actual behavior:

  • docker logs --follow :
waiting for init container to finish install or update...
starting nginx...

Steps to reproduce the behavior:

docker-compose.yml:

  version: '3'
  networks:
    traefik:
      external:
        name: traefik
    zammad:
      name: zammad
  services:
  #------------------------------------------------------------Zammad Elasticsearch-------------------------------#
    zammad-elasticsearch:
      image: bitnami/elasticsearch:8.5.1
      restart: ${RESTART}
      volumes:
        - ./elasticsearch-data:/usr/share/elasticsearch/data
      environment:
        - discovery.type=single-node
        - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        - ingest.geoip.enabled=false
      networks:
      - zammad
  #------------------------------------------------------------Zammad Init ---------------------------------------#
    zammad-init:
      command: ["zammad-init"]
      depends_on:
        - zammad-postgresql
      environment:
        - MEMCACHE_SERVERS=${MEMCACHE_SERVERS}
        - POSTGRESQL_USER=${POSTGRES_USER}
        - POSTGRESQL_PASS=${POSTGRES_PASS}
        - REDIS_URL=${REDIS_URL}
      image: ${IMAGE_REPO}:${VERSION}
      restart: on-failure
      volumes:
        - ./zammad-data:/opt/zammad
      networks:
      - zammad
  #------------------------------------------------------------Zammad Memory Caching-------------------------------#
    zammad-memcached:
      command: memcached -m 256M
      image: memcached:1.6.17-alpine
      restart: ${RESTART}
      networks:
      - zammad
  #------------------------------------------------------------Zammad Nginx ---------------------------------------#
    zammad-nginx:
      command: ["zammad-nginx"]
      depends_on:
        - zammad-railsserver
      image: ${IMAGE_REPO}:${VERSION}
      restart: ${RESTART}
      volumes:
        - ./zammad-data:/opt/zammad
        - ./default:/data/zammad
      labels:
        - "traefik.enable=true"
        - "traefik.docker.network=traefik"
        - "traefik.http.routers.zammad.rule=Host(`xxx`)"
        - "traefik.http.routers.zammad.tls.certresolver=letsencrypt"
        - "traefik.http.routers.zammad.entrypoints=websecure"
        - "traefik.http.routers.zammad.service=zammad"
        - "traefik.http.services.zammad.loadbalancer.server.port=8080"
      expose:
        - "8080"
      environment:
       - RAILS_TRUSTED_PROXIES=['127.0.0.1', '::1', 'traefik']
       - NGINX_SERVER_SCHEME=https
      networks:
        - zammad
        - traefik
  #------------------------------------------------------------Zammad Postgres --------------------------------------#
    zammad-postgresql:
      environment:
        - POSTGRES_USER=${POSTGRES_USER}
        - POSTGRES_PASSWORD=${POSTGRES_PASS}
      image: postgres:${POSTGRES_VERSION}
      restart: ${RESTART}
      volumes:
        - ./postgresql-data:/var/lib/postgresql/data
      networks:
      - zammad
  #------------------------------------------------------------Zammad Railserver ------------------------------------#
    zammad-railsserver:
      command: ["zammad-railsserver"]
      depends_on:
        - zammad-memcached
        - zammad-postgresql
        - zammad-redis
      environment:
        - MEMCACHE_SERVERS=${MEMCACHE_SERVERS}
        - REDIS_URL=${REDIS_URL}
      image: ${IMAGE_REPO}:${VERSION}
      restart: ${RESTART}
      volumes:
        - ./zammad-data:/opt/zammad
      networks:
      - zammad
  #------------------------------------------------------------Zammad Redis -----------------------------------------#
    zammad-redis:
      image: redis:7.0.5-alpine
      restart: ${RESTART}
      networks:
        - zammad
  #------------------------------------------------------------Zammad Scheduler -------------------------------------#
    zammad-scheduler:
      command: ["zammad-scheduler"]
      depends_on:
        - zammad-memcached
        - zammad-railsserver
        - zammad-redis
      environment:
        - MEMCACHE_SERVERS=${MEMCACHE_SERVERS}
        - REDIS_URL=${REDIS_URL}
      image: ${IMAGE_REPO}:${VERSION}
      restart: ${RESTART}
      volumes:
        - ./zammad-data:/opt/zammad
      networks:
        - zammad
  #------------------------------------------------------------Zammad Websocket -------------------------------------#
    zammad-websocket:
      command: ["zammad-websocket"]
      depends_on:
        - zammad-memcached
        - zammad-railsserver
        - zammad-redis
      environment:
        - MEMCACHE_SERVERS=${MEMCACHE_SERVERS}
        - REDIS_URL=${REDIS_URL}
      image: ${IMAGE_REPO}:${VERSION}
      restart: ${RESTART}
      volumes:
        - ./zammad-data:/opt/zammad
      networks:
        - zammad

  volumes:
    elasticsearch-data:
      driver: local
    postgresql-data:
      driver: local
    zammad-data:
      driver: local

Traefik Dashboard shows me that, the route is created and reachable:

nginx conf:

#
# this is an example nginx config for using SSL with zammad
# this can be adjusted to be used with self-signed, trusted ca and letsencrypt certs
# this example uses letsencrypt certs. replace all occurrences of example.com with your domain
# If using LetsEncrypt create letsencrypt certificate by: certbot certonly --webroot -w /var/www/html -d www.example.com
# create dhparam.pem by: openssl dhparam -out /etc/nginx/ssl/dhparam.pem 4096
# download LetsEncrypt x3 certificate by: wget -q https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem -P /etc/nginx/ssl
# you can test your ssl configuration @ https://www.ssllabs.com/ssltest/analyze.html
#

upstream zammad-railsserver {
  server 127.0.0.1:3000;
}

upstream zammad-websocket {
  server 127.0.0.1:6042;
}

server {
  listen 80;
  listen [::]:80;

  server_name _;

  # security - prevent information disclosure about server version
  server_tokens off;

  access_log /var/log/nginx/zammad.access.log;
  error_log /var/log/nginx/zammad.error.log;

  location /.well-known/ {
    root /var/www/html;
  }

  return 301 https://$server_name$request_uri;

  location / {
    try_files $uri @proxy_traefik_local;
  }

  location @proxy_traefik_local {
    proxy_pass http://xxxx:8080/;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_buffer_size          128k;
    proxy_buffers              4 256k;
    proxy_busy_buffers_size    256k;
  }

  location /auth/admin {
    try_files $uri @proxy_traefik_local;
  }
}


Did anyone else encountered this kind of issue? error logs of nginx are also empty

@MrGeneration Please close this Issue here as well. The Issue here was the falsely configurated nginx of mine.

Next time please decide for one place to post and not duplicate places, it may keep the same person busy (or even worse several) with the same topic. :slight_smile: