[bug]: nginx 504 or 502 gateway timeout in local env
Is there an existing issue for this?
- [x] I have searched the existing issues
Current behavior
I was trying to setup project locally to contribute. I followed the steps in readme and contributing.md. When I was doing docker compose command, then proxy container wasn't coming up due to port 80 being in use.
I resolved it by changing nginx_port in .env file to 8080 and then this proxy container came up.
But, now, when I try to hit localhost:8080/ , it gives me 504 nginx gateway timeout.
Steps to reproduce
- Ubuntu machine, git clone the project
- change nginx port in .env to 8080
- run other commands as mentioned in contributing.md
- Go to browser and hit http://localhost:8080/
Environment
Production
Browser
Google Chrome
Variant
Local
Version
v0.26.0
Please find logs of proxy container for more details -
172.18.0.1 - - [27/Apr/2025:04:02:52 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36" 172.18.0.1 - - [27/Apr/2025:04:03:27 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36" 172.18.0.1 - - [27/Apr/2025:04:05:41 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36" 2025/04/27 04:06:42 [error] 8#8: *6 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 172.18.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://172.18.0.10:3000/", host: "localhost:8080" 172.18.0.1 - - [27/Apr/2025:04:06:42 +0000] "GET / HTTP/1.1" 504 569 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36" 172.18.0.1 - - [27/Apr/2025:04:07:33 +0000] "GET /favicon.ico HTTP/1.1" 502 559 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36" 2025/04/27 04:07:33 [error] 8#8: *11 connect() failed (111: Connection refused) while connecting to upstream, client: 172.18.0.1, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://172.18.0.10:3000/favicon.ico", host: "localhost:8080", referrer: "http://localhost:8080/" 2025/04/27 04:20:55 [error] 8#8: *13 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 172.18.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://172.18.0.10:3000/", host: "localhost:8080" 172.18.0.1 - - [27/Apr/2025:04:20:55 +0000] "GET / HTTP/1.1" 504 569 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36" 172.18.0.1 - - [27/Apr/2025:04:21:54 +0000] "GET /favicon.ico HTTP/1.1" 504 569 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36" 2025/04/27 04:21:54 [error] 8#8: *13 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 172.18.0.1, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://172.18.0.10:3000/favicon.ico", host: "localhost:8080", referrer: "http://localhost:8080/" 2025/04/27 04:42:25 [error] 8#8: *18 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 172.18.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://172.18.0.10:3000/", host: "localhost:8080"
I also encountered this problem.
172.30.0.1 - - [21/May/2025:12:45:22 +0000] "GET /api/instances/ HTTP/1.1" 502 559 "http://192.168.0.110:8888/ask/projects/b8ea9e13-5b59-402d-a26b-ab95ec296448/pages/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
2025/05/21 12:45:22 [error] 8#8: *21 connect() failed (113: Host is unreachable) while connecting to upstream, client: 172.30.0.1, server: , request: "GET /api/instances/ HTTP/1.1", upstream: "http://172.30.0.12:8000/api/instances/", host: "192.168.0.110:8888", referrer: "http://192.168.0.110:8888/ask/projects/b8ea9e13-5b59-402d-a26b-ab95ec296448/pages/"
Hi @ChandraShekharAgrawal, Were you able to resolve the issue? We've made some updates to our contributing guidelines in case it helps.
Closing this issue for now, feel free to open it if not resolved