Bluehost Self-Managed VPS: Troubleshooting Automatic Security Updates
If you’ve already set up automatic security updates on your Self-Managed VPS but notice updates aren’t being installed, email alerts aren’t arriving, or you see error messages, this troubleshooting guide will help.
Below, you’ll find step-by-step checks, example commands, and solutions for common problems with automated security updates on AlmaLinux, Rocky Linux, CentOS Stream, Ubuntu, Debian, and Fedora.
This article discusses the following:
Common Symptoms
- No security updates are being installed (system is outdated).
- Update-related emails don’t arrive.
- Errors appear in logs, or you get mail delivery bounces.
- “Could not resolve host”, “Failed to download”, or “service not active” messages.
Quick Checks First
- Is the service enabled and running?
- For dnf-automatic (RHEL/Alma/Rocky/Fedora):
Example output:systemctl status dnf-automatic.timer● dnf-automatic.timer - dnf-automatic timer Loaded: loaded (/usr/lib/systemd/system/dnf-automatic.timer; enabled) Active: active (waiting) since Thu 2024-07-11 08:00:00 UTC; 4h 2min ago - For unattended-upgrades (Ubuntu/Debian):
Example output:sudo systemctl status unattended-upgrades.service● unattended-upgrades.service - Unattended Upgrades Shutdown Loaded: loaded (/lib/systemd/system/unattended-upgrades.service; enabled) Active: inactive (dead)
- For dnf-automatic (RHEL/Alma/Rocky/Fedora):
- Can you update manually?
Example output:sudo dnf update --securityLast metadata expiration check: 0:10:12 ago on Thu 11 Jul 2024 12:01:05 PM UTC. Dependencies resolved. Nothing to do. Complete!
Example output:sudo apt update && sudo apt upgradeGet:1 http://archive.ubuntu.com/ubuntu jammy InRelease [2,718 B] ... Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. - Do you have network and DNS access?
Example output:ping -c 2 8.8.8.864 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=22.2 ms ...
Example output:sudo dnf check-update sudo apt updateGet:1 http://... InRelease [XX kB] ... Reading package lists... Done
How to Check Logs for Errors
- dnf-automatic log:
Example output:sudo journalctl -u dnf-automatic.serviceJul 11 06:00:57 vps dnf-automatic[2387]: INFO: Security updates installed: - openssl-1.1.1k-8.el8_4.x86_64 - unattended-upgrades log:
Example output:cat /var/log/unattended-upgrades/unattended-upgrades.log2024-07-11 06:25:19,123 INFO Packages that will be upgraded: openssl 2024-07-11 06:25:19,456 INFO All upgrades installed successfully - Check for error words:
Example output:grep -i error /var/log/unattended-upgrades/unattended-upgrades.logcat /var/log/unattended-upgrades/unattended-upgrades.log | grep -i error 2024-07-11 06:25:19,556 ERROR Failed to install some packages: ...
Example output:sudo journalctl -u dnf-automatic.service | grep -i failJul 11 06:01:00 vps dnf-automatic[2431]: Failed to check for updates: ...
Common Errors & Solutions
| Error/Symptom | What It Means / How to Fix |
|---|---|
| “Could not resolve host”, “Failed to download” | No network or broken repositories.
|
| dnf-automatic.timer or unattended-upgrades.service not active | Start/re-enable the service:
Example output:
|
| Unattended-upgrades runs but doesn't install updates | Check /etc/apt/apt.conf.d/10periodicEnsure lines like APT::Periodic::Unattended-Upgrade "1"; are present and not set to "0"Example:
|
| No mail notifications received |
|
| “Permission denied” or "Cannot write" | Run with sudo or as root.Check directory/file permissions for automatic update scripts or logs. Example:
|
| Updates not showing up/applied |
|
| System requires reboot, but it's not happening |
|
Manually Testing Updates
- RHEL/AlmaLinux/Rocky/CentOS/Fedora:
Example output:sudo dnf update --securityDependencies resolved. Nothing to do. Complete! - Ubuntu/Debian:
Example output:sudo unattended-upgrades --dry-run --debugInitial blacklisted packages: Starting unattended upgrades script ... Packages that will be upgraded: openssl
Example output:sudo apt update && sudo apt upgradeGet:1 http://archive.ubuntu.com/ubuntu jammy InRelease [2,718 B] ... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Email Notification Troubleshooting
- No mailutils/postfix/sendmail installed
sudo apt install mailutils postfix -ysudo dnf install postfix -y - Test email:
Example output:echo "Test" | mail -s "Test" [email protected]Mail sent. - Still not delivered?
- Check
for errors Example output:journalctl -xe | grep mailJul 11 08:00:13 vps postfix/smtp[3033]: connect to aspmx.l.google.com[142.250.27.26]:25: Connection timed out - Check spam/junk folders on recipient’s mail
- Consider using a relay/smarthost (SMTP) for reliable external delivery (see your provider’s docs)
- Check
Reset or Reconfigure Automatic Updates
- Disable/re-enable dnf-automatic timer:
sudo systemctl stop dnf-automatic.timer # disables sudo systemctl start dnf-automatic.timer # restarts - Reconfigure unattended-upgrades:
Example output:sudo dpkg-reconfigure unattended-upgradesConfiguring unattended-upgrades Automatically download and install stable updates? [Yes] - Change update frequency/automation:
sudo nano /etc/apt/apt.conf.d/10periodic sudo nano /usr/lib/systemd/system/dnf-automatic.timer
Summary
Automatic security updates play an important role in maintaining the security of your Self-Managed VPS, but sometimes problems occur that require solutions. This is a step-by-step guide for troubleshooting update, notification, and log error issues. It is imperative that you check the logs, try running manual commands, and make sure the network and mailing functions are working.
Related Articles
- Bluehost Self-Managed VPS: How to Secure Your Server After Setup
- Bluehost Self-Managed VPS: How to Set Up Automatic Security Updates
- Bluehost Self-Managed VPS: OS Comparison
- Using CentOS with Bluehost Self-Managed VPS
- Using ALMALinux with Bluehost Self-Managed VPS
- Using Rocky Linux with Bluehost Self-Managed VPS
- Using Ubuntu with Bluehost Self-Managed VPS
- Using Fedora with Bluehost Self-Managed VPS
- Using Debian with Bluehost Self-Managed VPS
- Guide to Purchasing Self-Managed VPS Hosting with Bluehost