I
Immichβ€’2mo ago
N306

Setup Issues, Error:getaddrinfo EAI_AGAIN immich-postgres

Hey everyone, I'm stuck on a fresh install and could use some advice. My Setup: * Running on a Proxmox VM (Debian). * Following the official Quick Start guide. * Other Docker containers on this VM work fine. The Problem: The immich-server container is in a crash loop. The logs show a DNS error:
microservices worker error: Error: getaddrinfo EAI_AGAIN immich-postgres
microservices worker error: Error: getaddrinfo EAI_AGAIN immich-postgres
What I've Done: 1. Initially, my .env file was missing DB_HOSTNAME, which caused an error for the hostname database. 2. I fixed this by adding DB_HOSTNAME=immich-postgres to my .env file. My config now includes:
# .env file
UPLOAD_LOCATION=./library
DB_DATA_LOCATION=./postgres

DB_HOSTNAME=immich-postgres
DB_PASSWORD=[REDACTED]
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

# .env file
UPLOAD_LOCATION=./library
DB_DATA_LOCATION=./postgres

DB_HOSTNAME=immich-postgres
DB_PASSWORD=[REDACTED]
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

3. I restarted everything cleanly with sudo docker compose down and sudo docker compose up -d. Even with the correct hostname, the internal DNS lookup still fails. It seems like a networking issue specific to this Docker stack. Has anyone run into this before, especially on Proxmox? Any ideas what to check next? Thanks
24 Replies
Immich
Immichβ€’2mo ago
:wave: Hey @N306, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time). 2. :blue_square: read applicable release notes. 3. :blue_square: reviewed the FAQs for known issues. 4. :blue_square: reviewed Github for known issues. 5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy). 6. :blue_square: uploaded the relevant information (see below). 7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed.
NoMachine
NoMachineβ€’2mo ago
please attach your compose file and full .env
bo0tzz
bo0tzzβ€’2mo ago
As well as all the logs
N306
N306OPβ€’2mo ago
Hey there @bo0tzz @NoMachine and thanks a lot for your quick reply! ❀️ Just a quick heads-up regarding the docker-compose.yml from the quick-start guide. On a fresh install with a recent version of docker-compose, running docker-compose up -d fails with the following error:
ERROR: The Compose file './docker-compose.yml' is invalid because:
'name' does not match any of the regexes: '^x-'
ERROR: The Compose file './docker-compose.yml' is invalid because:
'name' does not match any of the regexes: '^x-'
The issue is the name: immich attribute at the top of the file, which seems to be obsolete in newer Compose versions. The fix was simple: just commenting out or removing that name: immich line allows the stack to start perfectly. ---- The error before came from some stuff I mistakenly did advised by Gemini to troubleshoot another error, so it could be ignored here.
No description
Daniel
Danielβ€’2mo ago
It only happens on a fresh install if you're using an ancient docker version (e.g. the one that's shipped by apt)
NoMachine
NoMachineβ€’2mo ago
yup, you should be using the docker engine from https://docs.docker.com/get-started/get-docker/
Docker Documentation
Get Docker
Download and install Docker on the platform of your choice, including Mac, Linux, or Windows.
N306
N306OPβ€’2mo ago
Oh okey I did not know that... thank you! πŸ™‚ Thank you! πŸ™‚ The link only points to docker desktop, what about docker cli on linux?
NoMachine
NoMachineβ€’2mo ago
Google doesn't bite
bo0tzz
bo0tzzβ€’2mo ago
Literally the note below it lol
N306
N306OPβ€’2mo ago
-.- When I googledI installed it via apt, I thought you meant something specific and just wondered if Docker desktop is more current and the only solution.
N306
N306OPβ€’2mo ago
Thanks...I am new to all this, did not knew that engine will link to the CLI, just saw those download links and searched for the terms. Do you mean via their apt repo? Or custom with custom upgrades? https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
Docker Documentation
Ubuntu
Jumpstart your client-side server applications with Docker Engine on Ubuntu. This guide details prerequisites and multiple methods to install Docker Engine on Ubuntu.
NoMachine
NoMachineβ€’2mo ago
their apt repo
N306
N306OPβ€’2mo ago
I am already using that as far as I know:
> which docker
/usr/bin/docker

> apt-cache policy docker-ce
docker-ce:
Installiert: 5:28.3.2-1~ubuntu.24.04~noble
Installationskandidat: 5:28.3.2-1~ubuntu.24.04~noble
Versionstabelle:
*** 5:28.3.2-1~ubuntu.24.04~noble 500
500 https://download.docker.com/linux/ubuntu noble/stable amd64 Packages
100 /var/lib/dpkg/status
5:28.3.1-1~ubuntu.24.04~noble 500
500 https://download.docker.com/linux/ubuntu noble/stable amd64 Packages
...
> which docker
/usr/bin/docker

> apt-cache policy docker-ce
docker-ce:
Installiert: 5:28.3.2-1~ubuntu.24.04~noble
Installationskandidat: 5:28.3.2-1~ubuntu.24.04~noble
Versionstabelle:
*** 5:28.3.2-1~ubuntu.24.04~noble 500
500 https://download.docker.com/linux/ubuntu noble/stable amd64 Packages
100 /var/lib/dpkg/status
5:28.3.1-1~ubuntu.24.04~noble 500
500 https://download.docker.com/linux/ubuntu noble/stable amd64 Packages
...
See the https://download.docker.com/... source. etc. Or what am I missing?
Daniel
Danielβ€’2mo ago
Are you using docker-compose or docker compose?
N306
N306OPβ€’2mo ago
the latter
Daniel
Danielβ€’2mo ago
Even though you were saying something else here?
N306
N306OPβ€’2mo ago
Yeah misspelled it seemingly, I use it without -. Sorry.
Daniel
Danielβ€’2mo ago
And you still get the message about name: not being supported? πŸ‘€
N306
N306OPβ€’2mo ago
No it is working πŸ™‚
The fix was simple: just commenting out or removing that name: immich line allows the stack to start perfectly.
Zeus
Zeusβ€’2mo ago
Either your docker install is old or you’re not using docker correctly. Name: is a semi new (few years) docker feature
Daniel
Danielβ€’2mo ago
Right that's what I'm saying. If you're actually using an up-to-date docker version you don't need to do that So I'm asking if it works now
Zeus
Zeusβ€’2mo ago
Docker Documentation
Version and name top-level elements
Understand when and if to set the version and name top-level element
N306
N306OPβ€’2mo ago
Hm will check this as soon as I get my truenas scale nfs source and immich not restart looping. πŸ˜… Thanks anyway! πŸ™‚
Daniel
Danielβ€’2mo ago
Make sure not to put your database on that nfs mount :P Otherwise you'll never get out of boot loops :KEKW:

Did you find this page helpful?