{"id":1680,"date":"2020-10-28T08:20:38","date_gmt":"2020-10-28T13:20:38","guid":{"rendered":"https:\/\/blog.iqonda.net\/?p=1680"},"modified":"2020-10-28T08:20:38","modified_gmt":"2020-10-28T13:20:38","slug":"logger-socket-issue","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/logger-socket-issue\/","title":{"rendered":"Logger Socket Issue"},"content":{"rendered":"
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.<\/p>\n
[root@ip-10-200-2-41 ~]# logger foobar\nlogger: socket \/dev\/log: No such file or directory<\/code><\/pre>\nlinks<\/h2>\n\n- https:\/\/askubuntu.com\/questions\/861227\/dev-log-is-missing-how-do-i-fix<\/a><\/li>\n
- https:\/\/github.com\/rsyslog\/rsyslog-doc\/issues\/397<\/a><\/li>\n
- https:\/\/unix.stackexchange.com\/questions\/317064\/how-do-i-restore-dev-log-in-systemdrsyslog-host<\/a><\/li>\n<\/ul>\n
fix<\/h2>\n[root@ip-10-200-2-41 ~]# ls -l \/dev\/log\nls: cannot access \/dev\/log: No such file or directory\n\n[root@ip-10-200-2-41 ~]# systemctl restart systemd-journald.socket\n\n[root@ip-10-200-2-41 ~]# ls -l \/dev\/log\nsrw-rw-rw- 1 root root 0 Oct 28 08:07 \/dev\/log\n\n[root@ip-10-200-2-41 ~]# logger foo<\/code><\/pre>\nNOTE: 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.<\/p>\n","protected":false},"excerpt":{"rendered":"
Logger Socket Issue I use logger to inject test messages for a rsyslog relay setup. After I split out my<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[121],"tags":[],"class_list":["post-1680","post","type-post","status-publish","format-standard","hentry","category-rsyslog"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/1680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=1680"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/1680\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=1680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=1680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=1680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}