Vaultwarden's docker container causing system log spam

OS: Linux Mint 21.3

Hello. Love Vaultwarden, have been using it successfully for a few months now. However, I recently made a hardware change that is mixing badly with Vaultwarden’s docker settings. I changed to a new SATA expansion card (so it could use a PCIe x1 slot) which is fielding 7 drives. Now, every minute or so, I get this in my journalctl -xe system log:

Feb 22 07:52:42 Muninn udisksd[1694]: Error cleaning up mount point /media/qwinn/dsk66: Error removing directory: Device or resource busy
Feb 22 07:52:42 Muninn udisksd[1694]: Cleaning up mount point /media/qwinn/dsk64 (device 8:96 is not mounted)
Feb 22 07:52:42 Muninn udisksd[1694]: Error cleaning up mount point /media/qwinn/dsk64: Error removing directory: Device or resource busy
Feb 22 07:52:42 Muninn udisksd[1694]: Cleaning up mount point /media/qwinn/dsk65 (device 8:208 is not mounted)
Feb 22 07:52:42 Muninn udisksd[1694]: Error cleaning up mount point /media/qwinn/dsk65: Error removing directory: Device or resource busy
Feb 22 07:52:42 Muninn udisksd[1694]: Cleaning up mount point /media/qwinn/dsk29 (device 8:160 is not mounted)
Feb 22 07:52:42 Muninn udisksd[1694]: Error cleaning up mount point /media/qwinn/dsk29: Error removing directory: Device or resource busy
Feb 22 07:52:42 Muninn udisksd[1694]: Cleaning up mount point /media/qwinn/dsk14 (device 8:113 no longer exists)
Feb 22 07:52:42 Muninn udisksd[1694]: Error cleaning up mount point /media/qwinn/dsk14: Error removing directory: Device or resource busy
Feb 22 07:52:42 Muninn udisksd[1694]: Cleaning up mount point /media/qwinn/dsk31 (device 8:176 is not mounted)
Feb 22 07:52:42 Muninn udisksd[1694]: Error cleaning up mount point /media/qwinn/dsk31: Error removing directory: Device or resource busy
Feb 22 07:52:42 Muninn udisksd[1694]: Cleaning up mount point /media/qwinn/dsk63 (device 8:192 is not mounted)
Feb 22 07:52:42 Muninn udisksd[1694]: Error cleaning up mount point /media/qwinn/dsk63: Error removing directory: Device or resource busy
Feb 22 07:52:42 Muninn systemd[1]: run-docker-runtime\x2drunc-moby-09a13408e7c2c9b1c0a7db70e2b30accf0e2f8564fba1cce69dfc1e706d5c820-runc.WlEqgE.mount: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ The unit run-docker-runtime\x2drunc-moby-09a13408e7c2c9b1c0a7db70e2b30accf0e2f8564fba1cce69dfc1e706d5c820-runc.WlEqgE.mount has successfully entered the 'dead' state.

I have 13 drives on this box, but the 7 drives listed in those errors are the ones on the new SATA expansion card. These drives have nothing to do with Vaultwarden, and the docker container should not need to have any interaction with them, much less “clean up” their mount points and try to unmount them.

Those 7 drives are being constantly read from by other unrelated processes, and show no indication of ever being unmounted or inaccessible to the general OS.

If I docker stop Vaultwarden (the only docker container on this box), the system log spam stops completely. Restarts about a minute after restarting vaultwarden.

I do have a docker container on a separate machine that has the same identical new SATA expansion card that is not generating these messages, So it is apparently possible to set up a docker container in such a way that does not cause this conflict. The only obvious differences are that the other docker container uses --mount whereas vw uses -v, and also that docker container is using a --user parameter, but I wouldn’t think either of those could cause this issue (I will attempt to switch vw to use --mount, though, and will repost here if that helps).

Please help - the system log spam is making the logs fairly useless, there is no reason why vaultwarden or docker should be interacting with these hard drives, and I think I will have to take steps to install vaultwarden without docker (which seems a fairly painful process, and would stop automatic updates) if I can’t find some setting that will make vw’s docker stop trying to unmount my unrelated hard drives and spamming my logs. Thanks in advance!

What happens if you recreate the container? :thinking:

Tried that already, didn’t help. Messages start again about a minute after restarting it, even after freshly recreating the container. Rebooting the machine didn’t help either.

I doubt it is Vaultwarden, since Vaultwarden doesn’t know anything about the host.
If, it would be Docker which is causing this.

Vaultwarden just gets access to a volume, which could be a Docker Volume, or a mountpoint to an existing directory.

You might need to stop/remove Vaultwarden, so not only stop it, but really remove it.
Validate the configuration and start it.

Oh, I don’t disagree at all that it’s docker and not Vaultwarden that’s responsible. Thought I made that clear in my title and post. But as I said, I have another docker on another machine with the same hardware present that doesn’t cause this issue (to be specific, a Storj node, also running on Linux Mint). So there must be a way to prevent that behavior.

Been a busy day, haven’t had a chance to try using --mount instead of -v yet.

And yes, I did docker rm vaultwarden and then reran the setup script. That’s what I meant by “freshly recreating the container”. It didn’t help.

Well, if you think it’s also not Vaultwarden but something container general, maybe better to ask or check those forums. I’m not sure we can help here.

Well, the misbehavior is certainly being caused by Docker, not Vaultwarden itself, but Vaultwarden is requiring the use of docker (at least on a standard install), so it’s not as if there’s no relation.

I am also attempting to get a resolution from docker. But I’d be just as happy to not use docker and run vaultwarden without it. Over the years, is there any set of instructions for running vaultwarden without docker that is considered at least semi-officially approved? Any guide to do it that you’d consider superior to most? Or will I just have to randomly search and hope whatever guide I come up with works?

Would love if I could just do sudo apt install vaultwarden someday.

There are several ways, look at

Or

You could also try podman instead of docker.

But we are not going to provide a deb package or repo. That is up to the community.

Fantastic, thank you! And not just for this info but for Vaultwarden itself. It’s a terrific tool that works extremely well. Kudos on a great job.