Skip to content
wordpress meta
title: 'Logger Socket Issue'
date: '2020-10-28T08:20:38-05:00'
status: publish
permalink: /logger-socket-issue
author: admin
excerpt: ''
type: post
id: 1680
category:
    - rsyslog
tag: []
post_format: []

ct_author_last_updated:

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

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


links
-----

- <https://askubuntu.com/questions/861227/dev-log-is-missing-how-do-i-fix>
- <https://github.com/rsyslog/rsyslog-doc/issues/397>
- <https://unix.stackexchange.com/questions/317064/how-do-i-restore-dev-log-in-systemdrsyslog-host>

fix
---

```bash
[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.