fluent / fluent-bit-kubernetes-logging

Fluent Bit Kubernetes Daemonset
Apache License 2.0
468 stars 249 forks source link

[error] [sqldb] cannot open database /var/log/flb_kube.db #97

Open andutt opened 2 years ago

andutt commented 2 years ago

Bug Report

Describe the bug Openshift 4 CoreOS cri-o fluent-bit v1.8.10 deployed in logging namespace as HOWTO. Role, Rolebinding and serviceaccount created as HOWTO. Deploying daemonset and following errormessage occours.

To Reproduce

[2022/03/25 09:51:42] [ info] [engine] started (pid=1) [2022/03/25 09:51:42] [ info] [storage] version=1.1.5, initializing... [2022/03/25 09:51:42] [ info] [storage] in-memory [2022/03/25 09:51:42] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128 [2022/03/25 09:51:42] [ info] [cmetrics] version=0.2.2 [2022/03/25 09:51:42] [error] [sqldb] cannot open database /var/log/flb_kube.db [2022/03/25 09:51:42] [error] [input:tail:tail.0] could not open/create database [2022/03/25 09:51:42] [error] Failed initialize input tail.0 [2022/03/25 09:51:42] [error] [lib] backend failed


- Steps to reproduce the problem:
Deploy daemonset

**Expected behavior**
Fluent-bit starts and transfer logs to "outside" elasticsearch solution.

**Your Environment**
Openshift 4
CoreOS cri-o
fluent-bit v1.8.10

**Additional context**
The only thing changed is Path since pod logs have a different path on CoreOS, like below. Where does fluent-bit want to create this database, is it in the filesystem on the nodes or on a mounted pvc? Since permissions to write on the nodes must likely is prohibited by permissions and security contexts.

[INPUT]
    Name              tail
    Tag               kube.*
    Path              /host/var/log/pods/*.log
    Parser            cri
    DB                /var/log/flb_kube.db
    Mem_Buf_Limit     5MB
    Skip_Long_Lines   On
    Refresh_Interval  10
benz9527 commented 1 year ago

I also met this question on OpenShift 4.8 CoreOS. I deployed the fluentbit by fluent-operator which developed by kubesphere.