#Docker compose has server and postgres stuck in restart loop

19 messages · Page 1 of 1 (latest)

analog zenith
#

Hi, I'm brand new to self hosting as a whole just to set the record straight. I've followed the steps from several guides on how to set up an immich server using docker compose; however, all of them inevitably end with the containers immich_server and immich_postgres being stuck in a restart loop.

As some extra information, I am running this on Fedora, I've used the stock docker-compose.yml and .env in the github, and this is all happening with Docker version 29.7.2. I'll post my logs later in this post.

sage foxBOT
#

:wave: Hey @analog zenith,

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

#

Checklist

I have...

  1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: read applicable release notes.
  3. :ballot_box_with_check: reviewed the FAQs for known issues.
  4. :ballot_box_with_check: reviewed Github for known issues.
  5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: uploaded the relevant information (see below).
  7. :ballot_box_with_check: 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.

analog zenith
#

docker-compose.yml and .env are stock. The stock .env uses Immich v3 although if I change it to v3.1.0 (latest), nothing changes and my containers are still stuck in a restart loop after I compose.

#

immich_postgres logs:

chmod: changing permissions of '/var/lib/postgresql/data': Permission denied
find: ‘/var/lib/postgresql/data’: Permission denied
chown: changing ownership of '/var/lib/postgresql/data': Permission denied
Using SSD storage
chmod: changing permissions of '/var/lib/postgresql/data': Permission denied
find: ‘/var/lib/postgresql/data’: Permission denied
chown: changing ownership of '/var/lib/postgresql/data': Permission denied
Using SSD storage
chmod: changing permissions of '/var/lib/postgresql/data': Permission denied
find: ‘/var/lib/postgresql/data’: Permission denied
chown: changing ownership of '/var/lib/postgresql/data': Permission denied
Using SSD storage
chmod: changing permissions of '/var/lib/postgresql/data': Permission denied
find: ‘/var/lib/postgresql/data’: Permission denied
chown: changing ownership of '/var/lib/postgresql/data': Permission denied
Using SSD storage
chmod: changing permissions of '/var/lib/postgresql/data': Permission denied
find: ‘/var/lib/postgresql/data’: Permission denied
chown: changing ownership of '/var/lib/postgresql/data': Permission denied
Using SSD storage
chmod: changing permissions of '/var/lib/postgresql/data': Permission denied
find: ‘/var/lib/postgresql/data’: Permission denied
chown: changing ownership of '/var/lib/postgresql/data': Permission denied
Using SSD storage
chmod: changing permissions of '/var/lib/postgresql/data': Permission denied
find: ‘/var/lib/postgresql/data’: Permission denied
chown: changing ownership of '/var/lib/postgresql/data': Permission denied
Using SSD storage
chmod: changing permissions of '/var/lib/postgresql/data': Permission denied
find: ‘/var/lib/postgresql/data’: Permission denied
chown: changing ownership of '/var/lib/postgresql/data': Permission denied```
#

immich server logs:

  • truncated to fit discord message length constraints
  • alternates between the WASI ExperimentalWarning and getaddrinfo ENOTFOUND
(node:7) ExperimentalWarning: WASI is an experimental feature and might change at any time
Detected CPU Cores: 8
(Use `node --trace-warnings ...` to show where the warning was created)
node:internal/process/promises:394
    triggerUncaughtException(err, true /* fromPromise */);
    ^

Error: getaddrinfo ENOTFOUND database
    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:122:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'database'
}

Node.js v24.14.1
(node:7) ExperimentalWarning: WASI is an experimental feature and might change at any time
Initializing Immich v3.1.0
Detected CPU Cores: 8
(Use `node --trace-warnings ...` to show where the warning was created)
node:internal/process/promises:394
    triggerUncaughtException(err, true /* fromPromise */);
    ^

Error: getaddrinfo ENOTFOUND database
    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:122:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'database'
}```
#

as stated in the main post body, this is all on fedora and docker version 29.7.2. as for the hardware, I'm running this on a Lenovo Thinkcentre with an SSD and a filesystem, which to my knowledge, is btrfs.

sage foxBOT
covert island
#

Do you maybe need to fix permissions / ownership on the path you're feeding it? Or maybe Fedora is using podman, which doesn't use/allow root?

tiny garnet
#

Yep, well described issue with containers on fedora, interacting with app armor/seccomp/etc security systems

#

Can’t remember exactly how to fix but it’s not an immich specific issue

covert island
#

Hey I know you! 🙂

analog zenith
#

Reenabling selinux after composing works fine too

#

Thanks for that tip; think i might close this post

sage foxBOT
#

This thread has been closed. To re-open, use the button below.

analog zenith
#

small tip for anybody looking through this trying to debug

#

if after re-enabling, selinux still leads to permission issues (for me in postgres, server, and a tailscale sidecar)

#

then modify the docker-compose to include :z after the volumes that need to be accessed (in my case all of them)

#

then recompose with selinux set to permissive and re-enable selinux after composing

coarse whale