I am getting the Your Docker installation is not working correctly issue after doing ./launcher rebuild app.
The error is docker: failed to register layer: Error processing tar file(exit status 1): write /usr/lib/x86_64-linux-gnu/libx265.a: no space left on device.
…I see one of the common tips on how to fix this is ./launcher cleanup, but before I do I’d like to check so it is safe to use, since I am getting:
WARNING! This will remove all stopped containers.
WARNING! This will remove all images without at least one container associated to them.
Helps? Just want to make sure I don’t delete anything important here.
Running ./launcher start app gives the same error:
docker: failed to register layer: Error processing tar file(exit status 1): write /usr/lib/x86_64-linux-gnu/libx265.a: no space left on device.
See 'docker run --help'.
Your Docker installation is not working correctly
…so I still don’t know the answer to the question: is it safe to use ./launcher cleanup when the site is not up and running?
From the screenshot under ‘docker images’ in the top post it seems there are a lot of older images, but don’t know how to target them specifically for deletion, and whether this would cause any troubles.
If the docker container is running, it won’t delete the container. If the container is not running, it’ll delete the container, but you can rebuild a new one with ./launcher rebuild app.
Thank you, but still not super clear to me - Docker is not my strong suit so I don’t know whether deleting and rebuilding a container would mess anything up on my site… Would it be safer to get the app up and running first by clearing out some selective space? Like this:
First clear up some space by targeting a specific image to delete
Then run ./launcher start app
Once the app is up and running: ./launcher cleanup
…not sure if this caution is needed. Perhaps just doing ./launcher cleanup straight up would work fine and not delete anything important even though my app is not running.
But in case you think the above approach could be an option: do you know the command for targeting a specific image to delete (step 1 above)? See my options for which images to delete below.
What I would do is first delete a backup or two? That should give you enough space for things to function.
If you run ./launcher start app then ./launcher cleanup will not delete your image that works, and your site will keep working while the cleanup progresses.
If some somehow make a mistake and delete your image that does work, and you’ve upgraded recenlty, there’s a pretty good chance that you can just do a ./launcher rebuild app and be in good shape.
If you got a memory error on the rebuild then I’d add another GB of swap, though that’ll make your disk space issue tighter (It sounds like you’re on a small droplet with 25GB of RAM, which is just barely enough). I’d run a ./launcher cleanup before each rebuild, or maybe you just have a bunch of backups and should move them to S3 ([Configure an S3 compatible object storage provider for uploads](Configure an S3 compatible object storage provider for uploads --you can do just backups, you don’t have to do all of the assets as described there).
The second error was not a memory error, but I could not identify what the new error was: hence the doctor.
Anyways, ./discourse-doctor solved it, would just have loved to know what actually happened.
Thank you for your help!
My guess was that you’re conflating RAM (memory) with disk space. The memory error can come and go and the error “error 127” is cryptic and easy to miss.