Troubleshooting
This page is symptom-first. Search it for the error message you got, then follow the numbered steps under it.
For the opposite view, categories of failure with a recovery playbook for each, see Failure modes.
Compile errors
Section titled “Compile errors”“unknown dependency ‘X’ referenced by ‘Y’”
Section titled ““unknown dependency ‘X’ referenced by ‘Y’””Model Y lists X in its depends_on, but the project has no model named X.
Likely causes
- A typo in
depends_on. The message adds “did you mean ‘Z’?” when a model name is close. - The model file for
Xis missing or misnamed. - The
namefield in the.tomlsidecar does not match the file name. Xis a source table, not a model.
Fix
- Check the spelling against the suggestion in the message.
- Check that the model file exists under
models/and that itsnamefield matches. - Remove the entry when
Xis a source table. Rocky reads a source table from the SQL; it needs nodepends_on.
“join key type mismatch on column ‘X’”
Section titled ““join key type mismatch on column ‘X’””Two upstream models in a join share a column name but not its type, and the types have no common type (E001).
Fix
- Read the diagnostic. It names both models and both types.
- Add an explicit
CAST()on one side of the join, or change the upstream model to produce the expected type. - If the change is intentional schema evolution, run
rocky ai-syncto propagate it downstream.
“Contract violation”
Section titled ““Contract violation””A model’s output does not satisfy its data contract (E010–E014). For example: column 'X' type mismatch: contract expects ….
Fix
- Open the model’s
.contract.tomlfile and read the required columns and types. - Choose one side to change. Either update the model to produce the required schema, or update the contract.
LSP and IDE problems
Section titled “LSP and IDE problems”The language server does not start
Section titled “The language server does not start”The VS Code extension cannot connect to rocky lsp.
Likely causes
- The Rocky binary is not installed, or it is not on
PATH. - The
rocky.server.pathVS Code setting points somewhere wrong. - The binary is built for another platform, such as a Linux binary on macOS.
Fix
-
Confirm the binary runs at all:
Terminal window rocky --version -
Check which path VS Code is using, under Settings → Rocky → Server Path.
-
Point that setting at the binary you just ran, or put the binary on
PATH.
No diagnostics or hover information
Section titled “No diagnostics or hover information”The language server connects but shows no types and no errors.
Likely causes
- The workspace root has no
models/directory. - The models have syntax errors that stop compilation.
Fix
- Confirm your workspace root contains a
models/directory. - Open the Rocky output channel in VS Code, under View → Output → Rocky Language Server.
- Fix the errors it reports there.
AI command problems
Section titled “AI command problems”“ANTHROPIC_API_KEY not set”
Section titled ““ANTHROPIC_API_KEY not set””The AI commands need an Anthropic API key in the environment.
Fix
-
Export the key:
Terminal window export ANTHROPIC_API_KEY=sk-ant-... -
Add the same line to your shell profile (
~/.zshrc,~/.bashrc) so it survives a new shell.
The generated model is wrong
Section titled “The generated model is wrong”The compile-verify loop retries up to 3 times, and it can still land on wrong SQL.
Fix
- Rewrite the intent to be more specific. Name the grain, which is what one row of the model represents.
- Name the key columns and where they come from.
- State the filter conditions.
- State the aggregation logic.
“Compilation failed after 3 attempts”
Section titled ““Compilation failed after 3 attempts””The AI could not produce valid code inside the retry budget.
Fix
- Split the intent into smaller models. One model per idea.
- Wire the pieces together with explicit upstream dependencies.
Connection errors
Section titled “Connection errors”Databricks: “401 Unauthorized”
Section titled “Databricks: “401 Unauthorized””Likely causes
- The Personal Access Token expired.
- The OAuth M2M credentials are wrong.
- The token has no access to the warehouse you named.
Fix
- Regenerate the token in your Databricks workspace settings.
- For OAuth M2M, check the
client_idandclient_secretvalues in the adapter block, and the environment variables they read.
Databricks: “Statement execution timeout”
Section titled “Databricks: “Statement execution timeout””A query ran longer than the configured timeout.
Fix
-
Raise the timeout on the Databricks adapter:
[adapter.prod]type = "databricks"timeout_secs = 600 # 10 minutes -
For a large full-refresh sync, switch the model to an incremental strategy instead of raising the timeout further.
Fivetran: “403 Forbidden”
Section titled “Fivetran: “403 Forbidden””Fix
- Check the
api_keyandapi_secretvalues in the Fivetran adapter block, and the environment variables they read. - Confirm the API key has access to the
destination_idyou configured.
State store problems
Section titled “State store problems”The state store is the embedded redb database where Rocky keeps run records, watermarks, and plans.
“State file locked”
Section titled ““State file locked””Another Rocky process holds the state file lock.
Fix
-
Look for a running Rocky process:
Terminal window ps aux | grep rocky -
If one is running, wait for it or stop it. Two Rocky runs cannot hold the lock at the same time.
-
If none is running, the lock is stale. Remove it:
Terminal window rm -f models/.rocky-state.redb.lock
The state store lives at models/.rocky-state.redb by default. Run rocky doctor to confirm the path. A project on the legacy current-directory state file has .rocky-state.redb.lock in the working directory instead.
“State file corrupted”
Section titled ““State file corrupted””The embedded redb state file is damaged.
Fix
-
Delete the state file and re-run. This resets every watermark, so the next run is a full refresh:
Terminal window rm models/.rocky-state.redb # legacy projects: rm .rocky-state.redb in the current directoryplan_id=$(rocky plan --filter client=acme --output json | jq -r .plan_id)rocky apply "$plan_id"
Build problems
Section titled “Build problems”Building from source runs out of memory
Section titled “Building from source runs out of memory”DuckDB’s C++ compilation needs a lot of memory to build Rocky from source.
Fix
-
Install a pre-built binary instead of building from source. This is the fastest fix.
-
If you must build, close other applications first.
-
If that is not enough, add a swap file for the build:
Terminal window # Create a 4GB swap filesudo fallocate -l 4G /tmp/rocky-swapsudo chmod 600 /tmp/rocky-swapsudo mkswap /tmp/rocky-swapsudo swapon /tmp/rocky-swap# Buildcargo build --release# Clean upsudo swapoff /tmp/rocky-swapsudo rm /tmp/rocky-swap