Monty,
Thanks a lot for your response. I can now exclude change of hostname as a cause, taking into consideration the 'checks' you mentioned:-
Code:
There are a few things however that you should check:
Make sure the new hostname is a FQDN that can be resolved
Make sure the entry in /etc/hosts matches your IP and hostname
Depending on your OS you may also need to update your /etc/hostname file
An empty maillog was a terrible experience for me and I am constantly looking for tools and ways to investigate the cause and reverse the fault if found. After posting this question, a friend told me that they had a similar problem and found a solution that works here:
The default configuration of rsyslog may not provide the log data integrity for xcat log locally · Issue #3910 · xcat2/xcat-core (
the bottom comment)
They said the only thing about this solution is that, although it works, rsyslog outputs every new entry in maillog to stdout as well. It is obviously inconvenient when they need to open SSH window! I am not sure but I think this can be remedied somehow.
Just in case someone reads this message in the future and the link above doesn't work, I am going to insert the last comment below.
Kind regards!
- - - - - - - - - -
Forget the workaround method in the last comment. Here is the real solution.
Edit file, /etc/systemd/journald.conf. The original file shipped by Red Hat has the content below.
Code:
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See journald.conf(5) for details.
[Journal]
#Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitInterval=30s
#RateLimitBurst=1000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=yes
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg
Uncomment the line #RateLimitInterval=30s. And change line #RateLimitBurst=1000 to RateLimitBurst=1000000. After the editing, the file should look like below.
The original settings has a 1000-log-entries-per-30-seconds upper limit of the rate limit of logging. After the editing, the rate limit will be raised to 1,000,000 log entries per 30 seconds.
Code:
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See journald.conf(5) for details.
[Journal]
#Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
RateLimitInterval=30s
RateLimitBurst=1000000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=yes
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg
Make sure file /etc/systemd/journald.conf looks good. And, restart the systemd-journald service to apply the changes. Run command systemctl restart systemd-journald.
Please notice, the rate limit is against systemd-journald. Which is the local log gathering facility provided by systemd. Thus, this problem has no relationship with rsyslog.
- - - - - - - - - -