ulogd2.service 不适用于 Ubuntu 19.10

ulogd2.service 不适用于 Ubuntu 19.10

ulogd2.service 似乎无法在 Ubuntu 19.10 上运行。

ls /run/ulog/ulogd.pid这样做了,什么也没找到。我认为无法生成该文件。

当我这样做时,ls -lt /run它显示正确的访问权限:

drwxr-xr-x  2 ulog    ulog      40 Feb 16 17:32 ulog


Feb 16 17:32:28 stag-1 ulogd[7074]: registering plugin `JSON'
Feb 16 17:32:28 stag-1 ulogd[7074]: building new pluginstance stack: 'ct1:NFCT,ip2str1:IP2STR,print1:PRINTFLOW,emunfct1:LOGEMU'
Feb 16 17:32:28 stag-1 ulogd[7074]: can't find requested plugin NFCT
Feb 16 17:32:28 stag-1 ulogd[7074]: building new pluginstance stack: 'ct2:NFCT,ip2str1:IP2STR,jsonnfct1:JSON'
Feb 16 17:32:28 stag-1 ulogd[7074]: can't find requested plugin NFCT
Feb 16 17:32:28 stag-1 ulogd[7074]: not even a single working plugin stack
Feb 16 17:32:28 stag-1 systemd[1]: ulogd2.service: Can't open PID file /run/ulog/ulogd.pid (yet?) after start: No such file or directory
Feb 16 17:32:28 stag-1 systemd[1]: ulogd2.service: Failed with result 'protocol'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit ulogd2.service has entered the 'failed' state with result 'protocol'.
Feb 16 17:32:28 stag-1 systemd[1]: Failed to start Netfilter Userspace Logging Daemon.
-- Subject: A start job for unit ulogd2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit ulogd2.service has finished with a failure.
--
-- The job identifier is 26836 and the job result is failed.

答案1

我找到了原因。错误消息对我来说不清楚。ulogd2 在 Ubuntu 19.10 中默认注释掉了大多数插件。(与 18.04 不同)。

我必须删除以下四个 #(注释)才能使其正常工作。然后它将自动创建该 pid 文件。这与我最初认为的权限无关。

plugin="/usr/lib/x86_64-linux-gnu/ulogd/ulogd_inpflow_NFCT.so"
plugin="/usr/lib/x86_64-linux-gnu/ulogd/ulogd_filter_IP2STR.so"
plugin="/usr/lib/x86_64-linux-gnu/ulogd/ulogd_filter_PRINTFLOW.so"
plugin="/usr/lib/x86_64-linux-gnu/ulogd/ulogd_output_LOGEMU.so"

相关内容