Skip to main content
Logo
Overview

Logger Socket Issue

October 27, 2020
1 min read

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

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

fix

Terminal window
[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.