From 3d82301321afdcc4f2f8786883bd15b1a64c6e83 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 26 Nov 2014 15:05:55 -0500 Subject: [PATCH] journald: proceed even if some sockets are unknown systemd-journald would refuse to start if it received an unknown socket from systemd. This is annoying, because the failure more for systemd-journald is unpleasant: systemd will keep restarting journald, but most likely the same error will occur every time. It is better to continue. journald will try to open missing sockets on its own, so things should mostly work. One question is whether to close the sockets which cannot be parsed or to keep them open. Either way we might lose some messages. This failure is most likely for the audit socket (selinux issues), which can be opened multiple times so this not a problem, so I decided to keep them open because it makes it easier to debug the issue after the system is fully started. --- src/journal/journald-server.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index 62ae79a5c..cd4843c98 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -1566,10 +1566,8 @@ int server_init(Server *s) { s->audit_fd = fd; - } else { - log_error("Unknown socket passed."); - return -EINVAL; - } + } else + log_error("Unknown socket passed as file descriptor %d, ignoring.", fd); } r = server_open_syslog_socket(s); -- 2.30.2