Troubleshooting
Ghostrow error messages and notices, what each exit code means, and how offline use, the grace period and the Free fallback behave.
Errors print to stderr as ghostrow: <message>, with a second indented line that says what to do. The exit code tells scripts which kind of problem it was. Notices that are not errors start with note:, and --quiet hides them. For a stack trace on an unexpected error, set GHOSTROW_DEBUG=1.
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Invalid input or configuration, or an unexpected error |
2 | A constraint could not be satisfied |
3 | haunt --tests found tests that fail only with edge-case data |
4 | License problem: not activated, limit reached, or an activation that has lapsed |
Input and configuration (exit code 1)
| Message | What to do |
|---|---|
Point Ghostrow at a database with --db <url>, or at a schema file or folder with --schema <path>. | Pass one of them |
Use --db or --schema, not both. | Pick one |
Say where the rows go: --out <dir> to write files, or --db <url> to insert into a database. | Add --out, --db or --dry-run |
Unrecognised database URL "...". Use postgres://, mysql://, mssql:// or sqlite:<file>. | Fix the URL scheme. See Databases |
Could not connect to postgres://user:****@host/db: <reason> | Check the host, port and password. The reason comes from the driver, for example ECONNREFUSED |
Could not connect to <path>: SQLite file not found: <path> | Check the path. Ghostrow does not create databases |
No tables found in <source>. or No schema files found in <path>. Expected .sql, .prisma, models.py or Laravel migrations. | Check the path. See ORM and schema files |
--table <name>: no such table. Tables: ... | Use a table name from the list |
--table must look like "name=rows", for example "orders=500"; got "..." | Write --table orders=500 |
--format must be csv, sql or json; got "..." | Use one of the three |
--seed must be a non-negative integer; got "..." | Use a whole number from 0 up |
--rows must be at least 1. and --cases must be at least 1. | Use a positive number |
<path> is not valid YAML: ... | Fix the rules file at the line shown, or delete it to start again |
twin needs --from <url>: the database to measure. | Add --from |
twin needs --to <url> or --out <dir>: where to write the synthetic copy. | Add one of them |
The target database is missing N table(s): ... | Create the schema in the --to database first |
No edge cases fit this schema's constraints. | The schema leaves no room for edge cases. Check its CHECK constraints |
GHOSTROW_AI_PROVIDER must be anthropic, openai or gemini; got "..." | See AI providers |
activate needs your license key, for example ... | Paste the whole key from your receipt email or account |
Constraints (exit code 2)
Could not generate row N of <table>: <rule> failed.A rule cannot be met. Lower--rows, or relax the rule in the rules file. Often it is a hand-written rule that contradicts a declaredCHECK.N generated row(s) would break a rule, so nothing was written:followed by the first rows. Nothing was written. Switch the rule off withenabled: false, or change the row counts.
Licenses and limits (exit code 4)
| Message | What to do |
|---|---|
Free generates up to 5 tables; this schema has N. | Use a smaller schema, or a paid license |
Free generates up to 10,000 rows per run; this run would write N. | Lower --rows, or use a paid license |
MySQL needs a paid license; Free works with Postgres and SQLite. (also for SQL Server) | Use Postgres or SQLite, or a paid license |
`ghostrow haunt` needs a Pro or Max license (this machine runs Free). | Activate a license that includes it |
`ghostrow twin` needs a Max license (this machine runs ...). | Twin is a Max feature |
Reading application code (--code) needs a Pro or Max license (...) | Drop --code, or upgrade |
That license key isn't valid. Copy it again from your receipt email or ghostrow.com/account/licenses. | Copy the full key again |
That license key was signed with a key this version doesn't know. Update Ghostrow, then try again. | Update Ghostrow |
Too many activations for this license in the last hour. Try again in N minutes. | Wait, then retry |
Activation needs a connection once; after that Ghostrow works offline. | Activate from a machine with internet access |
A message about the machine limit, with a link to ghostrow.com/account/licenses/<id> | Free a machine there, or run ghostrow deactivate on an old one |
Offline use and the Free fallback
After ghostrow activate, the license and activation are stored in ~/.ghostrow (or the folder in GHOSTROW_HOME) and checked on your machine. Ghostrow works offline.
- It checks in quietly about once a week when it can, with a short timeout, and carries on if it cannot reach the server.
- An activation lasts 30 days from the last check-in. After that there is a 14-day grace period in which Ghostrow still runs your plan and prints
Offline grace period: connect to the internet before <date> to keep <plan>. - Past the grace period it falls back to Free limits, with
This machine hasn't checked in with ghostrow.com since <date>, past the 30-day activation and 14-day grace period. Running at Free limits until it can check in.Connect once and it recovers. Ghostrow never deletes your data or rules.
Other notices that put a run at Free limits:
| Notice | Cause |
|---|---|
The saved license on this machine isn't valid for this build. Run ghostrow activate <key> again. | The stored license cannot be verified |
The saved activation belongs to a different machine. | The folder was copied from another machine. Activate here |
This machine was removed from your license. Run ghostrow activate <key> to add it again. | Removed in your account |
This license is no longer active (refunded or revoked). and This license is paused while a payment dispute is open. | License state |
This license is on the revocation list. | License state |
This version (released <date>) came out after your license's updates ended (<date>). It runs at Free limits; ... | Install an earlier version, or renew updates |
GHOSTROW_CI_TOKEN was not accepted (<reason>). Running at Free limits. | The token is wrong or revoked, or the license server could not be reached |
Run ghostrow status to see the plan, seats, machines, update date and notices. Run ghostrow deactivate before you move to another machine.
Still stuck
Contact support from the contact page with the command you ran (remove passwords), the full message, and the output of ghostrow --version.