java.lang.IllegalArgumentException: id is not a column defined in this metadata

DataStax JIRA | Mikhail Mazursky | 3 years ago
  1. 0

    Produced an interesting case where the control connection cannot reestablish a Host that is the same host used for the control connection. The reason why it cannot be established is because ControlConnection#fetchNodeInfo makes the following query if the passed in Host is the same host used for the control connection: {code} SELECT * FROM system.local WHERE key='local' {code} The problem is that ControlConnection#refreshNodeInfo null checks the 'rpc_address' column of the returned row to determine if the node is an availble peer. The system.local table does not return the RPC address so this throws an IllegalArgumentException (added some extra comments in to demonstrate rpc_address is missing and that the control connection used the given host): {noformat} 26103 [Reconnection-1] DEBUG com.datastax.driver.core.Connection - Connection[/127.0.0.1:9042-69, inFlight=0, closed=false] Transport initialized and ready 26103 [Reconnection-1] DEBUG com.datastax.driver.core.Connection - Connection[/127.0.0.1:9042-69, inFlight=0, closed=true] closing connection 26103 [Reconnection-1] DEBUG com.datastax.driver.core.ControlConnection - [Control connection] Refreshing node info on /127.0.0.1:9042 26103 [Reconnection-1] WARN com.datastax.driver.core.ControlConnection - Host /127.0.0.1 is connected?: true, listenAddress null . 26109 [Reconnection-1] ERROR com.datastax.driver.core.ColumnDefinitions - Available indexes: {truncated_at=[I@3d748237, bootstrapped=[I@123e7724, gossip_generation=[I@42ffe5d7, partitioner=[I@2e4aa89e, rack=[I@278434d0, schema_version=[I@58a757f4, thrift_version=[I@3118604c, cluster_name=[I@375a36c2, host_id=[I@3c116f2, cql_version=[I@79c96bca, tokens=[I@16c3d93d, data_center=[I@3993e97f, key=[I@1dc6ae61, release_version=[I@5ee2718c, native_protocol_version=[I@648ccefe} 26109 [Reconnection-1] ERROR com.datastax.driver.core.Cluster - Unknown error during reconnection to /127.0.0.1:9042, scheduling retry in 8000 milliseconds java.lang.IllegalArgumentException: rpc_address is not a column defined in this metadata at com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:278) at com.datastax.driver.core.ColumnDefinitions.getFirstIdx(ColumnDefinitions.java:285) at com.datastax.driver.core.ArrayBackedRow.getInet(ArrayBackedRow.java:239) at com.datastax.driver.core.ControlConnection.refreshNodeInfo(ControlConnection.java:447) at com.datastax.driver.core.Cluster$Manager$5.onReconnection(Cluster.java:1595) at com.datastax.driver.core.AbstractReconnectionHandler.run(AbstractReconnectionHandler.java:124) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {noformat} I reproduced this by running a single node cassandra cluster running on a local interface. I executed a stress scenario and then used [tcpkill|http://linux.die.net/man/8/tcpkill] to reset connections on port 9042 and then terminated tcpkill shortly after to allow connections to reestablish: {code} sudo /usr/local/sbin/tcpkill -i lo0 port 9042 {code}

    DataStax JIRA | 2 years ago | Andy Tolbert
    java.lang.IllegalArgumentException: rpc_address is not a column defined in this metadata
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Using 2 nodes on a cluster, I get several times the following logs ; {code} 5857 [Cassandra Java Driver worker-7] WARN com.datastax.driver.core.ControlConnection - Cannot find Cassandra version for host 192.168.xx.yy:9042 to parse the schema, using 2.0.0 based on protocol version in use. If parsing the schema fails, this could be the cause (...) 8188 [Cassandra Java Driver worker-5] ERROR com.datastax.driver.core.TableMetadata - Error parsing schema options for table ks.table: Cluster.getMetadata().getKeyspace("ks").getTable("table").getOptions() will return null java.lang.IllegalArgumentException: replicate_on_write is not a column defined in this metadata at com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:273) at com.datastax.driver.core.ColumnDefinitions.getFirstIdx(ColumnDefinitions.java:279) at com.datastax.driver.core.ArrayBackedRow.getIndexOf(ArrayBackedRow.java:69) at com.datastax.driver.core.AbstractGettableData.isNull(AbstractGettableData.java:125) at com.datastax.driver.core.TableMetadata$Options.<init>(TableMetadata.java:530) at com.datastax.driver.core.TableMetadata.build(TableMetadata.java:119) at com.datastax.driver.core.Metadata.buildTableMetadata(Metadata.java:164) at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:108) at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:305) at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:251) at com.datastax.driver.core.Cluster$Manager$8.runMayThrow(Cluster.java:1659) {code} By reading the code, it appears to me that because we have no C* version provided, it breaks with <'replicate_on_write' not found> (the driver sets "2.0.0" as default version). In class 'ControlConnection' at line 273, it sets the version "2.0.0" as the unknown version and in class 'TableMetadata' at line 530, it tries to get the column through the 'isNull' method because the version is 2.0.0 and not 2.1.0-rc1. I called {{./nodetool version}} on both nodes and they return : {{ReleaseVersion: 2.1.0-rc1}}

    DataStax JIRA | 2 years ago | Fabrice Larcher
    java.lang.IllegalArgumentException: replicate_on_write is not a column defined in this metadata
  4. 0

    Cassandra Client Java API's - populate_io_cache_on_flush is not a column defined in this metadata

    Stack Overflow | 1 year ago | Alessandro Scaperrotta
    java.lang.IllegalArgumentException: populate_io_cache_on_flush is not a column defined in this metadata

    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. java.lang.IllegalArgumentException

      id is not a column defined in this metadata

      at com.datastax.driver.core.ColumnDefinitions.getAllIdx()
    2. DataStax Java Driver for Apache Cassandra - Core
      BoundStatement.setList
      1. com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:273)
      2. com.datastax.driver.core.BoundStatement.setList(BoundStatement.java:840)
      2 frames