How to fix immich_[container] exited with code 135 (and/or code 0) #2760
Closed
erlenddahl
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
After struggling with an Immich update, I probably corrupted my containers somehow, and kept getting logs like this when I ran
docker compose up:Running
docker compose down -vto purge everything and reset Immich completely did not work, I still got the same error. Running older versions of Immich (that had worked before) did not work either.In the end, what I did to fix this was to completely remove all Immich related docker images from my server, to make docker re-download everything completely. (I am a complete docker newbie, so I didn't know this, but docker apparently downloads images and stores them on your hard drive so that it can re-use them later.)
In case others get the same problem, this is how I fixed it.
Please note that this completely resets your Immich -- you'll lose all the images and videos and users and settings that are on your server, so don't do this if you don't have them elsewhere.
First, stop Immich, and remove the containers and volumes. This will remove all users and settings (basically everything stored in your database).
docker compose down -vNext, make sure no Immich related containers are running:
docker ps -aOn my server, this outputs this list:
You can see in the rightmost column that all of the above are indeed Immich-related. So if you see something like this, then you didn't properly stop the containers. You can try
docker compose down -vagain, make sure to run it from where your docker-compose.yml is located. If they're still running, you can start killing them usingdocker rm [container ID], for exampledocker rm abd7822fd26a.When you're happy that nothing Immich-related is running, it's time to start removing the Immich-related docker images. First, you can list all the images docker has stored on your server like this:
docker image lsOn my server, this outputs this list:
All of the above images are Immich-related. How can you tell? Some of them contain "immich", but not all of them. In the end, you need to know which images are listed in the docker-compose.yml file to be sure. My strategy was simply to remove everything that wasn't in use by my other (still running) docker containers. If you try to remove an image that is in use, you will get an error message.
Remove all images (one by one) by running:
docker image rm [repository]:[tag]For example:
If you struggle with removing an image (for example images with no tag), you can also use the IMAGE ID column like this:
docker image rm de0285e3559cIf you try to remove an image that is being used, it will look like this:
Error response from daemon: conflict: unable to remove repository reference "redis:6.2" (must force) - container c219be67e5cf is using its referenced image de0285e3559cThe error message tells us which container is using it, so we can use
docker ps -ato find the relevant container, and/ordocker rm [container id]to remove it (as long as you're sure it isn't related to something other than Immich -- be careful!).When you have managed to remove all Immich related docker images and containers, you can go back to your docker-compose.yml and .env files, and run the normal Immich commands:
docker-compose pull && docker-compose up -d # Or docker compose up -dIf you had the same issue as me, your problem should now be solved. Personally, I had to do this twice before it worked, probably because I missed a docker image or two.
Hope that can help somebody, and thanks again to Alex and jrasm91 for helping me through this!
Beta Was this translation helpful? Give feedback.
All reactions