I
Immich3y ago
ghost

Error 500 trying to connect to Server

This worked fine with 1.35.0 but after upgrading to 1.39.0 I now get an error connecting to the server on port 3001. There's an "outside" nginx, which points to the "inside" (docker) nginx on port 2283, from there it's supposed to be the "standard" setup that immich creates by default. My .env file: https://gist.github.com/skaag/2190e4be02504783a878c1b51019a189 My docker-compose.yml file: https://gist.github.com/skaag/012d12957d20adf3cc510affcf6f39d6 Log data from immich_immich-web_1: Error: connect ECONNREFUSED 127.0.0.1:3001 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
Gist
Immich .env file
Immich .env file. GitHub Gist: instantly share code, notes, and snippets.
Gist
Immich docker-compose.yml
Immich docker-compose.yml. GitHub Gist: instantly share code, notes, and snippets.
15 Replies
Alex Tran
Alex Tran3y ago
I am trying to understand your setup here. What are you trying to accomplish by modifying the container address? Do you have a database container and redis container running on the same machine?
jrasm91
jrasm913y ago
To make it the standard setup, you should remove the immich server url env variable.
ghost
ghostOP3y ago
@Alex Tran that's right, I already have these services on the host because it also runs other things: nginx, postgresql and redis-server Instead of running them twice and using double the RAM, I'm trying to have immich use the existing ones @jrasm91 I will try to comment out that URL redoing docker-compose, it's saying this by the way: WARNING: The IMMICH_SERVER_URL variable is not set. Defaulting to a blank string. yep, that just fixed it... so the original reason I changed it is that it's now listening on 0.0.0.0:3000 which means anyone on the internet can access that port
jrasm91
jrasm913y ago
You can remove that port section. The only port you need exposed is the one on the proxy container. I think originally we also tried to remove the proxy container, but gave up on that. If you are using it you don't need exposed ports from any container besides the proxy.
ghost
ghostOP3y ago
yes I too gave up on trying to remove the extra nginx proxy... so I have the outside proxy handle 80,443, and it proxies to 2283, which proxies to the rest of the services...
jrasm91
jrasm913y ago
Yup
ghost
ghostOP3y ago
one more reason is that I use CloudFlare DNS to automatically generate and renew LetsEncrypt certs It uses the CloudFlare API with an API key, to do the DNS verification
jrasm91
jrasm913y ago
Are you still getting a 500?
ghost
ghostOP3y ago
no, it works now, we can close this
jrasm91
jrasm913y ago
Ah, ok So it was the url env?
ghost
ghostOP3y ago
yes, when I commented it out, it all just started working again
jrasm91
jrasm913y ago
Cool
ghost
ghostOP3y ago
it's weird because it worked fine before, but suddenly with 1.39.0 it stopped working something's changed between those two versions that made it stop working I don't mind, I mean it works so I'm happy 😉 I still think we should document the network to illustrate outside (host network) vs. inside (docker network), and how they all interconnect I can create the diagram itself can't wait to test the iOS beta Yep, iOS beta app can talk to my immich just beautifully, it's really fast too
jrasm91
jrasm913y ago
Pr #930 probably was it. Merged in v1.36.0_55-dev. Sounds like a good thing to add to the docs
ghost
ghostOP3y ago
makes sense, I was on 1.35.0 before I forgot to say thank you, you guys are awesome ❤️

Did you find this page helpful?