502 error for babybuddy containter

I simply cannot access the babybuddy gui at all. Continuously getting ‘502 Bad Gateway nginx’ errors. None of my other containers have behaved this way.

As you can see from the docker-compose comments, I deviated from the standard configuration after consulting the babybuddy docs. However, I quickly felt like I was solving different problems (ssl certificites, nginx, etc…) and modifiying files that I dont usually touch (out kicking my coverage).

I do see the logs pointing to an incorrect timezone, very confused by that behavior. I also dont know why this is the only container I’ve noticed that does not have a puid/pgid.

Any guidence would be appreciated. Really hoping to get this fired up in the next week before baby #2 arrives.

#babybuddy
  babybuddy:
    image: lscr.io/linuxserver/babybuddy
    container_name: babybuddy
    environment:
      - TZ=USA/New_York
      - CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8000,https://babybuddy.domain.com
#      - CSRF_TRUSTED_ORIGINS=https://babybuddy.rufty.com
#      - SECURE_PROXY_SSL_HEADER=True
    volumes:
      - /opt/babybuddy/config:/config
    ports:
      - 8000:8000
    restart: unless-stopped

#ngix for babybuddy
#  babybuddy-nginx:
#    image: nginx
#    container_name: babybuddy-nginx
#    volumes:
#      - /opt/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
#      - /opt/nginx/logs:/var/log/nginx
#      - /opt/nginx/certs:/certs
#    ports:
#      - 80:80
#      - 443:443
#    depends_on:
#      - babybuddy


Snip of logs

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/gunicorn", line 8, in <module>
    sys.exit(run())
  File "/usr/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/usr/lib/python3.9/site-packages/gunicorn/app/base.py", line 231, in run
    super().run()
  File "/usr/lib/python3.9/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/usr/lib/python3.9/site-packages/gunicorn/arbiter.py", line 229, in run
    self.halt(reason=inst.reason, exit_status=inst.exit_status)
  File "/usr/lib/python3.9/site-packages/gunicorn/arbiter.py", line 342, in halt
    self.stop()
  File "/usr/lib/python3.9/site-packages/gunicorn/arbiter.py", line 393, in stop
    time.sleep(0.1)
  File "/usr/lib/python3.9/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
    self.reap_workers()
  File "/usr/lib/python3.9/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
[2022-05-28 02:47:34 +0000] [8083] [INFO] Starting gunicorn 20.1.0
[2022-05-28 02:47:34 +0000] [8083] [INFO] Listening at: http://127.0.0.1:3000 (8083)
[2022-05-28 02:47:34 +0000] [8083] [INFO] Using worker: gthread
[2022-05-28 02:47:34 +0000] [8086] [INFO] Booting worker with pid: 8086
[2022-05-28 02:47:34 +0000] [8087] [INFO] Booting worker with pid: 8087
[2022-05-28 02:47:34 +0000] [8086] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
    worker.init_process()
  File "/usr/lib/python3.9/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
    super().init_process()
  File "/usr/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/usr/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
  File "/usr/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 855, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/app/babybuddy/babybuddy/wsgi.py", line 9, in <module>
    application = get_wsgi_application()
  File "/usr/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
    django.setup(set_prefix=False)
  File "/usr/lib/python3.9/site-packages/django/__init__.py", line 19, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/usr/lib/python3.9/site-packages/django/conf/__init__.py", line 84, in __getattr__
    self._setup(name)
  File "/usr/lib/python3.9/site-packages/django/conf/__init__.py", line 71, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/lib/python3.9/site-packages/django/conf/__init__.py", line 215, in __init__
    raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)
ValueError: Incorrect timezone setting: USA/New_York
[2022-05-28 02:47:34 +0000] [8086] [INFO] Worker exiting (pid: 8086)
[2022-05-28 02:47:34 +0000] [8087] [ERROR] Exception in worker process

USA/New_York is not a valid option for TZ

Also the missing PUID/PGID is an oversight. You should add both of them in. We’ll fix the readme.

