question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't connect: 504 Gateway Time-out

See original GitHub issue

I 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:closed
  • Created 2 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mcwiegercommented, Sep 15, 2021

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)…

0reactions
mcwiegercommented, Sep 15, 2021

The log provided in Putty are the same as in the log, so no additional info there.

The db log says this:

db_1        | 2021-09-15 11:39:43.590 UTC [1] LOG:  starting PostgreSQL 13.4 (Debian 13.4-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
db_1        | 2021-09-15 11:39:43.610 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1        | 2021-09-15 11:39:43.610 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1        | 2021-09-15 11:39:43.649 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1        | 2021-09-15 11:39:43.748 UTC [26] LOG:  database system was shut down at 2021-09-15 07:42:51 UTC
db_1        | 2021-09-15 11:39:43.810 UTC [1] LOG:  database system is ready to accept connections
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found