{"record":{"id":"cf9c410db2957480","repo":"openzipkin/zipkin","slug":"node-had-no-version-s","errorCode":null,"errorMessage":"node had no version: %s","messagePattern":"node had no version: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"zipkin-storage/cassandra/src/main/java/zipkin2/storage/cassandra/Schema.java","lineNumber":138,"sourceCode":"    }\n  }\n\n  static KeyspaceMetadata ensureKeyspaceMetadata(CqlSession session, String keyspace) {\n    KeyspaceMetadata keyspaceMetadata = session.getMetadata().getKeyspace(keyspace).orElse(null);\n    if (keyspaceMetadata == null) {\n      throw new IllegalStateException(\n        \n          \"Cannot read keyspace metadata for keyspace: %s and cluster: %s\".formatted(\n          keyspace, session.getMetadata().getClusterName()));\n    }\n    return keyspaceMetadata;\n  }\n\n  static Version ensureVersion(com.datastax.oss.driver.api.core.metadata.Metadata metadata) {\n    Version version = null;\n    for (Map.Entry<UUID, Node> entry : metadata.getNodes().entrySet()) {\n      version = entry.getValue().getCassandraVersion();\n      if (version == null) throw new RuntimeException(\"node had no version: \" + entry.getValue());\n      if (Version.parse(\"3.11.3\").compareTo(version) > 0) {\n        throw new RuntimeException(\n          \"Node %s is running Cassandra %s, but minimum version is 3.11.3\".formatted(\n          entry.getKey(), entry.getValue().getCassandraVersion()));\n      }\n    }\n    if (version == null) throw new RuntimeException(\"No nodes in the cluster\");\n    LOG.info(\"Detected Cassandra version {}\", version);\n    return version;\n  }\n\n  static void ensureExists(CqlSession session, String keyspace, boolean searchEnabled) {\n    KeyspaceMetadata result = session.getMetadata().getKeyspace(keyspace).orElse(null);\n    Version version = ensureVersion(session.getMetadata());\n    if (result == null || result.getTable(Schema.TABLE_SPAN).isEmpty()) {\n      LOG.info(\"Installing schema {} for keyspace {}\", SCHEMA_RESOURCE, keyspace);\n      applyCqlFile(version, keyspace, session, SCHEMA_RESOURCE);\n      if (searchEnabled) {","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/openzipkin/zipkin/blob/878ce2a1fad54ca941d17fdcf2e1d924b148eb1f/zipkin-storage/cassandra/src/main/java/zipkin2/storage/cassandra/Schema.java#L120-L156","documentation":"ensureVersion throws RuntimeException('node had no version: %s') when a node in cluster metadata reports a null Cassandra version. The driver could not determine the server version for that node, which makes Zipkin's version-dependent schema logic (e.g. reviseCQL for Cassandra 4) impossible to apply safely.","triggerScenarios":"Schema ensure/validate iterating cluster nodes where getCassandraVersion() returns null — common right after a node joins or during metadata refresh, or with proxies/mediators that do not advertise a Cassandra version.","commonSituations":"Connecting through a driver-incompatible intermediary; a node still initializing; driver metadata not yet refreshed; very old or forked Cassandra-compatible servers.","solutions":["Retry after cluster metadata settles (nodes finish joining and report versions).","Upgrade the Cassandra driver / server combination to a supported pair (Cassandra >= 3.11.3).","If a proxy sits in front of Cassandra, bypass it for Zipkin's connections."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"boolean allVersioned = session.getMetadata().getNodes().values().stream().allMatch(n -> n.getCassandraVersion() != null);\nif (!allVersioned) throw new IllegalStateException(\"Cluster metadata incomplete; retry after nodes settle\");","typeGuard":null,"tryCatchPattern":"catch (RuntimeException e) { if (e.getMessage() != null && e.getMessage().startsWith(\"node had no version\")) retryWithBackoff(); else throw e; }","preventionTips":["Delay Zipkin startup until cluster nodes report versions (post-join settle).","Avoid TCP proxies between Zipkin and Cassandra that strip version metadata."],"tags":["cassandra","zipkin","version","cluster-metadata","driver"],"backgroundTag":null,"analyzedSha":"878ce2a1fad54ca941d17fdcf2e1d924b148eb1f","analyzedAt":"2026-08-14T15:17:09.895Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}