com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured columnfamily migration_events

DataStax JIRA | Olve S. Hansen | 4 years ago
  1. 0

    I am trying to create a little tool for handling schema-migrations of a cassandra keyspace. I have five scripts, 1. create keyspace user_profile WITH replication = {'class': 'SimpleStrategy' , 'replication_factor': 3}; 2. create table migration_events (id varchar, state varchar, output varchar, PRIMARY KEY (id)) 3. create index migrationStateIdx on migration_events (state) 4. write output/state of script 1-3 to migration_events (if ok) 4. create table user_profile 4.1 write state to migration_events 5. create table user_history 5.1 write state to migration events. On every create table I get this msg: {noformat} ERROR [2013-04-22 09:55:19,374] com.datastax.driver.core.Cluster: Error during schema refresh (peer is not a column defined in this metadata). The schema from Cluster.getMetadata() might appear stale. Asynchronously submitting job to fix. {noformat} in C* log (1.2.4) I see this (for every create table): {noformat} INFO [MigrationStage:1] 2013-04-22 11:55:15,331 ColumnFamilyStore.java (line 631) Enqueuing flush of Memtable-schema_columnfamilies@1624257196(1315/4043 serialized/live bytes, 20 ops) INFO [FlushWriter:23] 2013-04-22 11:55:15,331 Memtable.java (line 453) Writing Memtable-schema_columnfamilies@1624257196(1315/4043 serialized/live bytes, 20 ops) INFO [FlushWriter:23] 2013-04-22 11:55:15,351 Memtable.java (line 487) Completed flushing /var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-ib-83-Data.db (725 bytes) for commitlog position ReplayPosition(segmentId=1366187132442, position=16333535) INFO [MigrationStage:1] 2013-04-22 11:55:15,352 ColumnFamilyStore.java (line 631) Enqueuing flush of Memtable-schema_columns@2013182698(337/1075 serialized/live bytes, 5 ops) INFO [FlushWriter:23] 2013-04-22 11:55:15,353 Memtable.java (line 453) Writing Memtable-schema_columns@2013182698(337/1075 serialized/live bytes, 5 ops) INFO [FlushWriter:23] 2013-04-22 11:55:15,373 Memtable.java (line 487) Completed flushing /var/lib/cassandra/data/system/schema_columns/system-schema_columns-ib-83-Data.db (260 bytes) for commitlog position ReplayPosition(segmentId=1366187132442, position=16333535) {noformat} When debugging and stepping slowly over each create statement, my migration setup works, but when running at "full speed" the tables I create aren't discovered, most likely with this error: {noformat} Exception in thread "main" com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured columnfamily migration_events at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:32) at com.datastax.driver.core.ResultSetFuture.extractCauseFromExecutionException(ResultSetFuture.java:234) at com.datastax.driver.core.ResultSetFuture.getUninterruptibly(ResultSetFuture.java:165) at com.datastax.driver.core.Session.execute(Session.java:106) at com.datastax.driver.core.Session.execute(Session.java:75) at com.vimond.micro.profile.core.CassandraDriverWrapper.createKeyspaceAndTryAgain(CassandraDriverWrapper.java:130) {noformat} Also, when these errors appear my migrations-program (a standalone java program through dropwizard) won't shut down. Clearly the 'Asynchronously submitting job to fix.' has not finished yet. Actually I have never seen it finished. The attached thread dump is from a program waiting for 15 minutes. When I set the prog to sleep after each creation the program exits cleanly.

    DataStax JIRA | 4 years ago | Olve S. Hansen
    com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured columnfamily migration_events
  2. 0

    I am trying to create a little tool for handling schema-migrations of a cassandra keyspace. I have five scripts, 1. create keyspace user_profile WITH replication = {'class': 'SimpleStrategy' , 'replication_factor': 3}; 2. create table migration_events (id varchar, state varchar, output varchar, PRIMARY KEY (id)) 3. create index migrationStateIdx on migration_events (state) 4. write output/state of script 1-3 to migration_events (if ok) 4. create table user_profile 4.1 write state to migration_events 5. create table user_history 5.1 write state to migration events. On every create table I get this msg: {noformat} ERROR [2013-04-22 09:55:19,374] com.datastax.driver.core.Cluster: Error during schema refresh (peer is not a column defined in this metadata). The schema from Cluster.getMetadata() might appear stale. Asynchronously submitting job to fix. {noformat} in C* log (1.2.4) I see this (for every create table): {noformat} INFO [MigrationStage:1] 2013-04-22 11:55:15,331 ColumnFamilyStore.java (line 631) Enqueuing flush of Memtable-schema_columnfamilies@1624257196(1315/4043 serialized/live bytes, 20 ops) INFO [FlushWriter:23] 2013-04-22 11:55:15,331 Memtable.java (line 453) Writing Memtable-schema_columnfamilies@1624257196(1315/4043 serialized/live bytes, 20 ops) INFO [FlushWriter:23] 2013-04-22 11:55:15,351 Memtable.java (line 487) Completed flushing /var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-ib-83-Data.db (725 bytes) for commitlog position ReplayPosition(segmentId=1366187132442, position=16333535) INFO [MigrationStage:1] 2013-04-22 11:55:15,352 ColumnFamilyStore.java (line 631) Enqueuing flush of Memtable-schema_columns@2013182698(337/1075 serialized/live bytes, 5 ops) INFO [FlushWriter:23] 2013-04-22 11:55:15,353 Memtable.java (line 453) Writing Memtable-schema_columns@2013182698(337/1075 serialized/live bytes, 5 ops) INFO [FlushWriter:23] 2013-04-22 11:55:15,373 Memtable.java (line 487) Completed flushing /var/lib/cassandra/data/system/schema_columns/system-schema_columns-ib-83-Data.db (260 bytes) for commitlog position ReplayPosition(segmentId=1366187132442, position=16333535) {noformat} When debugging and stepping slowly over each create statement, my migration setup works, but when running at "full speed" the tables I create aren't discovered, most likely with this error: {noformat} Exception in thread "main" com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured columnfamily migration_events at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:32) at com.datastax.driver.core.ResultSetFuture.extractCauseFromExecutionException(ResultSetFuture.java:234) at com.datastax.driver.core.ResultSetFuture.getUninterruptibly(ResultSetFuture.java:165) at com.datastax.driver.core.Session.execute(Session.java:106) at com.datastax.driver.core.Session.execute(Session.java:75) at com.vimond.micro.profile.core.CassandraDriverWrapper.createKeyspaceAndTryAgain(CassandraDriverWrapper.java:130) {noformat} Also, when these errors appear my migrations-program (a standalone java program through dropwizard) won't shut down. Clearly the 'Asynchronously submitting job to fix.' has not finished yet. Actually I have never seen it finished. The attached thread dump is from a program waiting for 15 minutes. When I set the prog to sleep after each creation the program exits cleanly.

    DataStax JIRA | 4 years ago | Olve S. Hansen
    com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured columnfamily migration_events
  3. 0

    GitHub comment 12#37273045

    GitHub | 3 years ago | pyr
    com.datastax.driver.core.exceptions.InvalidQueryException: LIMIT must be strictly positive
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    PRIMARY KEY part colname cannot be restricted by IN relation

    Stack Overflow | 3 years ago | Easility
    com.datastax.driver.core.exceptions.InvalidQueryException: PRIMARY KEY part colname cannot be restricted by IN relation
  6. 0

    Query fails with "com.datastax.driver.core.exceptions.InvalidQueryException: String didn't validate."

    Stack Overflow | 3 years ago | Lirm
    com.datastax.driver.core.exceptions.InvalidQueryException: String didn't validate.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.datastax.driver.core.exceptions.InvalidQueryException

      unconfigured columnfamily migration_events

      at com.datastax.driver.core.exceptions.InvalidQueryException.copy()
    2. DataStax Java Driver for Apache Cassandra - Core
      Session.execute
      1. com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:32)
      2. com.datastax.driver.core.ResultSetFuture.extractCauseFromExecutionException(ResultSetFuture.java:234)
      3. com.datastax.driver.core.ResultSetFuture.getUninterruptibly(ResultSetFuture.java:165)
      4. com.datastax.driver.core.Session.execute(Session.java:106)
      5. com.datastax.driver.core.Session.execute(Session.java:75)
      5 frames
    3. com.vimond.micro
      CassandraDriverWrapper.createKeyspaceAndTryAgain
      1. com.vimond.micro.profile.core.CassandraDriverWrapper.createKeyspaceAndTryAgain(CassandraDriverWrapper.java:130)
      1 frame