Execution error Image can not be deleted, in use by other container(s)


Go to solution Solved by Soulflyzz,

Recommended Posts

Hello,

 

Running 6.12.2 with a few dockers clean install from about 2 weeks ago.

Running Plex and went to add some Extra Perimeters for NVidia GPU pass through and the docker failed the update.

 

Now when I try to run plex I get this error, I also get the same error

Execution error

Image can not be deleted, in use by other container(s)

 

If I try to Delete it I get this error

Execution error

No such container

 

I also tried to reboot the server and I got an unclean shutdown and the reboot took forever and did not fix the issue.

 

I have attached a log in hope that it will help

towerofterror-diagnostics-20230707-1659.zip

  • Upvote 3
Link to comment
  • Solution

I was able to correct this issue myself.

 

1 - I created a new Plex Docker called "Plex2" then stopped that docker right after creation

2 - Aimed the original "Plex" docker to that appdata folder fired it up and a new "Plex2" appdata location.

3 - Fired up "Plex" docked and it ran correctly as if it was a brand new install.

4 - closed the "Plex" Docker then aimed my original "Plex" appdata folder back to the ordinal "Plex" appdata and it fired up and started working.

5 - Deleted the Plex2 docker.

 

this also happened with Readarr and I was able to get it working the same way.

 

Hope this can help someone in the future.

 

*edits for spelling errors

Edited by Soulflyzz
  • Like 1
Link to comment
3 hours ago, Andiroo2 said:

Same thing happening to me.  I had an orphaned image and I deleted it, but still can’t start or delete the main Docker container for the same app. 

 

Does it help if you set the container to not autostart, then go to Settings -> Docker and disable the Docker service, then enable it?

Link to comment
19 hours ago, ljm42 said:

 

Does it help if you set the container to not autostart, then go to Settings -> Docker and disable the Docker service, then enable it?

 

That did not work for me.

 

The only thing that did work was the step I provided earlier

 

On 7/14/2023 at 8:30 AM, Soulflyzz said:

I was able to correct this issue myself.

 

1 - I created a new Plex Docker called "Plex2" then stopped that docker right after creation

2 - Aimed the original "Plex" docker to that appdata folder fired it up and a new "Plex2" appdata location.

3 - Fired up "Plex" docked and it ran correctly as if it was a brand new install.

4 - closed the "Plex" Docker then aimed my original "Plex" appdata folder back to the ordinal "Plex" appdata and it fired up and started working.

5 - Deleted the Plex2 docker.

 

this also happened with Readarr and I was able to get it working the same way.

 

Hope this can help someone in the future.

 

*edits for spelling errors

 

  • Like 1
Link to comment
6 hours ago, PeterSoto said:

Hello, I'm sorry to hear about the issue you're having with your Plex setup and Docker containers. It looks like you encountered an error when trying to update Plex and configure Nvidia GPU pass-through. The error message "Cannot delete image, in use by other container(s)" indicates that the Plex image is currently being used by other running containers, which prevents you from deleting it. The "No such container" error indicates that the container you are trying to delete may not exist or is not running. To work around this issue, you can try the following steps: Check running containers: Verify which containers are currently running on your system. You can use the docker ps command to see a list of active containers. Stop running containers: If any containers are actively using Plex images, you should first stop them using the docker stop <container_name> command, where <container_name> is the name or ID of the container running run. Remove containers: After stopping the relevant containers, you can delete them using the docker rm <container_name> command. Attempt to delete images: After deleting the containers, try deleting the Plex image again with docker rmi <image_name>requirements. Reboot the Server: If you still encounter issues, attempt to reboot your server again and ensure that the shutdown is clean to avoid any potential corruption. Check the logs: Review the logs of both Plex and Docker for any additional error messages or warnings that may help determine the root cause of the problem. If the problem persists after following these steps, you should provide more information, such as the specific error message from the log, and the Docker command you used to update Plex using pass-through. Nvidia GPUs.

AI wrote this, right?

Link to comment
On 7/18/2023 at 11:25 PM, ljm42 said:

 

Does it help if you set the container to not autostart, then go to Settings -> Docker and disable the Docker service, then enable it?

 

Docker failed to start when I tried this, so I rebooted the server. When it came back up, I was able to delete the container and re-install from the “Previous Apps” section of Comunity Applications. 

 

Everything is working now. 

  • Like 2
Link to comment
  • 1 month later...
On 7/12/2023 at 5:37 PM, Squid said:

Switch to advanced view in the docker tab.  There's probably another container (orphaned?)  at the bottom that's using the same image.  Delete that one first.

Thanks for this. A few of my docker containers were failing with the same error as in the first post. Turns out I had several orphaned docker images. I've deleted those, and did "Force Update" on each docker app that still wouldn't start, and now they're up and running again.

Link to comment
  • 5 weeks later...

I just experienced this issue with several containers (Nextcloud, Swag, Sonarr, Radarr, Plex, and a few more) and was able to fix it so I thought I would share what I did in case anyone came looking in the future. I was having issues with steps 4-7 causing my server to hang and the GUI to become unresponsive so here's what I tried that ultimately worked for me:

 

  1. Try steps 4-7. If they don't work or cause a server hang, comeback and start at 2.
  2. Shutdown Unraid (force it if you have to and are comfortable with the risk)
  3. Once restarted, stop any running containers (not sure if necessary  but I did it as a precaution)
  4. Delete orphaned images via the bottom of the Docker tab in Advanced mode.
  5. While still in Advanced mode, force update any containers that were failing to start with the error listed by OP.
  6. Disable and re-enable the docker service via Settings > Docker (not sure if required, did this as a shortcut to get containers to auto-start rather than manually starting each).
  7. Check your docker tab and attempt to start anything that hasn't auto-started, they should all start as expected.
  • Like 2
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.