Bobcares

How to fix: Rsyslogd fails to start

by | Oct 16, 2021

Is rsyslogd fails to start error making server management difficult? Read how our Support Engineers tracked down the cause behind this error and the solutions they came up with to resolve it as well.

The rsyslogd fails to start error has been causing a lot of havoc. If you have also faced this error, worry not our Support Team has come up with two different elegant solutions to solve this error.

About rsyslogd fails to start error

Have you been coming across a rsyslogd fail error that looks more or less like this:

Jul 16 09:26:03 host.domain.tld rsyslogd[1619937]: imjournal: open on state file `/var/lib/rsyslog/imjournal.state' failed [v8.24.0-57.el7_9.1 try http://www.rsyslog.com/e/2013 ]

This error is a result of open journal files exceeding the default limit of 1024. You can check the number of allowed journal files by running the following command:

journalctl --header | grep -c 'File Path:'

How to fix rsyslogd fails to start error?

Our Support Engineers have come up with two solutions to resolve this particular error. The first one involves deleting older journal files while the second option involves increasing the number of journal files that can be opened. Let’s take at each of these solutions in detail:

Solution 1:

  1. First, we will deleted older journal files with the journalctl command. For instance:
    journalctl --vacuum-time='3 weeks'

    This command erases any journal files older than 3 weeks.

  2. Next, we will check whether the number of journal files has been reduced by running the following command:
    journalctl --header | grep -c 'File Path:'
  3. After that, run the following command to restart rsyslig service:
    systemctl restart rsyslog
  4. Finally, adjust the configuration in /etc/systemd/journald.conf in order to use fewer and larger journal files to use up less storage space.

Solution 2:

  1. First, open the /etc/rsyslogd.conf file and add the following statement under the GLOBAL DIRECTIVES section:
    $MaxOpenFiles 4096

    This will allow you to open up to 4096 journal files. If you need to open more, you can also change the LimitNOFILE limit (found under the Service section in the rsyslog.service systemd file).

  2. Next, restart the service with the following commands and you are good to go.
    systemctl daemon-reload 
    systemctl restart rsyslog

[Looking for help with Server Management? Give us a call today.]

Conclusion

In essence, we learned the reason behind the rsyslogd fails to start error. The Support Engineers at Bobcares also offered two different solutions to solve this specific issue.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

2 Comments

  1. Farzod Rustamov

    Comment *[root@TK-ZXP-001 zabbix-syslog-master]# systemctl status rsyslog.service
    ● rsyslog.service – System Logging Service
    Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled)
    Active: active (running) since Wed 2023-02-15 16:04:09 +05; 6s ago
    Docs: man:rsyslogd(8)
    https://www.rsyslog.com/doc/
    Main PID: 1339013 (rsyslogd)
    Tasks: 6 (limit: 50662)
    Memory: 1.5M
    CGroup: /system.slice/rsyslog.service
    └─1339013 /usr/sbin/rsyslogd -n

    Feb 15 16:04:09 TK-ZXP-001 systemd[1]: rsyslog.service: Succeeded.
    Feb 15 16:04:09 TK-ZXP-001 systemd[1]: Stopped System Logging Service.
    Feb 15 16:04:09 TK-ZXP-001 systemd[1]: Starting System Logging Service…
    Feb 15 16:04:09 TK-ZXP-001 rsyslogd[1339013]: module ‘imudp’ already in this config, cannot be added [v8.2102.0-10.el8 try https://www.rsyslog.com/e/2221 ]
    Feb 15 16:04:09 TK-ZXP-001 systemd[1]: Started System Logging Service.
    Feb 15 16:04:09 TK-ZXP-001 rsyslogd[1339013]: [origin software=”rsyslogd” swVersion=”8.2102.0-10.el8″ x-pid=”1339013″ x-info=”https://www.rsyslog.com”] start
    Feb 15 16:04:09 TK-ZXP-001 rsyslogd[1339013]: imjournal: journal files changed, reloading… [v8.2102.0-10.el8 try https://www.rsyslog.com/e/0 ]

    how fix it ?

    Reply
    • Hiba Razak

      Hi Farzod,
      Our experts can help you with the issue.we will be happy to talk to you through our live chat(click on the icon at right-bottom).

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.