Required Information
-
DietPi version |
cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=19
G_DIETPI_VERSION_RC=1
G_GITBRANCH=‘master’
G_GITOWNER=‘MichaIng’
G_LIVE_PATCH_STATUS[0]=‘applied’
G_LIVE_PATCH_STATUS[1]=‘applied’
G_LIVE_PATCH_STATUS[2]=‘not applicable’ -
Distro version |
echo $G_DISTRO_NAME $G_RASPBIAN
bookworm 0 -
Kernel version |
uname -a
Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux -
Architecture |
dpkg --print-architecture
arm64 -
SBC model |
echo $G_HW_MODEL_NAME
or (EG: RPi3)
RPi 3 Model B (aarch64) -
SD card used | (EG: SanDisk ultra)
64 GB card, not all of that space needed though.
Plus dietpi_userdata moved to an USB-connected SSD that is automatically mounted through fstab.
Additional Information (if applicable)
-
Software title
Vaultwarden (installed using dietpi-software) -
Was the software title installed freshly or updated/migrated?
Freshly installed on a fresh Dietpi Bookworm image (no update at all).
However, of course, re-using my previous Vaultwarden config and database on the new system (i.e. Vaultwarden’s dietpi_userdata subfolder) -
Can this issue be replicated on a fresh installation of DietPi?
Yes, see question above. But it only appears on DietPi Bookworm. It worked flawlessly before on BullsEye (v11).
Steps to reproduce
- The raspberry is freshly started, e.g. after a manual boot or after a poweroff
- Trying to connect to vaultwarden, but impossible since its service failed to start.
Expected behaviour
- Vaultwarden service should be automatically started at boot
Actual behaviour
- Vaultwarden service fails to automatically start at boot
Extra details
- I was on BullyEye (v11) before and everything worked fone. I did a fresh Bookworm install (i.e. no update to Bookworm, but started from scratch with a new image) and installed Vaultwarden on it using dietpi-software. But whenever I boot the system, vaultwarden fails to start automatically.
- Manually starting the service fails, too, in the first instance.
- It complains it cannot find the environment/config files and hence fails to start.
- However, after a few minutes of waiting I can manually start Vaultwarden all of a sudden as if nothing had been wrong before. Thus, to me it appears as there is some timing issue.
- I also checked if the vaultwarden files are accessible. Everything looks fine here. Right after boot I can SSH into DietPi and access the dietpi_userdata-folder where Vaultwarden’s environment file is located. And note: Eventhough the files are accessible, a manual start of the Vaultwarden service doesn’t work for a few minutes after boot. No clue why.
- Failed service right after boot:
root@DietPi:~# systemctl status vaultwarden
× vaultwarden.service - vaultwarden (DietPi)
Loaded: loaded (/lib/systemd/system/vaultwarden.service; enabled; preset: enabled)
Active: failed (Result: resources) since Wed 2023-07-26 02:25:35 CEST; 8h ago
Docs: https://github.com/dani-garcia/vaultwarden
CPU: 0
Jul 26 02:25:35 DietPi systemd[1]: vaultwarden.service: Scheduled restart job, restart counter is at 5.
Jul 26 02:25:35 DietPi systemd[1]: Stopped vaultwarden.service - vaultwarden (DietPi).
Jul 26 02:25:35 DietPi systemd[1]: vaultwarden.service: Start request repeated too quickly.
Jul 26 02:25:35 DietPi systemd[1]: vaultwarden.service: Failed with result 'resources'.
Jul 26 02:25:35 DietPi systemd[1]: Failed to start vaultwarden.service - vaultwarden (DietPi).
- Trying to manually start vaultwarden fails, too:
root@DietPi:~# systemctl start vaultwarden
Job for vaultwarden.service failed because of unavailable resources or another system error.
See "systemctl status vaultwarden.service" and "journalctl -xeu vaultwarden.service" for details.
- This is what the syslog says:
root@DietPi:~# journalctl -u vaultwarden
Jul 26 02:25:09 DietPi systemd[1]: vaultwarden.service: Failed to load environment files: No such file or directory
Jul 26 02:25:09 DietPi systemd[1]: vaultwarden.service: Failed to run 'start' task: No such file or directory
Jul 26 02:25:09 DietPi systemd[1]: vaultwarden.service: Failed with result 'resources'.
Jul 26 02:25:09 DietPi systemd[1]: Failed to start vaultwarden.service - vaultwarden (DietPi).
Jul 26 02:25:14 DietPi systemd[1]: vaultwarden.service: Scheduled restart job, restart counter is at 1.
Jul 26 02:25:14 DietPi systemd[1]: Stopped vaultwarden.service - vaultwarden (DietPi).
Jul 26 02:25:14 DietPi systemd[1]: vaultwarden.service: Failed to load environment files: No such file or directory
Jul 26 02:25:14 DietPi systemd[1]: vaultwarden.service: Failed to run 'start' task: No such file or directory
Jul 26 02:25:14 DietPi systemd[1]: vaultwarden.service: Failed with result 'resources'.
Jul 26 02:25:14 DietPi systemd[1]: Failed to start vaultwarden.service - vaultwarden (DietPi).
Jul 26 02:25:20 DietPi systemd[1]: vaultwarden.service: Scheduled restart job, restart counter is at 2.
Jul 26 02:25:20 DietPi systemd[1]: Stopped vaultwarden.service - vaultwarden (DietPi).
Jul 26 02:25:20 DietPi systemd[1]: vaultwarden.service: Failed to load environment files: No such file or directory
Jul 26 02:25:20 DietPi systemd[1]: vaultwarden.service: Failed to run 'start' task: No such file or directory
Jul 26 02:25:20 DietPi systemd[1]: vaultwarden.service: Failed with result 'resources'.
Jul 26 02:25:20 DietPi systemd[1]: Failed to start vaultwarden.service - vaultwarden (DietPi).
Jul 26 02:25:25 DietPi systemd[1]: vaultwarden.service: Scheduled restart job, restart counter is at 3.
Jul 26 02:25:25 DietPi systemd[1]: Stopped vaultwarden.service - vaultwarden (DietPi).
Jul 26 02:25:25 DietPi systemd[1]: vaultwarden.service: Failed to load environment files: No such file or directory
Jul 26 02:25:25 DietPi systemd[1]: vaultwarden.service: Failed to run 'start' task: No such file or directory
Jul 26 02:25:25 DietPi systemd[1]: vaultwarden.service: Failed with result 'resources'.
Jul 26 02:25:25 DietPi systemd[1]: Failed to start vaultwarden.service - vaultwarden (DietPi).
Jul 26 02:25:30 DietPi systemd[1]: vaultwarden.service: Scheduled restart job, restart counter is at 4.
Jul 26 02:25:30 DietPi systemd[1]: Stopped vaultwarden.service - vaultwarden (DietPi).
Jul 26 02:25:30 DietPi systemd[1]: vaultwarden.service: Failed to load environment files: No such file or directory
Jul 26 02:25:30 DietPi systemd[1]: vaultwarden.service: Failed to run 'start' task: No such file or directory
Jul 26 02:25:30 DietPi systemd[1]: vaultwarden.service: Failed with result 'resources'.
Jul 26 02:25:30 DietPi systemd[1]: Failed to start vaultwarden.service - vaultwarden (DietPi).
Jul 26 02:25:35 DietPi systemd[1]: vaultwarden.service: Scheduled restart job, restart counter is at 5.
Jul 26 02:25:35 DietPi systemd[1]: Stopped vaultwarden.service - vaultwarden (DietPi).
Jul 26 02:25:35 DietPi systemd[1]: vaultwarden.service: Start request repeated too quickly.
Jul 26 02:25:35 DietPi systemd[1]: vaultwarden.service: Failed with result 'resources'.
Jul 26 02:25:35 DietPi systemd[1]: Failed to start vaultwarden.service - vaultwarden (DietPi).
Jul 26 10:41:35 DietPi systemd[1]: vaultwarden.service: Start request repeated too quickly.
Jul 26 10:41:35 DietPi systemd[1]: vaultwarden.service: Failed with result 'resources'.
Jul 26 10:41:35 DietPi systemd[1]: Failed to start vaultwarden.service - vaultwarden (DietPi).
- And after a few minutes of waiting, the service can be started all of a sudden and works flawlessly until the next system boot:
root@DietPi:~# systemctl status vaultwarden
● vaultwarden.service - vaultwarden (DietPi)
Loaded: loaded (/lib/systemd/system/vaultwarden.service; enabled; preset: enabled)
Active: active (running) since Wed 2023-07-26 10:46:36 CEST; 12s ago
Docs: https://github.com/dani-garcia/vaultwarden
Main PID: 1250 (vaultwarden)
Tasks: 13 (limit: 1069)
CPU: 418ms
CGroup: /system.slice/vaultwarden.service
└─1250 /opt/vaultwarden/vaultwarden
Jul 26 10:46:37 DietPi vaultwarden[1250]: | Report suspected bugs/issues in the software itself at: |
Jul 26 10:46:37 DietPi vaultwarden[1250]: | https://github.com/dani-garcia/vaultwarden/issues/new |
Jul 26 10:46:37 DietPi vaultwarden[1250]: \--------------------------------------------------------------------/
Jul 26 10:46:37 DietPi vaultwarden[1250]: [INFO] Using environment file `.env` for configuration.
Jul 26 10:46:37 DietPi vaultwarden[1250]: [2023-07-26 10:46:37.958][rocket::shield::shield::_][WARN] Detected TLS-enabled liftoff without enabling HSTS.
Jul 26 10:46:37 DietPi vaultwarden[1250]: [2023-07-26 10:46:37.958][rocket::shield::shield::_][WARN] Detected TLS-enabled liftoff without enabling HSTS.
Jul 26 10:46:37 DietPi vaultwarden[1250]: [2023-07-26 10:46:37.962][rocket::shield::shield::_][WARN] Shield has enabled a default HSTS policy.
Jul 26 10:46:37 DietPi vaultwarden[1250]: [2023-07-26 10:46:37.962][rocket::shield::shield::_][WARN] Shield has enabled a default HSTS policy.
Jul 26 10:46:37 DietPi vaultwarden[1250]: [2023-07-26 10:46:37.963][start][INFO] Rocket has launched from https://0.0.0.0:8001
Jul 26 10:46:37 DietPi vaultwarden[1250]: [2023-07-26 10:46:37.963][start][INFO] Rocket has launched from https://0.0.0.0:8001
- A boot time analysis doesn’t show problems to me:
root@DietPi:~# systemd-analyze blame
2.930s php8.2-fpm.service
2.829s ifupdown-pre.service
1.933s unbound.service
1.457s boot.mount
1.381s dev-mmcblk0p2.device
1.258s phpsessionclean.service
1.144s ssh.service
1.004s lighttpd.service
636ms systemd-udev-trigger.service
607ms keyboard-setup.service
366ms systemd-fsck@dev-disk-by\x2dpartuuid-780ce4e2\x2d01.service
324ms networking.service
304ms systemd-fsck-root.service
297ms systemd-timesyncd.service
290ms ifup@eth0.service
276ms systemd-journald.service
238ms dietpi-preboot.service
217ms systemd-udevd.service
193ms dietpi-ramlog.service
167ms pihole-FTL.service
167ms systemd-remount-fs.service
155ms sys-kernel-debug.mount
153ms dev-mqueue.mount
151ms sys-kernel-tracing.mount
142ms fake-hwclock.service
133ms kmod-static-nodes.service
132ms modprobe@configfs.service
130ms systemd-modules-load.service
129ms modprobe@dm_mod.service
126ms modprobe@efi_pstore.service
123ms systemd-sysctl.service
122ms modprobe@fuse.service
119ms modprobe@loop.service
94ms systemd-journal-flush.service
92ms systemd-sysusers.service
89ms systemd-tmpfiles-setup.service
86ms systemd-random-seed.service
78ms systemd-tmpfiles-setup-dev.service
58ms systemd-user-sessions.service
57ms mnt-mymediassd.mount
52ms systemd-update-utmp.service
50ms var-swap.swap
47ms systemd-update-utmp-runlevel.service
30ms tmp.mount
28ms console-setup.service
26ms var-log.mount
24ms sys-fs-fuse-connections.mount
19ms sys-kernel-config.mount