chsasank / outline-wiki-docker-compose

Installation and docker compose to self host outline wiki: https://www.getoutline.com/
295 stars 77 forks source link

Bad Gateway - 502 #9

Closed filipe-guimaraes closed 3 years ago

filipe-guimaraes commented 4 years ago

Hi! I am stuck in a 502 - Bad Gateway problem when trying to access the application. I have followed all the steps, but I can get out of this problem. I have already tried on localhost and in a EC2 instance in AWS. Do you have some idea about what could be the cause of the problem?

chsasank commented 4 years ago

May be nginx? Logs would help.

MDXDave commented 4 years ago

Are you using the newest build v0.48.1? Then you need to adjust your docker-compose.yml file according to this commit: 4a6276663bb58c87f262592b92764cee54f72df5

nickali commented 3 years ago

I ran into this issue as well. It occurred when I changed the local volumes in docker-compose.yml from ./data to /srv/outline/data. The nginx configuration files were not copied over to /srv/outline/data/nginx. If you copy them over manually, it works fine.

jpvalery commented 3 years ago

Hi everyone,

Thanks for the great work with this. I'm running into this issue as well.

cloned this repo and just made an edit to the docker-compose.yml to use tobi312/minio as I'm trying to run this on a Raspberry pi 4.

image

Here's my terminal output: Capture d’écran, le 2021-09-26 à 12 35 07

and my docker-compose.yml:

version: "3"
services:
  redis:
    image: redis
    restart: always
  postgres:
    image: postgres
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: pass
      POSTGRES_DB: outline
    volumes:
      - ./data/pgdata:/var/lib/postgresql/data
    restart: always
  minio:
    image: tobi312/minio
    volumes:
      - ./data/minio_root:/minio_root:z
      - ./data/certs:/root/.minio/certs:z
    command: "minio server /minio_root"
    env_file: ./env.minio
    restart: always
  outline:
    image: outlinewiki/outline:latest
    command: sh -c "yarn sequelize:migrate --env production-ssl-disabled && yarn start"
    environment:
      - DATABASE_URL=postgres://user:pass@postgres:5432/outline
      - DATABASE_URL_TEST=postgres://user:pass@postgres:5432/outline-test
      - REDIS_URL=redis://redis:6379
    env_file:
      - ./env.outline
      - ./env.slack
    restart: always
    depends_on:
      - postgres
      - redis
      - minio
  nginx:
    image: nginx
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./data/nginx/:/etc/nginx/conf.d/:z
      - ./data/certs/:/etc/ssl/certs/:z
    restart: always
    depends_on:
      - outline

Any idea what could be causing this?

Update: checking the logs for the nginx container:

2021/09/26 23:55:22 [error] 31#31: *1 connect() failed (113: No route to host) while connecting to upstream, client: 172.19.0.1, server: , request: "GET / HTTP/2.0", upstream: "http://172.19.0.3:3000/", host: "pi4.local"
172.19.0.1 - - [26/Sep/2021:23:55:22 +0000] "GET / HTTP/2.0" 502 157 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Firefox/92.0" "-"
172.19.0.1 - - [26/Sep/2021:23:55:22 +0000] "GET /favicon.ico HTTP/2.0" 499 0 "https://pi4.local/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Firefox/92.0" "-"
GGServersDevelopment commented 2 years ago

I'm having the same issue on Centos7 on a dedicated server, any luck?

MDXDave commented 2 years ago

Start the container with bash attached. I am sure you will see some error messages 😄

E.g.: docker run -i -t --entrypoint /bin/bash DOCKERID

VityaSchel commented 2 years ago

issue is closed but still present in newest commits huh I didn't expected anything else from docker and outline, all guides are basically not working

huds0nx commented 11 months ago

I'm receiving this error now as well, and I double checked all of my config files and they look correct. When I check my docker logs, I see these two errors coming up frequently:

recv() failed (104: Connection reset by peer) while reading response header from upstream, client: {my ip}, server: {my domain}, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:3000/favicon.ico", host: {my droplet ip}

upstream prematurely closed connection while reading response header from upstream, client: {my ip}, server: {my domain}, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:3000/", host: {my droplet ip}

What could be the issue?