Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4697

Package list update of apt-daily.service is failing silently, update-success-stamp despite errors

$
0
0

We have an unattended update setup. To make sure nothing slips, we check for pending security updates and trigger a warning if there is something available but not installed for a week.

Now we have a server with security updates not installed for a while because of the periodic package update failing without any indication of it. We would like to add a trigger to the monitoring to detect this, however, that seems not so simple.

apt update prints an error and has a non-zero exit status:

# apt update. . . E: Some index files failed to download. They have been ignored, or old ones used instead.# echo $?100

However, the above did set the "success" stamp at:

# ls -l /var/lib/apt/periodic/update-success-stamp-rw-r--r-- 1 root root 0 Oct 11 10:58 /var/lib/apt/periodic/update-success-stamp

Also, despite the error, the systemd service apt-daily.service is exiting with exit status 0.

How is it possible to detect that the daily package update is failing?

I am running Ubuntu 22.04

cat /etc/lsb-release DISTRIB_ID=UbuntuDISTRIB_RELEASE=22.04DISTRIB_CODENAME=jammyDISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"

Viewing all articles
Browse latest Browse all 4697

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>