t8y2/dbx · error
unsupported IoTDB connection scheme: %s
Error message
unsupported IoTDB connection scheme: %s
What it means
After parsing, parseConnectionConfig rejects any non-empty scheme that isn't 'iotdb' (case-insensitive), returning 'unsupported IoTDB connection scheme: %s'. jdbc: prefixes are stripped first, but other schemes like mysql: or postgres: are errors.
Source
Thrown at agents/drivers/iotdb/driver.go:120
if config.Port <= 0 {
config.Port = defaultIoTDBPort
}
if config.Username == "" {
config.Username = "root"
}
if config.Password == "" {
config.Password = "root"
}
query := url.Values{}
if raw := strings.TrimSpace(params.ConnectionString); raw != "" {
normalized := strings.TrimPrefix(raw, "jdbc:")
parsed, err := url.Parse(normalized)
if err != nil {
return connectionConfig{}, fmt.Errorf("parse IoTDB connection string: %w", err)
}
if parsed.Scheme != "" && !strings.EqualFold(parsed.Scheme, "iotdb") {
return connectionConfig{}, fmt.Errorf("unsupported IoTDB connection scheme: %s", parsed.Scheme)
}
if parsed.Hostname() != "" {
config.Host = parsed.Hostname()
}
if parsed.Port() != "" {
port, err := strconv.Atoi(parsed.Port())
if err != nil || port <= 0 {
return connectionConfig{}, fmt.Errorf("invalid IoTDB port: %s", parsed.Port())
}
config.Port = port
}
if parsed.User != nil {
if username := parsed.User.Username(); username != "" {
config.Username = username
}
if password, ok := parsed.User.Password(); ok {
config.Password = password
}View on GitHub (pinned to c0390bff16)
Solutions
- Use an 'iotdb://' scheme (or no scheme) in the connection string
- Strip a foreign 'jdbc:<scheme>:' prefix yourself if migrating from another driver
- Double-check you are instantiating the IoTDB driver, not another database's
Example fix
// before connStr = "jdbc:mysql://host:3306/db" // after connStr = "jdbc:iotdb://host:6667"
Defensive patterns
Strategy: validation
Validate before calling
func ensureIoTDBScheme(raw string) error {
s := strings.TrimPrefix(strings.TrimSpace(raw), "jdbc:")
if u, err := url.Parse(s); err == nil && u.Scheme != "" && !strings.EqualFold(u.Scheme, "iotdb") {
return fmt.Errorf("scheme %q is not iotdb", u.Scheme)
}
return nil
} Prevention
- Standardize on iotdb:// scheme in all config templates
- Never paste JDBC URLs from other databases without fixing the scheme
When it happens
Trigger: Passing a connection string with a scheme other than iotdb/empty, e.g. 'jdbc:mysql://host:3306' or 'http://host:6667', into the IoTDB driver config.
Common situations: Copy-pasting a JDBC URL from another database project; leaving a generic http:// prefix; IDE autocompleting a wrong scheme template.
Related errors
- invalid Hive fetchSize %q: expected a positive integer
- %s must be a positive integer
- parse IoTDB connection string: %w
- invalid IoTDB port: %s
- ${name} must be a positive integer
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/2e8044fd36b2b2ee.
Report an issue: GitHub.