Troubleshooting
Common errors and fixes for PatchPilot on standalone SQL Server EC2 instances. Start with the job audit trail — every event is logged with a cause and suggested resolution.
SSM Connectivity
PatchPilot communicates with your EC2 instances entirely through AWS Systems Manager (SSM). If an instance is not reachable via SSM, discovery and patching cannot proceed.
Instance does not appear in SSM Fleet Manager
The SSM Agent is not running, the EC2 instance profile is missing the required policy, or the instance hasn't checked in yet.
- In the AWS Console, go to Systems Manager → Fleet Manager.
- If the instance is missing entirely, RDP into it and run: Restart-Service AmazonSSMAgent
- If the instance appears but shows Ping Status: Connection Lost, verify the EC2 instance profile has the AmazonSSMManagedInstanceCore managed policy attached.
- Wait 60 seconds after any change and refresh Fleet Manager.
Restart-Service AmazonSSMAgentDiscovery reports 'Instance not reachable'
PatchPilot sent an SSM Run Command but the command did not reach the instance. This is almost always an SSM Agent or instance profile issue.
- Confirm the instance shows Online in Fleet Manager (not Connection Lost or Missing).
- Confirm the EC2 instance profile includes AmazonSSMManagedInstanceCore.
- Re-run discovery after correcting the SSM issue.
SSM Agent is installed but instance shows Offline
The SSM Agent service has stopped, or the instance lacks outbound internet access to the SSM endpoint.
- RDP into the instance and restart the agent: Restart-Service AmazonSSMAgent
- If the instance is in a private subnet with no internet gateway, configure a VPC Endpoint for SSM (com.amazonaws.region.ssm, com.amazonaws.region.ec2messages, com.amazonaws.region.ssmmessages).
Restart-Service AmazonSSMAgentDiscovery Issues
Discovery runs a read-only PowerShell script via SSM that inventories SQL Server installations by reading registry keys. No changes are made to the instance during discovery.
Discovery completes but no instances appear in the Instances tab
The SSM command reached the EC2 node but found no SQL Server installations. This usually means SQL Server is installed under a non-standard path, or the SQL Server Browser service is stopped.
- Confirm SQL Server is installed on that EC2 instance (check Programs and Features or the registry at HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server).
- Ensure the SQL Server service (MSSQLSERVER for default instances, or MSSQL$INSTANCENAME for named instances) is in Running state.
- Wait 1–2 minutes and refresh the Instances tab — discovery results are written asynchronously.
- Re-run discovery. If the issue persists, contact support@zerodba.com with your Instance ID.
Instance shows compliance state UNKNOWN
Discovery ran but could not read the current build version from the registry. This can happen if the SQL Server instance is starting up, recovering, or if registry permissions are restricted.
- Verify the SQL Server service is Running (not Starting or Stopping).
- Re-run discovery on that specific instance using the refresh button on the Instances row.
- If UNKNOWN persists after two attempts, contact support with your EC2 Instance ID.
Instance shows compliance state STALE
Discovery data is more than 48 hours old. PatchPilot marks instances Stale to flag that the compliance picture may be out of date.
- Click Discover / Add Node and re-enter the EC2 Instance ID to run a fresh discovery.
- Alternatively click the refresh icon on the instance row.
Pre-flight Failures
Before applying any patch, PatchPilot runs a pre-flight check on each instance. These checks are designed to catch conditions that would cause a patch to fail or leave the instance in a bad state. A pre-flight failure is a safety stop — nothing has been changed on the instance.
PREFLIGHT_DISK_SPACE_INSUFFICIENTInsufficient disk space
The CU installer package requires approximately 3 GB of free space on the system drive (C:\) for download, extraction, and installation. The pre-flight check found less than this threshold.
- RDP into the EC2 instance.
- Open Disk Cleanup on the C:\ drive and clear temporary files, Windows Update cache, and the Recycle Bin.
- Alternatively, delete old SQL Server backup files or log files from non-system drives if space allows.
- Free at least 4 GB to provide a comfortable margin.
- Re-run the patch job from the Jobs tab once space is cleared.
PREFLIGHT_SQL_SERVICE_NOT_RUNNINGSQL Server service is not running
PatchPilot requires the SQL Server service to be in a Running state before patching. If the service is Stopped, Starting, or in an error state, the pre-flight check fails to prevent patching an already-unhealthy instance.
- RDP into the EC2 instance.
- Open Services (services.msc) and locate SQL Server (MSSQLSERVER) or your named instance.
- Start the service and wait for it to reach Running state.
- Check the SQL Server error log (default: C:\Program Files\Microsoft SQL Server\MSSQLXX.MSSQLSERVER\MSSQL\Log\ERRORLOG) for startup errors if the service won't start.
- Re-run the patch job once the service is confirmed Running.
PREFLIGHT_PENDING_REBOOT_DETECTEDWindows pending reboot
Windows has flagged that a reboot is required before new software can be safely installed. This is detected via registry keys left by previous Windows Updates or software installs. Installing a SQL Server CU on a machine with a pending reboot can result in a failed or incomplete installation.
- Schedule a maintenance window to reboot the EC2 instance.
- After the instance comes back online and SSM shows it Online in Fleet Manager, re-run discovery to confirm connectivity.
- Re-run the patch job.
- Alternatively, if your job plan was generated with Allow pre-patch reboot enabled, PatchPilot will handle the reboot automatically before proceeding.
PREFLIGHT_INSTALLER_UNAVAILABLECU installer could not be downloaded
PatchPilot downloads the CU package directly from Microsoft's download servers at the time of patching. This error means the EC2 instance could not reach the Microsoft CDN. This is usually a network or security group issue.
- Confirm the EC2 instance has outbound internet access on port 443.
- If the instance is in a private subnet, verify a NAT Gateway or VPC endpoint is configured that allows outbound HTTPS.
- Confirm no Security Group or Network ACL is blocking outbound connections to *.microsoft.com or *.download.windowsupdate.com.
- Test from the instance: Test-NetConnection -ComputerName download.microsoft.com -Port 443
- Re-run the patch job once connectivity is confirmed.
Test-NetConnection -ComputerName download.microsoft.com -Port 443Job Failures During Patching
These errors occur after a job passes pre-flight and begins the actual patch installation.
Installer exited with a non-zero return code
The SQL Server CU installer ran but reported a failure. Common causes: another process is using SQL Server files, the installer was interrupted, or Windows Installer is in a locked state.
- Open the job audit trail and note the exit code in the failure event.
- RDP into the instance and check the SQL Server Setup Bootstrap log at C:\Program Files\Microsoft SQL Server\[version]\Setup Bootstrap\Log\.
- If the error is 'Another installation is in progress,' wait 10 minutes and re-run the job.
- If the SQL Server service is stopped after a failed install, start it manually and verify the instance is healthy before re-running.
- Contact support@zerodba.com if the installer log shows an error you cannot resolve — include the exit code and the last 20 lines of the bootstrap log.
Job timed out / shows as Stale in the dashboard
The patch job started executing but did not report back within the expected window. This can happen if the instance rebooted unexpectedly, lost SSM connectivity mid-job, or if the installer is taking longer than usual.
- Check the instance in Fleet Manager — if it shows Connection Lost, the instance may have rebooted. Wait for it to come back online.
- Check the SQL Server service state once the instance is online. If SQL Server is running and on the new build, the patch succeeded even though the job timed out. Re-run discovery to refresh compliance state.
- If the instance is online and SQL Server is still on the old build, re-run the job.
- If the instance is unreachable, investigate the EC2 console for system logs or scheduled maintenance events.
Job stuck in Executing state
The SSM command is running but has not completed. Large CU packages (some are 1+ GB) can take 20–40 minutes to download, extract, and install, depending on instance type and network speed.
- Wait at least 45 minutes before treating a job as stuck. Patching a SQL Server CU takes longer than most software installs.
- If the job has been Executing for more than 90 minutes, check Fleet Manager to confirm the instance is still Online.
- Use the Force Fail button in the Jobs tab to manually fail a confirmed-stuck job, then re-run it.
Post-Patch Issues
Instance still shows BEHIND after a completed job
The job completed successfully but the compliance state hasn't refreshed yet, or the post-patch discovery didn't run.
- Wait 5 minutes after job completion — compliance state updates asynchronously.
- Click Refresh in the dashboard to force a data reload.
- If the instance still shows BEHIND, re-run discovery on that node. The post-patch discovery occasionally misses if the instance rebooted slowly.
SQL Server won't start after patching
In rare cases a CU install can leave SQL Server in a state where it won't restart. This is typically caused by a corrupted temp directory, a missing Visual C++ redistributable, or a licensing change in the CU.
- Check the SQL Server error log immediately: C:\Program Files\Microsoft SQL Server\MSSQLXX.MSSQLSERVER\MSSQL\Log\ERRORLOG
- The error log will show the specific startup failure. Common fixes: repair the Visual C++ redistributable, clear the SQL Server temp directory, or run a SQL Server repair from Add/Remove Programs.
- Email urgent@zerodba.com immediately — this is a production-impacting issue (P1) and will receive a response within 2 hours.
Instance shows the correct build but job shows Failed
The patch applied successfully but the job's post-patch validation step timed out or couldn't connect to read the new build number. The instance is actually patched.
- Re-run discovery on the instance. If it now shows COMPLIANT, the patch succeeded.
- Use Force Fail to clean up the stuck job record if it hasn't already auto-expired.
Email support@zerodba.com with your Customer ID, the Job ID from the Jobs tab, and the last event from the audit trail. For production-impacting issues, email urgent@zerodba.com for a response within 2 hours.