Riaan's SysAdmin Blog

My tips, howtos, gotchas, snippets and stuff. Use at your own risk!

rsyslog

Logger Socket Issue

Logger Socket Issue

I use logger to inject test messages for a rsyslog relay setup. After I split out my configuration from rsyslog.conf to a file in /etc/rsyslog.d I started seeing this logger issue writing to /dev/log. This was not happening when everything was contained in /etc/rsyslog.conf.

error

[root@ip-10-200-2-41 ~]# logger foobar
logger: socket /dev/log: No such file or directory

links

fix

[root@ip-10-200-2-41 ~]# ls -l /dev/log
ls: cannot access /dev/log: No such file or directory

[root@ip-10-200-2-41 ~]# systemctl restart systemd-journald.socket

[root@ip-10-200-2-41 ~]# ls -l /dev/log
srw-rw-rw- 1 root root 0 Oct 28 08:07 /dev/log

[root@ip-10-200-2-41 ~]# logger foo

NOTE: Not sure if above fix it permanently. Could have been a unique race condiction and resolved now but reading the reference material it is confusing what exactly is the rot cause.

admin

Bio Info for Riaan