Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cassandra err="line 1:13 no viable alternative at input '(' (INSERT INTO [(]...)" #1930

Closed
ninjaslothx opened this issue Apr 12, 2020 · 6 comments
Labels
stale A stale issue or PR that will automatically be closed.

Comments

@ninjaslothx
Copy link

Hey,
I've used the helm loki-stack chart to deploy loki over kubernetes.
I'm using cassandra for both chunk and index storage.
My config in the values.yaml is as follows:

    auth_enabled: false
    ingester:
      chunk_idle_period: 3m
      chunk_block_size: 262144
      chunk_retain_period: 1m
      max_transfer_retries: 0
      lifecycler:
        ring:
          kvstore:
            store: inmemory
          replication_factor: 1
    limits_config:
      enforce_metric_name: false
      reject_old_samples: true
      reject_old_samples_max_age: 168h
    schema_config:
      configs:
      - from: 2018-04-15
        store: cassandra
        object_store: cassandra
        schema: v11
        index:
          prefix: cassandra_table
          period: 168h
    server:
      http_listen_port: 3100
    storage_config:
      cassandra:
        addresses: cassandra-loki
        keyspace: lokiindex
        replication_factor: 3
        consistency: QUORUM
        auth: true
        username: cassandra
        password: <password>
      boltdb:
        directory: /data/loki/index
      filesystem:
        directory: /data/loki/chunks
    chunk_store_config:
      max_look_back_period: 0
    table_manager:
      retention_deletes_enabled: false
      retention_period: 0

Everything is up and running and for all intensive purposes I can ingest and query logs.
However I am noticing the logs are spamming with these errors:

level=error ts=2020-04-12T20:39:55.256628888Z caller=flush.go:178 org_id=fake msg="failed to flush user" err="line 1:13 no viable alternative at input '(' (INSERT INTO  [(]...)"
level=error ts=2020-04-12T20:39:55.256821392Z caller=flush.go:178 org_id=fake msg="failed to flush user" err="line 1:13 no viable alternative at input '(' (INSERT INTO  [(]...)"
level=error ts=2020-04-12T20:39:55.257012937Z caller=flush.go:178 org_id=fake msg="failed to flush user" err="line 1:13 no viable alternative at input '(' (INSERT INTO  [(]...)"
level=error ts=2020-04-12T20:39:55.257157731Z caller=flush.go:178 org_id=fake msg="failed to flush user" err="line 1:13 no viable alternative at input '(' (INSERT INTO  [(]...)"

I am using the default user cassandra, so I wouldn't think this should be any form of permission issue?
They look related to cassandra but I am at a loss for what the issue is.

@cyriltovena
Copy link
Contributor

We might need to run a custom image with more debug log? Have you tried adding debug level already? Could a bad character.

@ninjaslothx
Copy link
Author

Yea interestingly when I run at a debug level these logs do not show up at all. Then resetting the log level to default and they show up again.

@stale
Copy link

stale bot commented May 16, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label May 16, 2020
@yacut
Copy link

yacut commented May 16, 2020

I have the same issue with 1.4.1.

@stale stale bot removed the stale A stale issue or PR that will automatically be closed. label May 16, 2020
@kipsnak
Copy link

kipsnak commented May 27, 2020

I had the same issue, until I found this issue 1769 and 1503.

I set chunks prefix and period, then restarted loki. the error gone and the problem is fixed. Everything works perfectly now.

something like below should fix yours

    schema_config:
      configs:
      - from: 2018-04-15
        store: cassandra
        object_store: cassandra
        schema: v11
        index:
          prefix: cassandra_index_
          period: 168h
        chunks:
          prefix: cassandra_chunk_
          period: 168h

@stale
Copy link

stale bot commented Jun 26, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Jun 26, 2020
@stale stale bot closed this as completed Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale A stale issue or PR that will automatically be closed.
Projects
None yet
Development

No branches or pull requests

4 participants