Support Requests - CLICK TO READ BEFORE POSTING


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

logrotate.service fails due to error in file cloud-init-base
#1

System Specs
Operating System – Linux LiteLinux Lite 8.0
CPU / Processor2 virtual CPUs
Memory (RAM)6 GB
StorageOther / not listed
Graphics (GPU)VirtualBox Graphics Adapter
Network deviceIntel 82540EM Gigabit Ethernet Controller
Code:
# systemctl status logrotate × logrotate.service - Rotate log files Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static) Active: failed (Result: exit-code) since ... * Invocation: ********************* TriggeredBy: ● logrotate.timer Docs: man:logrotate(8) man:logrotate.conf(5) Process: 364821 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=1/FAILURE) Main PID: 364821 (code=exited, status=1/FAILURE) Mem peak: 3M CPU: 60ms     systemd[1]: Starting logrotate.service - Rotate log files...     logrotate[364821]: error: cloud-init-base:1 duplicate log entry for /var/log/cloud-init*.log     logrotate[364821]: error: found error in file cloud-init-base, skipping     systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE     systemd[1]: logrotate.service: Failed with result 'exit-code'.     systemd[1]: Failed to start logrotate.service - Rotate log files.

So, the logrotate configuration file named cloud-init-base has a duplicate log rotation entry for /var/log/cloud-init*.log.

The path of addressing this failure depends on the answer to the question whether cloud-init needs to/should be available in Linux Lite? cloud-init is an initialization system designed for cloud instances (AWS EC2, Azure VMs, Google Cloud, OpenStack, etc.).

For people not using cloud-init functionality (I expect it to be the vast majority of Linux Lite users), the resolution can be to just remove cloud-init:
Code:
sudo apt purge cloud-init -y && sudo apt autoremove -y sudo rm -rf /etc/cloud /etc/logrotate.d/cloud-init-base

Otherwise, the duplicate logrotate entry needed to be fixed.

Same seems to apply to the next version of Linux Lite 8.2 - remove or fix Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)