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 docker-compose.yml
Immich docker-compose.yml. GitHub Gist: instantly share code, notes, and snippets.
15 Replies
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?
To make it the standard setup, you should remove the immich server url env variable.
@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 portYou 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.
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...
Yup
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
Are you still getting a 500?
no, it works now, we can close this
Ah, ok
So it was the url env?
yes, when I commented it out, it all just started working again
Cool
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
Pr #930 probably was it. Merged in v1.36.0_55-dev.
Sounds like a good thing to add to the docs
makes sense, I was on 1.35.0 before
I forgot to say thank you, you guys are awesome ❤️