Grafana loki installation issue

When trying to install loki stack we are getting the below error. Please can someone help on fixing the issue
Command used to deploy :

helm upgrade --install loki grafana/loki-stack \
 --set fluent-bit.enabled=false,promtail.enabled=true,grafana.enabled=true,loki.persistence.enabled=true,loki.persistence.storageClassName=azurefile,loki.persistence.size=5Gi

Kubernetes version : v1.27.7 ( AKS )

LOG :

level=info ts=2024-01-12T13:22:26.818431374Z caller=main.go:103 msg="Starting Loki" version="(version=2.6.1, branch=HEAD, revision=6bd05c9a4)"
level=info ts=2024-01-12T13:22:26.818632458Z caller=server.go:288 http=[::]:3100 grpc=[::]:9095 msg="server listening on addresses"
level=info ts=2024-01-12T13:22:26.819111949Z caller=modules.go:736 msg="RulerStorage is not configured in single binary mode and will not be started."
level=warn ts=2024-01-12T13:22:26.85339129Z caller=experimental.go:20 msg="experimental feature in use" feature="In-memory (FIFO) cache - chunksfifocache"
level=info ts=2024-01-12T13:22:26.854502402Z caller=table_manager.go:134 msg="uploading tables"
level=info ts=2024-01-12T13:22:26.877149116Z caller=table_manager.go:252 msg="query readiness setup completed" duration=1.853µs distinct_users_len=0
level=info ts=2024-01-12T13:22:26.877187518Z caller=shipper.go:124 msg="starting index shipper in RW mode"
level=info ts=2024-01-12T13:22:26.927980347Z caller=shipper_index_client.go:79 msg="starting boltdb shipper in RW mode"
level=info ts=2024-01-12T13:22:26.928062665Z caller=table_manager.go:167 msg="handing over indexes to shipper"
level=info ts=2024-01-12T13:22:26.958595704Z caller=worker.go:112 msg="Starting querier worker using query-scheduler and scheduler ring for addresses"
level=info ts=2024-01-12T13:22:26.958965121Z caller=modules.go:761 msg="RulerStorage is nil.  Not starting the ruler."
level=info ts=2024-01-12T13:22:26.959987508Z caller=module_service.go:82 msg=initialising module=server
level=info ts=2024-01-12T13:22:26.960052221Z caller=module_service.go:82 msg=initialising module=memberlist-kv
level=info ts=2024-01-12T13:22:26.960068703Z caller=module_service.go:82 msg=initialising module=query-frontend-tripperware
level=error ts=2024-01-12T13:22:26.96012675Z caller=loki.go:386 msg="module failed" module=memberlist-kv error="invalid service state: Stopping, expected: Running"
level=error ts=2024-01-12T13:22:26.960195678Z caller=loki.go:386 msg="module failed" module=ring error="failed to start ring, because it depends on module memberlist-kv, which has failed: invalid service state: Failed, expected: Running, failure: invalid service state: Stopping, expected: Running"
level=info ts=2024-01-12T13:22:26.960198763Z caller=module_service.go:114 msg="module stopped" module=query-frontend-tripperware
level=error ts=2024-01-12T13:22:26.960210575Z caller=loki.go:386 msg="module failed" module=ingester error="failed to start ingester, because it depends on module memberlist-kv, which has failed: invalid service state: Failed, expected: Running, failure: invalid service state: Stopping, expected: Running"
level=error ts=2024-01-12T13:22:26.960226114Z caller=loki.go:386 msg="module failed" module=usage-report error="failed to start usage-report, because it depends on module memberlist-kv, which has failed: invalid service state: Failed, expected: Running, failure: invalid service state: Stopping, expected: Running"
level=error ts=2024-01-12T13:22:26.960240851Z caller=loki.go:386 msg="module failed" module=query-frontend error="failed to start query-frontend, because it depends on module memberlist-kv, which has failed: invalid service state: Failed, expected: Running, failure: invalid service state: Stopping, expected: Running"
level=error ts=2024-01-12T13:22:26.960250359Z caller=loki.go:386 msg="module failed" module=ingester-querier error="failed to start ingester-querier, because it depends on module memberlist-kv, which has failed: invalid service state: Failed, expected: Running, failure: invalid service state: Stopping, expected: Running"
level=error ts=2024-01-12T13:22:26.960264095Z caller=loki.go:386 msg="module failed" module=store error="failed to start store, because it depends on module memberlist-kv, which has failed: invalid service state: Failed, expected: Running, failure: invalid service state: Stopping, expected: Running"
level=error ts=2024-01-12T13:22:26.960272771Z caller=loki.go:386 msg="module failed" module=querier error="failed to start querier, because it depends on module memberlist-kv, which has failed: invalid service state: Failed, expected: Running, failure: invalid service state: Stopping, expected: Running"
level=error ts=2024-01-12T13:22:26.960285625Z caller=loki.go:386 msg="module failed" module=compactor error="failed to start compactor, because it depends on module ring, which has failed: context canceled"
level=error ts=2024-01-12T13:22:26.960294431Z caller=loki.go:386 msg="module failed" module=distributor error="failed to start distributor, because it depends on module usage-report, which has failed: context canceled"
level=error ts=2024-01-12T13:22:26.960307074Z caller=loki.go:386 msg="module failed" module=query-scheduler error="failed to start query-scheduler, because it depends on module ring, which has failed: context canceled"
level=info ts=2024-01-12T13:22:26.961459917Z caller=modules.go:1090 msg="server stopped"
level=info ts=2024-01-12T13:22:26.961474995Z caller=module_service.go:114 msg="module stopped" module=server
level=info ts=2024-01-12T13:22:26.961483601Z caller=loki.go:375 msg="Loki stopped"
failed services
github.com/grafana/loki/pkg/loki.(*Loki).Run
	/src/loki/pkg/loki/loki.go:421
main.main
	/src/loki/cmd/loki/main.go:105
runtime.main
	/usr/local/go/src/runtime/proc.go:255
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1581
level=error ts=2024-01-12T13:22:26.961518135Z caller=log.go:103 msg="error running loki" err="failed services\ngithub.com/grafana/loki/pkg/loki.(*Loki).Run\n\t/src/loki/pkg/loki/loki.go:421\nmain.main\n\t/src/loki/cmd/loki/main.go:105\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1581"

Try to update your helm values.yml file as next:

loki:
...
  config:
...  
    memberlist:
      bind_addr:
        - ${MY_POD_IP}
...      
  extraArgs:
    config.expand-env: true

  env:
  - name: MY_POD_IP
    valueFrom:
        fieldRef:
          fieldPath: status.podIP
1 Like