Troubleshooting
Troubleshooting
Section titled “Troubleshooting”This page covers the most common problems users encounter with CQLite. If you do not find your answer here, check the GitHub issues or open a new one.
Installation
Section titled “Installation”command not found: cqlite
Section titled “command not found: cqlite”The binary is not on your PATH.
# Verify the binary existsls -la $(which cqlite 2>/dev/null || echo "NOT FOUND")
# Add the directory to PATH permanently (bash/zsh)echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc # or ~/.zshrcsource ~/.bashrc
# Verifycqlite --versionOn macOS with Homebrew-style installations, the binary might be in
/usr/local/bin or ~/.local/bin. Check both.
Binary not compatible with my OS/architecture
Section titled “Binary not compatible with my OS/architecture”Download the correct asset for your platform from the releases page:
- macOS Apple Silicon:
cqlite-aarch64-apple-darwin.tar.gz - macOS Intel:
cqlite-x86_64-apple-darwin.tar.gz - Linux x86_64 (any distro): use the
muslvariant for maximum compatibility - Linux ARM64:
cqlite-aarch64-unknown-linux-gnu.tar.gz
See Installation for the full platform table.
Missing shared libraries on Linux
Section titled “Missing shared libraries on Linux”./cqlite: error while loading shared libraries: libssl.so.1.1: cannot open shared object fileUse the musl (static) build, which has no shared library dependencies:
TARGET=x86_64-unknown-linux-muslcurl -fsSLO https://github.com/pmcfadin/cqlite/releases/latest/download/cqlite-$TARGET.tar.gztar xzf cqlite-$TARGET.tar.gz./cqlite --versionTest data
Section titled “Test data”Query tests return 0 rows
Section titled “Query tests return 0 rows”The test datasets contain only the JSONL reference files by default.
The actual SSTable binary files (.db) must be fetched separately:
export CQLITE_DATASETS_ROOT=$PWD/test-data/datasetsbash test-data/scripts/fetch-datasets.shAfter fetching, retry your query. You should see results.
Missing test data environment variable
Section titled “Missing test data environment variable”Many integration tests look for CQLITE_DATASETS_ROOT. Set it before running:
export CQLITE_DATASETS_ROOT=$PWD/test-data/datasetscargo test --package cqlite-coreQuery returns no rows on your own SSTable data
Section titled “Query returns no rows on your own SSTable data”-
Wrong
--data-dirpath:--data-dirshould point to the directory that contains the keyspace subdirectories, not to a single SSTable directory.Terminal window # Correct: the parent directorycqlite --data-dir /var/lib/cassandra/data ...# Incorrect: the table-specific directorycqlite --data-dir /var/lib/cassandra/data/my_ks/my_table-abc123 ... -
Schema mismatch: ensure the keyspace and table names in the schema file exactly match the directory names on disk.
-
Unsupported format: CQLite only supports Cassandra 5.0
nb-*-big-*files. Check that your SSTable directory contains files namednb-1-big-Data.db(notmc-*,md-*, orla-*).
Unsupported SSTable format
Section titled “Unsupported SSTable format”CQLite reads Cassandra 5.0 BIG format SSTables only. Files from Cassandra 3.x
(mc-*, la-*) and 4.x (md-*) are not supported. Upgrade your cluster to
Cassandra 5.0 and run nodetool upgradesstables to convert, or use
Cassandra’s sstabledump tool to export to JSON first.
See Limitations for the full format-support matrix.
Parsing issues or garbled values
Section titled “Parsing issues or garbled values”Check docs/sstables-definitive-guide/chapters/appendix-f-known-limitations.md
for known parsing gaps. Some edge cases (for example, very wide partitions with
10 000+ rows, or BTI-format index files) may not produce correct results.
Enable debug logging to get more detail:
RUST_LOG=debug cqlite \ --schema my.cql \ --data-dir /path/to/data \ --query "SELECT * FROM ks.tbl LIMIT 5"--out vs --format precedence
Section titled “--out vs --format precedence”--out takes precedence over --format when both are provided. Use --out for
reliable behavior. You can also set a default via the environment variable:
export CQLITE_OUT=jsonPython bindings
Section titled “Python bindings”Python import errors after install
Section titled “Python import errors after install”python3 --version # Must be 3.9+pip install --upgrade cqlite-pyIf the binary wheel is missing for your platform, build from source:
pip install maturinrustup update # Requires Rust 1.85+cd bindings/python && maturin developPython tests skip or fail
Section titled “Python tests skip or fail”Ensure the dataset is available:
export CQLITE_DATASETS_ROOT=$PWD/test-data/datasetsbash test-data/scripts/fetch-datasets.shpytest bindings/python/tests -vConcurrent query race condition
Section titled “Concurrent query race condition”A known issue: concurrent queries on the same Database handle may race on
schema metadata access. Work around it by running a warm-up query before spawning
parallel threads:
# Warm up — triggers schema metadata loadlist(db.execute('SELECT * FROM ks.tbl LIMIT 1'))
# Now safe to use from multiple threadsNode.js bindings
Section titled “Node.js bindings”Native module fails to load
Section titled “Native module fails to load”Check that you are on a supported platform (Linux x86_64/arm64, macOS
x86_64/arm64, Windows x86_64). If you are on a supported platform and still see
an error like Error: Cannot find module './cqlite.node', try rebuilding:
cd bindings/nodenpm run buildnpm testTypeScript types not found
Section titled “TypeScript types not found”The types are in lib/index.d.ts. Ensure "types": "lib/index.d.ts" is
referenced in your tsconfig.json or that @cqlite/node resolves correctly.
The package ships with complete TypeScript definitions — no @types/ package is
needed.
Clippy and CI failures
Section titled “Clippy and CI failures”Run Clippy in CI mode to catch issues early:
env RUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets --all-featuresCommon error quick reference
Section titled “Common error quick reference”| Symptom | Likely cause | Quick fix |
|---|---|---|
command not found: cqlite | Binary not on PATH | Add install dir to PATH |
| Query returns 0 rows | Missing test data | Run fetch-datasets.sh |
Unsupported SSTable format | Not Cassandra 5.0 format | Upgrade cluster, convert SSTables |
IO error opening file | Wrong --data-dir path | Check path points to data root |
Python ImportError | Old Python or missing wheel | Upgrade Python, rebuild bindings |
SCHEMA error | Keyspace/table name mismatch | Check schema file vs directory names |
PARSE error | Parsing limitation or corrupt file | Check limitations page; report bug |
For anything not listed here, open an issue at https://github.com/pmcfadin/cqlite/issues with the output of:
cqlite --versionRUST_LOG=debug cqlite --schema <your.cql> --data-dir <dir> --query "<query>" 2>&1 | head -50