From 2702f412b54e4559d9c2f5a43cc3530e1500cc29 Mon Sep 17 00:00:00 2001 From: Will Mooreston Date: Thu, 11 Jun 2026 16:29:06 -0700 Subject: [PATCH] add remote-fs.target to tomcat_lk.service After= dependency Fixes a race condition where tomcat_lk.service starts before the EFS mount is ready after a system reboot. The nightly update script (lk-ssm-update.sh) reboots the server after installing new binaries; on boot, systemd was starting LabKey before the NFS/EFS mount at /mnt/efs_volume was available, leaving the /labkey/labkey/files symlink broken and causing LabKey to abort with "Invalid site root does not exist". Adding remote-fs.target to After= ensures systemd waits for all _netdev remote filesystem mounts before starting the service. Co-Authored-By: Claude Sonnet 4.6 --- install-labkey.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-labkey.bash b/install-labkey.bash index be735c2..5da2d9b 100755 --- a/install-labkey.bash +++ b/install-labkey.bash @@ -1093,7 +1093,7 @@ function step_tomcat_service_embedded() { [Unit] Description=lk Apache Tomcat Application - After=syslog.target network.target + After=syslog.target network.target remote-fs.target [Service] Type=simple @@ -1224,7 +1224,7 @@ function step_tomcat_service_standard() { [Unit] Description=lk Apache Tomcat Application - After=syslog.target network.target + After=syslog.target network.target remote-fs.target [Service] Type=forking