Interesting. I have this TZ for 7 other containers and this is the first issue I’ve had. For education, why is that the case?

---
version: "2.1"
services:
  plex:
    image: ghcr.io/linuxserver/plex
    container_name: plex
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - VERSION=docker
      - PLEX_CLAIM= #optional
    volumes:
      - /opt/plex_data:/config
      - /tankpool/plex_media:/plex_media
    restart: unless-stopped

  sabnzbd:
    image: ghcr.io/linuxserver/sabnzbd
    container_name: sabnzbd
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=USA/New_York
    volumes:
      - /opt/sabnzbd/config:/config
      - /tankpool/downloads/usenet:/downloads/usenet
#      - /tankpool/incomplete-downloads:/incomplete-downloads #optional
    ports:
      - 8080:8080
      - 9090:9090
    restart: unless-stopped

  ombi:
    image: ghcr.io/linuxserver/ombi
    container_name: ombi
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=USA/New_York
      - BASE_URL=/ombi #optional
    volumes:
      - /opt/ombi/config:/config
    ports:
      - 3579:3579
    restart: unless-stopped


  piwigo:
    image: ghcr.io/linuxserver/piwigo
    container_name: piwigo
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=USA/New_York
    volumes:
      - /opt/piwigo/config:/config
    ports:
      - 70:70
    restart: unless-stopped

# Radarr
  radarr:
    image: ghcr.io/linuxserver/radarr
    container_name: radarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=USA/New_York
    volumes:
      - /opt/radarr/config:/config
      - /tankpool/plex_media/movies:/plex_media/movies #optional
      - /tankpool/downloads/usenet:/downloads/usenet #optional
    ports:
      - 7878:7878
    restart: unless-stopped
# Sonarr
  sonarr:
    image: ghcr.io/linuxserver/sonarr
    container_name: sonarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=USA/New_York
    volumes:
      - /opt/sonarr/config:/config
      - /tankpool/plex_media/tv:/plex_media/tv #optional
      - /tankpool/downloads/usenet:/downloads/usenet #optional
    ports:
      - 8989:8989
    restart: unless-stopped
# Lidarr
  lidarr:
    image: ghcr.io/linuxserver/lidarr
    container_name: lidarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=USA/New_York
    volumes:
      - /opt/lidarr/config:/config
      - /tankpool/plex_media/music:/plex_media/music #optional
      - /tankpool/downloads/usenet:/downloads/usenet #optional
    ports:
      - 8686:8686
    restart: unless-stopped
#tautulli
  tautulli:
    image: ghcr.io/linuxserver/tautulli
    container_name: tautulli
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=USA/New_York
    volumes:
      - /opt/tautulli/config:/config
   ports:
      - 8181:8181
    restart: unless-stopped

#babybuddy
  babybuddy:
    image: lscr.io/linuxserver/babybuddy
    container_name: babybuddy
    environment:
      - TZ=USA/New_York
#      - CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8000,https://babybuddy.domain.com
      - CSRF_TRUSTED_ORIGINS=https://babybuddy.rufty.com
      - SECURE_PROXY_SSL_HEADER=True
    volumes:
      - /opt/babybuddy/config:/config
    ports:
      - 8000:8000
    restart: unless-stopped

#ngix for babybuddy
#  babybuddy-nginx:
#    image: nginx
#    container_name: babybuddy-nginx
#    volumes:
#      - /opt/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
#      - /opt/nginx/logs:/var/log/nginx
#      - /opt/nginx/certs:/certs
#    ports:
#      - 80:80
#      - 443:443
#    depends_on:
#      - babybuddy

it is the case because it’s just incorrect…as aptalca showed you in the link… you can’t just make stuff up and expect it to work :stuck_out_tongue:

You hit the nail on the head to my poorly phrased question. It has worked for other containers for a year + when it appears that it shouldn’t have. Just curious as to why/how that could have happened.

In no way, shape or form insinuating USA/New_York is correct. Only trying to understand how these things work.