I
Immich3mo ago
sam m

When upgrading immich (docker compose based installation), i get a container state improper error

Following an upgrade, I have an issue with the re-starting of the immich_machine_learning container, as below. How can I fix this? smorar@arya:~/docker/immich-app$ docker compose pull && docker compose up -d [+] Running 3/4 ✔ Container immich_redis Running 0.0s ✔ Container immich_postgres Restarted 0.0s ✔ Container aad2e0956ecb_immich_machine_learning Removed 1.4s ⠋ Container immich_machine_learning Recreate 108.9s Error response from daemon: cannot remove container aad2e0956ecbc8a2f573800bfb2595f20aa12d4d4397fbc57a79a348d1d0583a as it is stopping - running or paused containers cannot be removed without force: container state improper
16 Replies
Immich
Immich3mo ago
:wave: Hey @sam m, 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. :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.
sam m
sam mOP3mo ago
Docker compose file
sam m
sam mOP3mo ago
When checking docker compose logs, I keep getting the following logs repeated: immich_postgres | chown: changing ownership of '/var/lib/postgresql/data': Operation not permitted immich_postgres | chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted immich_postgres | find: ‘/var/lib/postgresql/data’: Permission denied docker ps -a returns the following: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 0c917f39cfcb registry.hub.docker.com/tensorchord/pgvecto-rs "postgres -c shared_…" 24 hours ago Up Less than a second immich_postgres 575f0e4813d3 ghcr.io/immich-app/immich-machine-learning:release-cuda "./start.sh" 13 minutes ago Created aad2e0956ecb_immich_machine_learning aad2e0956ecb ghcr.io/immich-app/immich-machine-learning:release-cuda "./start.sh" 24 hours ago Stopping immich_machine_learning ebfc3db2bc0f redis "redis-server" 23 hours ago Up 23 hours immich_redis f0d866792efe ghcr.io/immich-app/immich-server:release "start.sh" 23 hours ago Created 2283/tcp immich_server
Immich
Immich3mo ago
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
bo0tzz
bo0tzz3mo ago
Please also post your .env There's something wrong with the filesystem permissions for the database folder
sam m
sam mOP3mo ago
Herewith the .env # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=/home/smorar/Immich_Upload # The location where your database files are stored DB_DATA_LOCATION=./postgres # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secret for postgres. You should change it to a random password DB_PASSWORD=aoluOoilx24Eoeu1aoeu313 #LOG_LEVEL=debug # The values below this line do not need to be changed ################################################################################### DB_USERNAME=postgres DB_DATABASE_NAME=immich Where do I need to look to find the filesystem location of the database folder?
bo0tzz
bo0tzz3mo ago
DB_DATA_LOCATION=./postgres
sam m
sam mOP3mo ago
Thanks. I'm not particularly familiar with docker. I've corrected permissions to the same user that owns the docker-compose.yml file. Now, I ran docker compose down and then docker compose up -d, and I now get the following error: [+] Running 4/5 ✔ Network immich_default Created 0.0s ✔ Container immich_machine_learning Started 177.5s ✔ Container immich_postgres Started 177.4s ✔ Container immich_redis Started 177.4s ⠦ Container immich_server Starting 156.7s Error response from daemon: rootlessport listen tcp 0.0.0.0:2283: bind: address already in use After killing the docker process that was using this address using sudo kill -9 'sudo lsof -t -i:2283', I still had the same error come up when I ran docker compose up -d So, I've changed ownership, eventually rebooted computer and managed to get docker to restart appropriately. Now when I look at the postgres directory, it's ownership is different (user is a number: 10998), and the postgres ownership issue is still present in the logs... Is there a way to completely restart my docker configuration, but without losing all the immich database?
sam m
sam mOP3mo ago
Now my syslog is filling up with the following messages!!
Mraedis
Mraedis3mo ago
podman
👀 You could check your library/backups location for a recent DB dump and use it to restore from scratch
sam m
sam mOP3mo ago
What does podman do, and how do I fix this?
Mraedis
Mraedis3mo ago
I'm just saying you're using podman, not docker
sam m
sam mOP3mo ago
I see. Perhaps it's causing the issues where the ports are blocked...
Mraedis
Mraedis3mo ago
it should be a drop-in replacement, but there sometimes are ... odd issues
sam m
sam mOP3mo ago
Awesome!! @Mraedis and @bo0tzz, thanks for the help. It seems as though podman was having some wierd interaction with docker for me. I've now removed it, and everything seems mostly normal for now...
Immich
Immich3mo ago
This thread has been closed. To re-open, use the button below.

Did you find this page helpful?