toolkit
toolkit copied to clipboard
Got 502 error when hosting on Macbook Pro (M1)
Hi,
I'm going to host this docker instance on my Macbook Pro (M1) but got stuck in an error. Don't you support M1 MBP to host this image? Actually, I don't see any document mention about that.
Steps to Reproduce
- git clone toolkit repo as described in README.md
-
bin/init
and change port binding (80 to 8080) -
bin/up
and access tohttp://localhost:8080
Expected Behaviour
See an Overleaf page
Observed Behaviour
502 Bad Gateway
Context
Host Overleaf image on Macbook Pro (M1)
Technical Info
bin/doctor
====== Overleaf Doctor ======
- Host Information
- Not Linux !
- lsb_release not found !
- Dependencies
- bash
- status: present
- version info: 3.2.57(1)-release
- docker
- status: present
- version info: Docker version 20.10.6, build 370c289
- docker-compose
- status: present
- version info: docker-compose version 1.29.1, build c34c88b2
- realpath
- status: present
- version info: /Users/*****/Tools/overleaf/--version
- WARNING: Could not find 'realpath' binary, falling back to custom function
- perl
- status: present
- version info: 5.030002
- awk
- status: present
- version info: awk version 20200816
- openssl
- status: present
- version info: LibreSSL 2.8.3
- Docker Daemon
- status: up
====== Configuration ======
- config/version
- status: present
- version: 2.6.1
- config/overleaf.rc
- status: present
- values
- SHARELATEX_DATA_PATH: data/sharelatex
- SERVER_PRO: false
- SHARELATEX_PORT: 8080
- MONGO_ENABLED: true
- MONGO_DATA_PATH: data/mongo
- REDIS_ENABLED: true
- REDIS_DATA_PATH: data/redis
- NGINX_ENABLED: false
- NGINX_CONFIG_PATH: config/nginx/nginx.conf
- TLS_PRIVATE_KEY_PATH: config/nginx/certs/overleaf_key.pem
- TLS_CERTIFICATE_PATH: config/nginx/certs/overleaf_certificate.pem
- config/variables.env
- status: present
====== Warnings ======
! This system seems to not be Linux
! Could not find 'realpath' binary, falling back to custom function
====== End ======
tail /var/log/nginx/error.log
after accessed to http://localhost:8080/
2021/06/06 16:45:54 [error] 426#426: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: _, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "localhost:8080"
2021/06/06 16:45:54 [error] 426#426: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: _, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:3000/favicon.ico", host: "localhost:8080", referrer: "http://localhost:8080/"
Analysis
Hi @toshohirasawa ! I don't think we've ever tested this on an M1 macbook, but I can't think of a reason why it would not work.
Would you mind running bin/error-logs
, and pasting the output here?
If you are using the official sharelatex/sharelatex:latest
then it wouldn't work because it is AMD64
while Mac m1 is an ARM64
arch machine. Try to build the image locally and see if it is going to work.