I’m running loki with docker compose and get the following error message several times when starting the container:
level=error ts=2026-02-23T08:47:12.056250141Z caller=gennumber_loader.go:136 msg="error loading cache generation numbers" err="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp :9095: connect: connection refused\""
The RPC port is explicitly configured to the default value. But also docker ps is only showing a listening port 3100.
auth_enabled: false
analytics:
reporting_enabled: false
server:
http_listen_port: 3100 # default: 3100
grpc_listen_port: 9095 # default: 9095
grpc_server_max_concurrent_streams: 1000
log_level: warn
common:
instance_addr: 127.0.0.1
path_prefix: /var/log/loki
storage:
filesystem:
chunks_directory: /var/log/loki/chunks
rules_directory: /var/log/loki/rules
replication_factor: 1
ring:
kvstore:
store: inmemory
schema_config:
configs:
- from: 2025-01-01
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
compactor:
working_directory: /var/log/loki/retention
compaction_interval: 10m
retention_enabled: true
retention_delete_delay: 2h
retention_delete_worker_count: 150
delete_request_store: filesystem
query_range:
results_cache:
cache:
embedded_cache:
enabled: true
max_size_mb: 100
limits_config:
metric_aggregation_enabled: true
enable_multi_variant_queries: true
max_query_series: 100000
retention_period: 30d
The docker compose looks like this:
services:
loki:
container_name: grafana-loki
image: grafana/loki:latest
restart: unless-stopped
command: -config.file=/etc/loki/local-config.yaml
networks:
grafana-internal:
ipv4_address: 10.4.0.2
volumes:
- ./loki-conf.yml:/etc/loki/local-config.yaml
- loki-data:/var/log/loki
Am I missing something in the config or is this a bug?
Thanks and many Greetings!
Z