流利的错误“ Systemd :: JournalError:没有这样的文件或目录”

时间:2018-12-07 12:44:53

标签: kubernetes fluentd

我确实在我的kube worker上安装了 fluentd-kubernetes-daemonset ,其中一个确实可以正常工作,但另一个却抛出以下错误:

2018-12-07 03:48:33 +0000 [warn]: #0 [in_systemd_bootkube] Systemd::JournalError: No such file or directory retrying in 1s
2018-12-07 03:48:36 +0000 [warn]: #0 [in_systemd_kubelet] Systemd::JournalError: No such file or directory retrying in 1s
2018-12-07 03:48:39 +0000 [warn]: #0 [in_systemd_bootkube] Systemd::JournalError: No such file or directory retrying in 1s
2018-12-07 03:48:40 +0000 [warn]: #0 [in_systemd_docker] Systemd::JournalError: No such file or directory retrying in 1s
2018-12-07 03:48:45 +0000 [warn]: #0 [in_systemd_kubelet] Systemd::JournalError: No such file or directory retrying in 1s
2018-12-07 03:48:44 +0000 [warn]: #0 [in_systemd_bootkube] Systemd::JournalError: No such file or directory retrying in 1s
2018-12-07 03:48:48 +0000 [warn]: #0 [in_systemd_docker] Systemd::JournalError: No such file or directory retrying in 1s
2018-12-07 03:48:55 +0000 [warn]: #0 [in_systemd_bootkube] Systemd::JournalError: No such file or directory retrying in 1s

1 个答案:

答案 0 :(得分:2)

如果您未在容器中设置systemd,默认配置下fluentd将显示以下消息。

[warn]: #0 [in_systemd_bootkube] Systemd::JournalError: No such file or directory retrying in 1s
[warn]: #0 [in_systemd_kubelet] Systemd::JournalError: No such file or directory retrying in 1s
[warn]: #0 [in_systemd_docker] Systemd::JournalError: No such file or directory retrying in 1s

您可以通过在kubernetes配置中将disable设置为FLUENTD_SYSTEMD_CONF环境变量来禁止显示这些消息,例如:

      containers:
        - name: fluentd
          image: fluent/fluentd-kubernetes-daemonset:v1-debian-elasticsearch
          env:
            - name: FLUENT_ELASTICSEARCH_HOST
              value: 'elasticsearch'
            - name: FLUENT_ELASTICSEARCH_PORT
              value: '9200'
            - name: FLUENT_ELASTICSEARCH_SCHEME
              value: 'http'
            - name: FLUENT_UID
              value: '0'
            - name: FLUENTD_SYSTEMD_CONF
              value: 'disable'

请参见Disable systemd input