How to solve syslog/rsyslog does not show new log messages
This document (000019658) is provided subject to the disclaimer at the end of this document.
Environment
Situation
logger "isjournalforwarding"
The following 2 situations have been identified, caused by 3 possible reasons:
- Empty /var/log/messages or no new messages
Both commands will show no result:grep "isjournalforwarding" /var/log/messages
journalctl |grep isjournalforwarding
- The systemd journal (
journalctl -xe
) shows messages, but e.g. /var/log/messages is not updated.
Shows result:journalctl |grep isjournalforwarding
No result for:grep "isjournalforwarding" /var/log/messages
Resolution
- Remote server is not reachable
check network and server are reachable
- journald is not forwarding:
Enable forwarding in /etc/systemd/journald.conf and restart systemd-journald.service
- syslog socket down
Restarting the systemd socket: systemctl restart syslog.socket
Cause
- Remote server is not reachable
The message queue fills up to maximum. The rsyslog memory usage would grow higher than usual
- journald is not forwarding:
/etc/systemd/journald.conf
#ForwardToSyslog=yes
- syslog socket down
Syslog does not pick up incoming dat from socketThe following command
systemctl status syslog.socket
Will show the service as "running"
But testing with socat shows socked is down:zypper in socat
printf "<13>test_printf" | socat - UNIX-CLIENT:/run/systemd/journal/syslog
2020/05/26 08:10:33 socat[58200] E connect(3, AF=1 "/run/systemd/journal/syslog", 29): Connection refused
Additional Information
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000019658
- Creation Date: 30-Jun-2020
- Modified Date:03-Dec-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com