grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
24k stars 3.46k forks source link

loki error caller=flush.go:220 org_id=fake msg="failed to flush user" #13249

Open Liang-Zai opened 5 months ago

Liang-Zai commented 5 months ago

level=error ts=2024-06-18T05:31:21.309015445Z caller=flush.go:220 org_id=fake msg="failed to flush user" err="open /data/loki/chunks/ZmFrZS9hYmQzZTYwMDBjOWI0OWQyOjE5MDI5Y2QzMjk2OjE5MDI5Y2Q0NzA3OmI3ZWMxYjE3: no space left on device" level=error ts=2024-06-18T05:31:21.309073172Z caller=flush.go:220 org_id=fake msg="failed to flush user" err="open /data/loki/chunks/ZmFrZS9lOGJjOWI0YTllNWI0YjhmOjE5MDI3OWUxN2RmOjE5MDI3OWZmODkwOjMxZjVhZTA=: no space left on device" level=error ts=2024-06-18T05:31:21.309151159Z caller=flush.go:220 org_id=fake msg="failed to flush user" err="open /data/loki/chunks/ZmFrZS8xZTNhNzVhN2E0MDNkMGNkOjE5MDI4YjJjMDBmOjE5MDI4YjNhODkzOmIyMjBlMDZm: no space left on device" level=error ts=2024-06-18T05:31:21.309226812Z caller=flush.go:220 org_id=fake msg="failed to flush user" err="open /data/loki/chunks/ZmFrZS8zY2Q4ZDEyODA3YjQyNWU2OjE5MDI5NjNlNTIwOjE5MDI5NjYyZTdiOmNhNTNkZGU=: no space left on device" level=error ts=2024-06-18T05:31:21.309291007Z caller=flush.go:220 org_id=fake msg="failed to flush user" err="open /data/loki/chunks/ZmFrZS83OTAzYjE3MjJjZTg2MWY0OjE5MDI4MmJmZWQ2OjE5MDI4MmMwMDAwOmQzMTVkMWRi: no space left on device" level=error ts=2024-06-18T05:31:21.309348267Z caller=flush.go:220 org_id=fake msg="failed to flush user" err="open /data/loki/chunks/ZmFrZS9kNjI0MGVhMTA2MDhhOTM5OjE5MDI3YTFkNTM2OjE5MDI3YTFkN2JmOjY0MDZhZjU0: no space left on device" level=error ts=2024-06-18T05:31:21.309415316Z caller=flush.go:220 org_id=fake msg="failed to flush user" err="open /data/loki/chunks/ZmFrZS8zZjg2Y2YwNGRkNjEzY2Y5OjE5MDI5N2UxNDViOjE5MDI5N2ZlOTM3OjY1YTI4N2Ey: no space left on device" level=error ts=2024-06-18T05:31:21.309485367Z caller=flush.go:220 org_id=fake msg="failed to flush user" err="open /data/loki/chunks/ZmFrZS81YTM5YjY2Zjc4YzQ3NzRkOjE5MDI5MjUxMGFhOjE5MDI5MjU4MDA3OmE0OWJjZDA4: no space left on device" level=error ts=2024-06-18T05:31:21.309552694Z caller=flush.go:220 org_id=fake msg="failed to flush user" err="open /data/loki/chunks/ZmFrZS81MDFhM2M4NzEzOGI4MmFhOjE5MDI2ZGY3MzEwOjE5MDI2ZTFhMWZhOjgxYTJkYTFj: no space left on device" level=error ts=2024-06-18T05:31:21.309638848Z caller=flush.go:220 org_id=fake msg="failed to flush user" err="open /data/loki/chunks/ZmFrZS9kMTZmMDhlZTgwNjQ3MDI3OjE5MDI4NzU0MzZlOjE5MDI4NzcxODVlOjY5NThhMDNj: no space left on device"

How to handle the error above

jtackaberry commented 5 months ago

Add more space to the volume where /data/loki/chunks is located?

Liang-Zai commented 5 months ago

screenshot-20240619-080743 screenshot-20240619-080743

Filesystem Size Used Avail Use% Mounted on /dev/sdb1 30T 13T 16T 44% /data

Storage space should still be sufficient

jtackaberry commented 5 months ago

This is almost certainly environmental, not related to Loki.

Exec into the pod and check df -h /data/loki from within the pod. Try to touch a file under that path as well.

Liang-Zai commented 5 months ago

screenshot-20240619-082032

When I touch test.txt, it works fine

Liang-Zai commented 5 months ago

loki-statefulset.yaml ''' apiVersion: v1 kind: Service metadata: name: loki namespace: dhome-monitor labels: app: loki spec: type: NodePort ports:

loki-rbac.yaml ''' apiVersion: v1 kind: ServiceAccount metadata: name: loki namespace: dhome-monitor

apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: loki namespace: dhome-monitor rules:

loki-configmap.yaml ''' apiVersion: v1 kind: ConfigMap metadata: name: loki namespace: dhome-monitor labels: app: loki data: loki.yaml: | auth_enabled: false ingester: chunk_idle_period: 2m chunk_block_size: 262144 chunk_retain_period: 0s max_transfer_retries: 0 chunk_target_size: 1572864
max_chunk_age: 2m chunk_encoding: snappy concurrent_flushes: 128 flush_check_period: 10s flush_op_timeout: 2m lifecycler: ring: kvstore: store: memberlist
replication_factor: 1
limits_config: enforce_metric_name: false reject_old_samples: true reject_old_samples_max_age: 168h
max_streams_matchers_per_query: 100000 max_entries_limit_per_query: 0 schema_config: configs:

'''

This is my loki configuration, I wonder if it is a configuration problem