t8y2/dbx · error

invalid Cassandra secureconnectbundle: %w

Error message

invalid Cassandra secureconnectbundle: %w

What it means

finalize() validates the Cassandra agent config; this error wraps a failure from normalizeLocalFilePath(config.secureConnectBundle). It means the secure-connect-bundle path (used for DataStax Astra / secured clusters) could not be resolved as a readable local file.

Source

Thrown at agents/drivers/cassandra-go/config.go:436

	}
	if err := applyRetryPolicies(cluster, config); err != nil {
		return nil, err
	}
	if err := applyLoadBalancingPolicy(cluster, config); err != nil {
		return nil, err
	}
	return cluster, nil
}

func (config *cassandraConfig) finalize() error {
	var err error
	config.configFile, err = normalizeLocalFilePath(config.configFile)
	if err != nil {
		return fmt.Errorf("invalid Cassandra configfile: %w", err)
	}
	config.secureConnectBundle, err = normalizeLocalFilePath(config.secureConnectBundle)
	if err != nil {
		return fmt.Errorf("invalid Cassandra secureconnectbundle: %w", err)
	}
	if config.secureConnectBundle != "" && config.kerberos.enabled {
		return fmt.Errorf("Cassandra secure connect bundles cannot be combined with Kerberos authentication")
	}
	if config.secureConnectBundle != "" && (config.username == "" || config.password == "") {
		return fmt.Errorf("Cassandra secure connect bundles require username and password credentials")
	}
	if config.kerberos.enabled {
		if err := config.kerberos.finalize(config.username, config.password); err != nil {
			return err
		}
	}
	return nil
}

func splitHosts(raw string) []string {
	raw = strings.ReplaceAll(raw, "--", ",")
	parts := strings.FieldsFunc(raw, func(char rune) bool { return char == ',' || char == ';' })

View on GitHub (pinned to c0390bff16)

Solutions

  1. Check the secureConnectBundle path exists and is readable (ls -l <path>)
  2. Use an absolute path to the .zip bundle
  3. Re-download the secure connect bundle from your Astra/cloud account if it is missing
  4. Read the wrapped cause in the error to identify the precise path failure

Example fix

// before
config.secureConnectBundle = "bundle.zip"
// after
config.secureConnectBundle = "/etc/instana/cassandra/secure-connect-db.zip"
Defensive patterns

Strategy: validation

Validate before calling

func validateSecureBundle(path string) error {
	if path == "" {
		return nil
	}
	if _, err := os.Stat(path); err != nil {
		return fmt.Errorf("secureConnectBundle not accessible: %w", err)
	}
	return nil
}

Try / catch

if err := parseCassandraConfig(cfg); err != nil {
	if strings.Contains(err.Error(), "secureconnectbundle") {
		log.Fatalf("secure connect bundle path invalid: %v", err)
	}
	return err
}

Prevention

When it happens

Trigger: Configuring a secureConnectBundle path that normalizeLocalFilePath rejects: nonexistent file, unreadable location, or invalid path syntax, when parseCassandraConfig calls finalize().

Common situations: Downloading an Astra secure connect bundle but pointing at the wrong filename, not mounting the bundle into a container, or stale bundles deleted during deploys.

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/ab1cfc9b075abe3b. Report an issue: GitHub.