Failed to start System Logging Service, restart counter is at 5

Hi!

I need help to fix that problem with systemd @ rsyslog.service: Scheduled restart job, restart counter is at 5...

After some updates, the rsyslog.service will not start anymore :confused:

Here's my rsyslog.service:

[Unit]
Description=System Logging Service
Requires=syslog.socket
Documentation=man:rsyslogd(8)
Documentation=http://www.rsyslog.com/doc/

[Service]
Type=notify
ExecStart=/usr/sbin/rsyslogd -n
StandardOutput=null
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=syslog.service

Output:

root@???:/home/???# systemctl status rsyslog.service
● rsyslog.service - System Logging Service
Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-08-22 15:53:11 CEST; 1s ago
Docs: man:rsyslogd(8)
http://www.rsyslog.com/doc/
Process: 5592 ExecStart=/usr/sbin/rsyslogd -n (code=exited, status=127)
Main PID: 5592 (code=exited, status=127)

systemd[1]: rsyslog.service: Service RestartSec=100ms expired, scheduling restart.
systemd[1]: rsyslog.service: Scheduled restart job, restart counter is at 5.
systemd[1]: Stopped System Logging Service.
systemd[1]: rsyslog.service: Start request repeated too quickly.
systemd[1]: rsyslog.service: Failed with result 'exit-code'.
systemd[1]: Failed to start System Logging Service.

rsyslog -d

Output:

rsyslogd error while loading shared libraries: libgcrypt.so.20: failed to map segment from shared object

/usr/sbin/rsyslogd -n

Output:

rsyslogd error while loading shared libraries: libgcrypt.so.20: failed to map segment from shared object

After trying around a few times, I have rsyslog running again.

Solution:

Deleted these 2 files @ /usr/local/lib:

libgcrypt.so.20
libgpg-error.so.0
Now rsyslog is running again without any errors.

Another working Solution.

If restarting rsyslog is failing. delete the run PID and restart the service.

/usr/sbin/rsyslogd -n
rsyslogd: pidfile '/var/run/syslogd.pid' and pid 23799 already exist.
If you want to run multiple instances of rsyslog, you need to specify
different pid files for them (-i option).
rsyslogd: run failed with error -3000 (see rsyslog.h or try http://www.rsyslog.com/e/3000 to learn what that number means)

rm /var/run/syslogd.pid

systemctl restart rsyslog.service

@ makwetjat

What I find strange is that
"rsyslog.service" shows me an error message on boot, that it could not start.
If I have logged in, then it runs without problems.

See:

sudo systemctl status rsyslog.service

● rsyslog.service - System Logging Service
Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-03-20 10:05:39 CET; 7min ago
TriggeredBy: ● syslog.socket
Docs: man:rsyslogd(8)
https://www.rsyslog.com/doc/
Main PID: 2094 (rsyslogd)
Tasks: 4 (limit: 38301)
Memory: 2.1M
CGroup: /system.slice/rsyslog.service
└─2094 /usr/sbin/rsyslogd -n -iNONE

Mär 20 10:05:39 user systemd[1]: Starting System Logging Service...
Mär 20 10:05:39 user rsyslogd[2094]: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd. [v8.2001.0]
Mär 20 10:05:39 user rsyslogd[2094]: [origin software="rsyslogd" swVersion="8.2001.0" x-pid="2094" x-info="https://www.rsyslog.com"] start
Mär 20 10:05:39 user systemd[1]: Started System Logging Service.

If only I could get rid of this error message when booting "rsyslog.service".