loki icon indicating copy to clipboard operation
loki copied to clipboard

Loki Simple Scalable pods crashing with error: index out of range

Open sunidhi271 opened this issue 1 year ago • 1 comments

Describe the bug All the components' pods are in crashlookbackoff, for Simple Scalable mode of deployment with read and write components pods giving the below error: root@ubuntu:~# k logs -n loki loki-write-0 panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]: github.com/grafana/loki/v3/pkg/loki.validateSchemaRequirements(0xc000a92000) /src/loki/pkg/loki/validation.go:32 +0x72a github.com/grafana/loki/v3/pkg/loki.(*Config).Validate(0xc000a92000) /src/loki/pkg/loki/loki.go:283 +0x12b2 main.main() /src/loki/cmd/loki/main.go:65 +0x5b3

To Reproduce Steps to reproduce the behavior:

  • Install Loki helm chart and deploy it in simple scalable mode with the below values

helm repo add grafana https://grafana.github.io/helm-charts helm repo update

create a proxy helm chart

helm create loki

#Update the chart.yaml with the follwoing

apiVersion: v2
name: loki-promtail
description: A Helm chart for Kubernetes
type: application
version: 0.1.0
appVersion: "1.16.0"

dependencies:
#loki version 3.0.0
- name: loki
  version: "6.5.2"
  repository: "https://grafana.github.io/helm-charts"

update the helm chart with loki chart

helm dependency update .

#Update the value file with the below values: cat values.yaml

Expected behavior A clear and concise description of what you expected to happen.

Environment:

  • Infrastructure: [e.g., Kubernetes, bare-metal, laptop]
  • Deployment tool: [e.g., helm, jsonnet]

Screenshots, Promtail config, or terminal output If applicable, add any output to help explain your problem.

sunidhi271 avatar May 15 '24 08:05 sunidhi271

I've met the same problem on single binary installation. The problem was with empty schema_config.configs parameter. You can take a look into simple-scalable-values.yaml file to check the correct scheme

aohoyd avatar Jun 25 '24 19:06 aohoyd