Environment
- YugabyteDB Anywhere (YBA): 2024.x and later
- YugabyteDB Version: Universes running < 2.20.x or Universes created with legacy/advanced/manual deployment methods
Issue
After upgrading YugabyteDB Anywhere (YBA) to version 2024.x or later, health checks for a Universe may fail with the following error:
Failed "Systemd unit preexec check" yb-master.service has no clock_sync script ExecStartPre yb-tserver.service has no clock_sync script ExecStartPre
This happens when YBA alone is upgraded, but the Universes are still running older YugabyteDB versions (e.g., 2.20.x or below) or were provisioned by legacy or advanced methods that did not embed a clock synchronization step in the systemd unit files.
Cause
Newer YBA versions add a health check which ensures that both the yb-master and yb-tserver systemd units contain an ExecStartPre= directive running the clock-sync.sh script. This directive ensures server clocks are synchronized at start to avoid split-brain or data consistency issues.
If your Universe’s systemd service files lack this line, the check fails and upgrade/operations may be blocked.
Resolution
You have two ways to resolve this health check failure:
Option 1: Apply Workaround (if not upgrading Universe right away)
To work around this and allow Universe upgrades or other operations to complete, follow these steps on each YugabyteDB node:
Prerequisites:
- SSH access to each YugabyteDB node.
- Sudo/root privileges.
Step 1. Create clock-sync.sh Script
The path is typically /home/yugabyte/bin/, but use your install prefix if different. Create a dummy if missing:
sudo bash -c "echo '#!/bin/bash' > /home/yugabyte/bin/clock-sync.sh" sudo chmod +x /home/yugabyte/bin/clock-sync.sh
Step 2. Add ExecStartPre to Service Files
Edit both /etc/systemd/system/yb-master.service and /etc/systemd/system/yb-tserver.service. Under the [Service] section, ensure the following line is present:
[Service] ... ExecStartPre=/home/yugabyte/bin/clock-sync.sh ...
Step 3. Reload systemd
Apply changes by reloading the systemd daemon:
sudo systemctl daemon-reload
Option 2: Ignore the Health Check and Complete the Universe Upgrade
If you are planning to upgrade the Universe immediately, you may ignore this health check failure until the upgrade completes. Once the binary upgrade is finished, the installer will automatically install the correct clock-sync script and update the service files. No further manual action is needed after upgrade.
Refrence ID: SUPPORT-859
Comments
0 comments
Article is closed for comments.