The rsyslog service on Ubuntu manages system log ingestion, forwarding authentication messages to /var/log/auth.log, and routing kernel diagnostics to centralized SIEM collectors. When system booting stalls or displays “Failed to start rsyslog.service: System Logging Service”, system administrators lose vital security audit trails. Restoring rsyslog requires validating configuration file syntax and verifying spool directory permissions.
Check Service Status and Systemd Journal Output
Isolate the specific syntax error or socket bind failure preventing the daemon from starting.
- Open a terminal (Ctrl + Alt + T).
- Query the service operational status:
systemctl status rsyslog.service - Inspect recent system journal logs:
sudo journalctl -u rsyslog -b --no-pager - If the daemon is masked, unmask and start it immediately:
sudo systemctl unmask rsyslog sudo systemctl enable --now rsyslog
Validate rsyslog Configuration Syntax in Debug Mode
Syntax errors inside /etc/rsyslog.conf or drop-in files in /etc/rsyslog.d/ cause the daemon to abort immediately upon startup.
- Execute the configuration syntax verification command:
sudo rsyslogd -N1 - The utility will parse all configuration files and report the exact file name and line number of any syntax errors or obsolete RainerScript parameters.
- Correct reported formatting errors using
sudo nano /etc/rsyslog.conf.
Verify Spool Directory Ownership and Disk Space
Rsyslog requires write ownership over its working spool directory in /var/spool/rsyslog.
- Inspect directory ownership:
ls -ld /var/spool/rsyslog - Ensure ownership is assigned to
syslog:admwith 700 permissions:sudo chown syslog:adm /var/spool/rsyslog sudo chmod 700 /var/spool/rsyslog - Restart the service cleanly:
sudo systemctl restart rsyslog.service