After update loki from 2.3 to 2.5 get error failed to flush user" err="unconfigured table cassandra_table19318"

29 views
Skip to first unread message

Антон Пацев

unread,
Feb 25, 2023, 12:10:56 AM2/25/23
to lokiproject
Hello! Thanks for loki!
After update loki from 2.3 to 2.5 get error failed to flush user" err="unconfigured table cassandra_table19318"

Docker-compose before update
```
version: '3.8'

services:
  redis:
    container_name: redis
    image: redis:7.0.5-alpine
    restart: always
    environment:
      ALLOW_EMPTY_PASSWORD: "yes"
    healthcheck:
      test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
      interval: 5s
      timeout: 5s
      retries: 10
    command:
      - 'redis-server'
      - '--databases 1'
      - '--save 900 1'
      - '--save 300 10'
      - '--save 60 10000'
      - '--maxmemory 1gb'
      - '--maxmemory-policy allkeys-lru'
    volumes:
      - redis_data:/data
    ports:
      - "6379:6379"
    networks:
      loki:
        aliases:
          - redis

  loki:
    image: grafana/loki:2.3.0
    container_name: loki
    depends_on:
      redis:
        condition: service_healthy
      cassandra:
        condition: service_healthy
    volumes:
      - /etc/docker-compose/local-config.yaml:/etc/loki/local-config.yaml
      - loki:/loki
    ports:
      - "3100:3100"
    restart: always
    command: -config.file=/etc/loki/local-config.yaml
    networks:
      loki:
        aliases:
          - loki

  cassandra:
    image: bitnami/cassandra:3.11.11
    container_name: cassandra
    volumes:
      - cassandra:/bitnami
    restart: always
    healthcheck:
      test: [ "CMD", "cqlsh", "-u", "cassandra", "-p", "cassandra", "-e", "SELECT table_name FROM system_schema.tables WHERE keyspace_name='loki';" ]
      interval: 5s
      timeout: 5s
      retries: 10
    environment:
      CASSANDRA_USER: cassandra
      CASSANDRA_PASSWORD: cassandra
      CASSANDRA_CLUSTER_NAME: loki
      CASSANDRA_DATACENTER: dc1
    networks:
      loki:
        aliases:
          - cassandra

volumes:
  cassandra:
  loki:
  redis_data:

networks:
  loki:
    driver: bridge
```

local-config.yaml before update
```
auth_enabled: false

server:
  http_listen_port: 3100
  http_server_read_timeout: 150m
  http_server_write_timeout: 150m
  log_level: info

ingester:
  lifecycler:
    address: 127.0.0.1
    ring:
      kvstore:
        store: inmemory
      replication_factor: 1
    final_sleep: 0s
  chunk_idle_period: 1h
  max_chunk_age: 1h
  chunk_target_size: 1048576
  chunk_retain_period: 20m

schema_config:
  configs:
    - from: 2021-08-19
      store: cassandra
      object_store: filesystem
      schema: v11
      index:
        prefix: cassandra_table
        period: 24h

storage_config:
  cassandra:
    username: cassandra
    password: cassandra
    addresses: cassandra
    consistency: ONE
    auth: true
    keyspace: loki
  filesystem:
    directory: /loki/chunks
  index_queries_cache_config:
    redis:
      endpoint: redis:6379
      expiration: 1h

limits_config:
  enforce_metric_name: false
  reject_old_samples: true
  reject_old_samples_max_age: 168h
  ingestion_rate_mb: 500
  ingestion_burst_size_mb: 500
  max_streams_per_user: 500000
  max_concurrent_tail_requests: 20
  max_query_series: 100000
  max_query_parallelism: 64

chunk_store_config:
  max_look_back_period: 720h
  cache_lookups_older_than: 24h

table_manager:
  retention_deletes_enabled: true
  retention_period: 720h

query_range:
  align_queries_with_step: true
  max_retries: 5
  split_queries_by_interval: 24h
  cache_results: true
  parallelise_shardable_queries: true
  results_cache:
    cache:
      redis:
        endpoint: redis:6379
        expiration: 48h
        db: 0

frontend:
  log_queries_longer_than: 5s
  downstream_url: http://0.0.0.0:3100
  compress_responses: true

querier:
  engine:
    timeout: 150m
    max_look_back_period: 150m
  query_ingesters_within: 3h
  max_concurrent: 25
  query_timeout: 150m
  extra_query_delay: 30s
```

