instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.6k stars 2.48k forks source link

Quick start: 502 Bad Gateway when accessing canvas.docker #1555

Open tuan-nng opened 4 years ago

tuan-nng commented 4 years ago

Summary:

502 Bad Gateway when accessing canvas.docker after setting up using quickstart script.

Steps to reproduce:

  1. Install canvas follow the quickstart guide with script ./script/docker_dev_setup.sh
  2. Access http://canvas.docker

Expected behavior:

Access canvas home page

Actual behavior:

502 Bad Gateway

I got the error in dory http proxy:

nginx.1    | canvas.docker 172.17.0.1 - - [24/Dec/2019:11:53:45 +0000] "GET /favicon.ico HTTP/1.1" 502 575 "https://canvas.docker/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
nginx.1    | 2019/12/24 11:54:03 [error] 86#86: *8 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: jobs.canvas-lms.docker, request: "GET / HTTP/1.1", upstream: "http://172.27.0.6:80/", host: "canvas.docker"
nginx.1    | canvas.docker 172.17.0.1 - - [24/Dec/2019:11:54:03 +0000] "GET / HTTP/1.1" 502 575 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
nginx.1    | 2019/12/24 11:54:03 [error] 86#86: *8 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: jobs.canvas-lms.docker, request: "GET /favicon.ico HTTP/1.1", upstream: "http://172.27.0.6:80/favicon.ico", host: "canvas.docker", referrer: "https://canvas.docker/"

Additional notes:

lcundiff commented 4 years ago

Have this issue as well. There doesn't seem to be a nginx conf file in /etc either.

brandonfranzke commented 4 years ago

Any chance you have a resolution. I am seeing the same thing. I exec into the container and I see the following when running curl against the root path:

$ curl -k https://localhost:443
{"status":"unauthenticated","errors":[{"message":"user authorization required"}]}

Note: I do get a page returned (at least with curl/not with browser or through proxy) with:

$ curl -k https://localhost:443/login/canvas
FossPrime commented 3 years ago

docker-compose up -d needs to be ran as root... so sudo docker-compose up -d does it.

Output should be as such:

~/canvas-lms$ sudo docker-compose up -d
canvas-lms_postgres_1 is up-to-date
canvas-lms_redis_1 is up-to-date
Creating canvas-lms_webpack_1           ... done
Creating canvas-lms_jobs_1              ... done
Creating canvas-lms_githook_installer_1 ... done
Creating canvas-lms_web_1               ... done
ma-anwar commented 3 years ago

The above proposed solution did not work for me. Bumping this in case someone found a solution

slaughter550 commented 3 years ago

@ma-anwar would you be able to paste the issue you're having? I'll try to find some resources to help resolve it or get a fix going if one is needed.

ma-anwar commented 3 years ago

Hi thanks for the quick response. I get the exact same error message and am able to reproduce using the exact same steps as the OP.

I suspect it may have something to do with Dory but am not sure how to proceed. Am trying to set up canvas LMS for lti development.