Linux Patch Scan Troubleshooting in ServiceOps
This guide covers common patch scan failures on Linux endpoints managed by Motadata ServiceOps. Use it when the Technician Portal reports a failed scan status on a Debian, Ubuntu, Linux Mint, or Pardus endpoint.
The fixes in this guide require ServiceOps server and agent version v8.7.5 or later. Upgrade both the server and the endpoint agent before applying any fix.
Prerequisites
Before you attempt any fix, confirm the following.
- The ServiceOps server and all affected endpoint agents are upgraded to v8.7.5 or later.
- You have SSH or terminal access to the affected endpoint.
- Internet access or URL reachability is required to run the script. The script contacts the distribution's package repository to rebuild the package index. Without this access, the script cannot complete and the scan will keep failing.
- Confirm that the relevant repository URL is reachable from the endpoint before running the script:
| Distribution | Repository URL |
|---|---|
| Ubuntu | https://archive.ubuntu.com/ http://in.archive.ubuntu.com |
| Debian | http://ftp.us.debian.org/debian/ |
| Pardus | https://depo.pardus.org.tr/pardus/dists/ |
| Linux Mint | http://packages.linuxmint.com/dists/ |
Patch Scan Failed: APT Engine is Corrupted
ServiceOps reports Scan Status: Failed with the reason APT engine is corrupted when it cannot read a reliable package inventory from a Debian-based endpoint.
The endpoint's APT/dpkg package system is broken. This typically results from an interrupted package operation, a damaged package index, or unmet dependencies. Because ServiceOps cannot read the package state, no patch data is returned and the scan fails.
Fix the APT Engine
Run the APTEngineFix script on the affected endpoint.
chmod +x APTEngineFix.sh && bash ./APTEngineFix.sh
The script repairs the APT engine by performing the following actions:
- Refreshes the package index
- Resolves broken dependencies
- Reconfigures any pending packages
- Clears the local package cache
Run the Patch Scan Again
Once the script completes, trigger a new patch scan from the Technician Portal.
- Navigate to Patch Management in the Technician Portal.
- Select the affected endpoint.
- Open its details page and from there initiate the patch scan using Scan Now.
ServiceOps can read the package inventory only after APT is healthy. After a successful scan, missing patches appear and become available for deployment.