Docker-compose after update to loki 2.5
```
version: "3"

services:
  redis:
    container_name: redis
    image: redis:7.0.5-alpine
    restart: always
    environment:
      ALLOW_EMPTY_PASSWORD: "yes"
    healthcheck:
      test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
      interval: 5s
      timeout: 5s
      retries: 10
    command:
      - 'redis-server'
      - '--databases 1'
      - '--save 900 1'
      - '--save 300 10'
      - '--save 60 10000'
      - '--maxmemory 1gb'
      - '--maxmemory-policy allkeys-lru'
    volumes:
      - redis_data:/data
    ports:
      - "6379:6379"
    networks:
      loki:
        aliases:
          - redis

  loki:
    image: grafana/loki:2.5.0
    container_name: loki
    depends_on:
      redis:
        condition: service_healthy
      cassandra:
        condition: service_healthy
    volumes:
      - /etc/docker-compose/local-config.yaml:/etc/loki/local-config.yaml
      - loki:/loki
    ports:
      - "3100:3100"
    restart: always
    command: -config.file=/etc/loki/local-config.yaml -target=all,table-manager
    networks:
      loki:
        aliases:
          - loki

  cassandra:
    image: bitnami/cassandra:3.11.11
    container_name: cassandra
    volumes:
      - cassandra:/bitnami
    restart: always
    healthcheck:
      test: [ "CMD", "cqlsh", "-u", "cassandra", "-p", "cassandra", "-e", "SELECT table_name FROM system_schema.tables WHERE keyspace_name='loki';" ]
      interval: 5s
      timeout: 5s
      retries: 10
    environment:
      CASSANDRA_USER: cassandra
      CASSANDRA_PASSWORD: cassandra
      CASSANDRA_CLUSTER_NAME: loki
      CASSANDRA_DATACENTER: dc1
    networks:
      loki:
        aliases:
          - cassandra

volumes:
  cassandra:
  loki:
  redis_data:

networks:
  loki:
    driver: bridge
```

local-config.yaml after update to loki 2.5
```
target: all,table-manager
auth_enabled: false

server:
  http_listen_port: 3100
  http_server_read_timeout: 150m
  http_server_write_timeout: 150m
  log_level: info
  grpc_listen_port: 9096

common:
  path_prefix: /loki
  storage:
    filesystem:
      chunks_directory: /loki/chunks
      rules_directory: /loki/rules
  replication_factor: 1
  ring:
    instance_addr: 127.0.0.1
    kvstore:
      store: inmemory

schema_config:
  configs:
    - from: 2021-08-19
      store: cassandra
      object_store: filesystem
      schema: v11
      index:
        prefix: cassandra_table
        period: 24h

storage_config:
  cassandra:
    username: cassandra
    password: cassandra
    addresses: cassandra
    consistency: ONE
    auth: true
    keyspace: loki
  filesystem:
    directory: /loki/chunks
  index_queries_cache_config:
    redis:
      endpoint: redis:6379
      expiration: 1h

limits_config:
  reject_old_samples: true
  reject_old_samples_max_age: 168h
  ingestion_rate_mb: 500
  ingestion_burst_size_mb: 500
  max_streams_per_user: 500000
  max_cache_freshness_per_query: '10m'
  split_queries_by_interval: 24h
  max_concurrent_tail_requests: 20
  max_query_series: 100000
  max_query_parallelism: 64

chunk_store_config:
  max_look_back_period: 720h
  cache_lookups_older_than: 24h

table_manager:
  retention_deletes_enabled: true
  retention_period: 720h

query_range:
  align_queries_with_step: true
  max_retries: 5
  cache_results: true
  parallelise_shardable_queries: true
  results_cache:
    cache:
      redis:
        endpoint: redis:6379
        expiration: 48h
        db: 0

frontend:
  log_queries_longer_than: 5s
  compress_responses: true

querier:
  engine:
    timeout: 150m
    max_look_back_period: 150m
  query_ingesters_within: 3h
  max_concurrent: 25
  query_timeout: 150m
  extra_query_delay: 30s

ingester_client:
  remote_timeout: 30s
```

After update to lokki 2.5 get error
```
loki         | level=error ts=2023-02-25T05:09:58.272171678Z caller=flush.go:222 org_id=fake msg="failed to flush user" err="unconfigured table cassandra_table19318"
loki         | level=error ts=2023-02-25T05:09:58.272194461Z caller=flush.go:222 org_id=fake msg="failed to flush user" err="unconfigured table cassandra_table19318"
loki         | level=error ts=2023-02-25T05:09:58.285802026Z caller=flush.go:222 org_id=fake msg="failed to flush user" err="unconfigured table cassandra_table19318"
loki         | level=error ts=2023-02-25T05:09:58.285830737Z caller=flush.go:222 org_id=fake msg="failed to flush user" err="unconfigured table cassandra_table19318"
loki         | level=error ts=2023-02-25T05:09:58.285815434Z caller=flush.go:222 org_id=fake msg="failed to flush user" err="unconfigured table cassandra_table19318"
loki         | level=error ts=2023-02-25T05:09:58.293195889Z caller=flush.go:222 org_id=fake msg="failed to flush user" err="unconfigured table cassandra_table19318"
loki         | level=error ts=2023-02-25T05:09:58.300061425Z caller=flush.go:222 org_id=fake msg="failed to flush user" err="unconfigured table cassandra_table19318"
loki         | level=error ts=2023-02-25T05:09:58.306696911Z caller=flush.go:222 org_id=fake msg="failed to flush user" err="unconfigured table cassandra_table19318"
```
How fix this error?
Reply all
Reply to author
Forward
0 new messages