Can't connect: 504 Gateway Time-out
See original GitHub issueI set up a brand new instance of librephotos, using docker-compose on Synology. I made some changes to the .env file (use port 3001 instead of 3000) and the process appears to go well (one warning: ssh key not set). When I try to log in to localhost:3001, I get a 504 Gateway Time-out returned.
The proxy log says the following:
2021-08-18 07:35:56 stderr 2021/08/18 07:35:56 [info] 29#29: *19 client 172.19.0.1 closed keepalive connection
2021-08-18 07:35:54 stdout 172.19.0.1 - - [18/Aug/2021:07:35:54 +0000] "GET /favicon.ico HTTP/1.1" 504 569 "http://192.168.2.201:3001/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
2021-08-18 07:35:54 stderr 2021/08/18 07:35:54 [error] 29#29: *19 upstream timed out (110: Connection timed out) while connecting to upstream, client: 172.19.0.1, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://172.19.0.5:3000/favicon.ico", host: "192.168.2.201:3001", referrer: "http://192.168.2.201:3001/"
2021-08-18 07:34:53 stdout 172.19.0.1 - - [18/Aug/2021:07:34:53 +0000] "GET / HTTP/1.1" 504 569 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
2021-08-18 07:34:53 stderr 2021/08/18 07:34:53 [error] 29#29: *19 upstream timed out (110: Connection timed out) while connecting to upstream, client: 172.19.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://172.19.0.5:3000/", host: "192.168.2.201:3001"
2021-08-18 07:33:53 stdout 172.19.0.1 - - [18/Aug/2021:07:33:53 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
2021-08-18 07:33:53 stderr 2021/08/18 07:33:53 [info] 29#29: *16 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while connecting to upstream, client: 172.19.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://172.19.0.5:3000/", host: "192.168.2.201:3001"
2021-08-18 07:33:51 stderr 2021/08/18 07:33:51 [info] 29#29: *17 client closed connection while waiting for request, client: 172.19.0.1, server: 0.0.0.0:80
What can be the cause?
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors
How to Fix 504 Gateway Timeout Errors · 1. Look for server connectivity issues. · 2. Check for any DNS changes. · 3....
Read more >How to Fix 504 Gateway Timeout Errors - Business Insider
Close and re-open the web browser, or restart your computer. Then try reaching the problematic websites again. · Reboot your network modem and ......
Read more >How to Fix the 504 Gateway Timeout Error on Your Site - Kinsta
As the 504 error is due to a timeout between servers, the problem probably isn't with the client's device or internet connection.
Read more >Here's how to fix a 504 Gateway Timeout error - Lifewire
A 504 Gateway Timeout error means that one server involved in displaying the web page did not communicate to another one quickly enough....
Read more >What is 504 Gateway Timeout Error and How To Fix It [5 Ways]
How to Fix 504 Gateway Timeout Errors · Inspect if your website is down for just you or everyone. · Restart your computer...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Finally, it looks like I got it…it was a firewall issue. I have pretty strict rules and I had to give access to the Docker range (17.x.x.x)…
The log provided in Putty are the same as in the log, so no additional info there.
The db log says this: