Troubleshoot self-hosted deployments
Diagnose tapstate CLI exit codes, workspace validation errors, local Docker quickstart issues, connector registration, and server failures
Use this guide to diagnose .tap.yml workspaces, the CLI, the local Docker
playground, connector JAR registration, and self-hosted server failures. For
Cloud workflows and shared connector, CDC, or transform diagnostics, see
Troubleshoot a tapstate configuration.
CLI exit codes and version checks
Read the command result
Tapstate commands use these exit codes:
| Code | Meaning |
|---|---|
0 | Success |
1 | A coded domain diagnostic or refused operation |
2 | Invalid command usage |
3 | Unavailable in this context, not connected, or not implemented |
Use tapstate --help to inspect the commands in your installed version. In
the current preview, use tapstate help <command> or tapstate <command> --help
for a command's operands and options.
Text-mode results are written to standard output and usage or diagnostic messages
are written to standard error. With -o json or -o yaml, the structured
result, including validation diagnostics, is written to standard output.
Preserve both streams and the exit code when collecting evidence.
CLI and server versions differ
The CLI and server are separate builds. When connect reaches a server on a
different version, the CLI reports cli.version-mismatch and keeps the
connection open. Run the following command in the same session to confirm both
values:
versionInstall the CLI version that matches the server, or connect to a server on the CLI version. If their contracts differ, the server decides which operations it accepts. Do not treat a successful connection as proof that every command is compatible.
If the CLI attempts anonymous issuer discovery against an older server that does
not serve /.well-known/tapstate (such as a server on v0.3.0), the CLI reports
cli.issuer-discovery-rejected. The diagnostic output includes:
seed: The server endpoint URL contacted during discovery.reason: The rejection response or HTTP error status returned by the server.
To resolve cli.issuer-discovery-rejected, upgrade the tapstate server to a
release that supports issuer discovery, or use a CLI version matching the older
server.
Text-mode coded CLI diagnostics include the CLI version and the server version
captured when the connection was made. Offline diagnostics say server not connected; an older server that does not report a version appears as server not reported. Structured JSON and YAML results keep their documented shape;
collect tapstate version separately when reporting one.
A connected command returns exit code 3
The command was invoked without a server connection, or the verb is reserved
but not implemented. Start an interactive session and run connect and login,
or seed a one-shot command with -c and -u (which prompts interactively for
the password). The CLI does not accept a password flag; for automation, set
TAPSTATE_PASSWORD or pass --token / TAPSTATE_TOKEN so credentials stay
out of shell history and the process list.
Troubleshoot v0.8 installation and browser access
403 control.bootstrap-forbiddenon/auth/bootstrap: Three-layer v0.8 installations do not bootstrap from/auth/bootstrap. Initialize theConfiguration,Durable cache, andApplication datalayers first and create the first administrator on the dedicated management channel; see Initialize storage.- Occupied
CACHEdatabase refused during setup: First-time binding checks require a completely emptyDurable cachedatabase—any existing collection is refused, even with zero documents—along with collection-listing metadata permission. Select an unused database name and test again before committing. - Browser sign-in refused (
403) orcontrol.browser-auth-config-invalid: Plain HTTP browser logins are blocked by default in v0.8, and HTTPS requests must carry a single same-originOriginheader matching an allowed entry inTAPSTATE_BROWSER_AUTH_PUBLIC_ORIGINS. When TLS terminates at a reverse proxy, also list its proxy peer addresses inTAPSTATE_BROWSER_AUTH_TRUSTED_PROXIES, or enableTAPSTATE_BROWSER_AUTH_ALLOW_INSECURE_LOOPBACK=trueonly for server-local loopback testing. See Configure self-hosted browser access.
Check the workspace first
Run the validation command supplied with your tapstate environment before investigating the external system:
tapstate validate --workdir tapstate-workReview the filename, location, diagnostic code, message, and suggested fix. Correct one layer at a time, then validate again.
Demo workspace already exists or cannot be written
tapstate demo protects existing files by default:
cli.demo-workspace-existsmeans the target already contains a generated demo. Choose an empty work directory, or inspect the existing files before retrying with--force.cli.workspace-not-writableincludes the failingpathand filesystemreason. Correct the permission or choose a writable directory. The command restores replaced files and removes files it created, although empty directories from the failed attempt can remain.
The tap alias is unavailable
The optional alias never replaces another command. cli.alias-name-taken
means the target path belongs to something else. Continue using tapstate, or
remove the conflicting command yourself before running tapstate alias install. cli.alias-install-dir-unknown means the selected installation
directory has no tapstate entry; set TAPSTATE_INSTALL_DIR to the directory
used by the installer and retry.
Unknown field or invalid value
- Confirm the connector ID and exact field spelling in its Reference section.
- Remove fields copied from an upstream UI or another connector version unless the tapstate contract exposes them.
- Check whether the field is conditional on another value, such as authentication method or storage type.
Invalid mode
- Use only modes shown on the connector page.
- Do not add
cdcbecause the underlying database supports a transaction log. - A target-only connection does not need a source read mode.
Missing or unresolved reference
- Confirm that pipeline references match resource IDs exactly.
- Keep every referenced resource in the selected work directory.
- Check for renamed files whose internal
iddid not change with the filename.
Troubleshoot the local Docker quickstart
The local quickstart assembles five MySQL orders and six PostgreSQL shipments into MongoDB. Treat the run as successful only when it prints this complete result:
quickstart: 5 orders from MySQL, each carrying its shipments from PostgreSQL -- 6 of them, in one object per orderA healthy server or order_pipeline running line does not establish that the
assembled state is correct. Inspect the generated document when the success
line is missing.
Docker is unavailable
docker info
docker compose versionStart Docker and confirm the Compose plugin is available. The local quickstart needs to pull and run MySQL, PostgreSQL, MongoDB, and the tapstate server.
A container is unhealthy or stopped
docker compose ps
docker compose logs --tail=200 mysql postgres mongo serverWait for MySQL and PostgreSQL to finish initialization before retrying source schema discovery. A healthy tapstate server does not mean either source is ready. Slow Docker storage can leave a database initializing while the server already accepts requests.
For cli.request-timed-out during connector registration, check the registered
catalog before retrying: the upload can finish on the server after the client
times out. Registration is idempotent. Resolve storage or memory pressure,
then retry the failed steps. Keep passwords and tokens out of shared log bundles.
Schema discovery ran before a sample database was ready
During a cold start, the tapstate server can become healthy before MySQL or
PostgreSQL finishes initializing. If the script reports
connector.discover-failed with a refused connection, wait until both source
containers are healthy in docker compose ps.
Then open the CLI from the demo directory and inspect the pipeline:
./tapstate -w work
connect http://127.0.0.1:8080
login admin
status order_pipelineReplace admin in the example with the username chosen during setup and enter
that account's password at the prompt. If you accepted the playground's default
username, keep admin; the password is the one you supplied during setup.
The current playground does not save
the password in .env. If the pipeline
is FAILED, run stop order_pipeline --keep-state and wait for STOPPED.
Rerun the same Quickstart entry point so it can discover both source schemas
before applying and starting the pipeline. For a saved script, run
sh quickstart.sh in its directory. For the one-line installer, repeat the
original command from the parent of tapstate-demo.
Confirm the complete five-order, six-shipment success line and inspect the stored result. A start being accepted after an earlier discovery error does not establish a successful run. Do not clear volumes to resolve a database that is still initializing.
The assembled result does not appear
Check the source and target independently:
docker compose exec mysql mysql -uroot -psecret appdb \
-e "SELECT COUNT(*) AS source_rows FROM orders;"
docker compose exec postgres psql -U postgres -d appdb \
-c "SELECT COUNT(*) AS source_rows FROM shipments;"
docker compose exec mongo mongosh --quiet \
'mongodb://mongo:27017/views?directConnection=true' \
--eval 'printjson({orders: db.order_state.countDocuments({}), shipments: db.order_state.aggregate([{$unwind:"$shipments"},{$count:"count"}]).toArray()})'If MySQL has five rows and MongoDB does not, enter the CLI REPL and collect pipeline evidence:
./tapstate -w workconnect http://127.0.0.1:8080
login admin
status order_pipeline
metrics order_pipeline
logs order_pipelineReplace admin with the username chosen during setup and enter that account's
password at the prompt. Keep admin if you accepted the playground's default
username; there is no default password. For non-interactive setup, use the account supplied
through TAPSTATE_ADMIN_USER and TAPSTATE_ADMIN_PASSWORD. Do not paste the
password into a shell command or diagnostic bundle.
A rerun reports an illegal lifecycle transition
The script preserves generated assets. Inspect status and logs first.
If the sample is already running and the five-order, six-shipment check passes,
the setup is complete.
For a failed pipeline, fix the reported cause, stop it with --keep-state, and
wait for the stop to complete before retrying the saved script from the same
directory. See Lifecycle transitions.
A lifecycle error alone is not a reason to delete the playground's volumes.
The managed view store is unreachable
actuation.view-store-unreachable means the server cannot reach the managed
MongoDB store used for an inline view. Check the server's view-store
configuration and MongoDB health, then start the pipeline again. The
local quickstart's unauthenticated sample store is disposable and is not a production
security model.
Connector registration and target rules
Connector registration is refused or download fails
connector.not-officialmeans the server refused the artifact before registration. The default accepted set has 18 IDs across MySQL, PostgreSQL, MongoDB, Oracle, SQL Server, Db2 LUW, and Db2 for i, including selected managed variants. Check the exact accepted IDs; a catalog entry alone does not make an artifact acceptable or certify every role.connector.artifact-unreadable(HTTP400) means the uploaded JAR archive or its specification cannot be read. The error'sartifactparameter names the file; the connector ID may not yet be known. Check that the download is a complete JAR, not an HTML error page, then fetch the matching artifact again before retrying registration.cli.connector-download-failedmeansregister <connector-id>could not fetch the artifact from the GitHub preview release or the mirror configured inTAPSTATE_CONNECTORS_URL. Verify network connectivity, HTTPS proxy settings, or setTAPSTATE_CONNECTORS_URLto an internal mirror.
Register connectors one at a time. The current preview still has a known ambiguity during concurrent registration; inspect the resulting catalog before retrying.
Unsupported target connector
dsl.unsupported-target-connector means a serve.sync destination is not
allowed by this deployment's target rules. Cloud accepts MongoDB and MongoDB
Atlas targets. Self-hosted deployments use the registered connector's sink
capability, subject to source-only restrictions. Db2 LUW and aws-rds-mysql are
source-only in both modes; aws-rds-mysql is refused as a target even when its
catalog entry reports sink capability. Check the destination's exact connector
ID and registration rules. Catalog capability
does not establish release certification.
Server runtime, state, and API diagnostics
Interpret CLI observations carefully
- Status separates lifecycle intent from the latest runtime observation. Metrics require an observation and may lag a lifecycle command briefly.
- During server startup,
/healthzand/auth/storage-entrycan return200beforeBootstraplogsTapstate application is ready(while/auth/loginstill returns503), so automation should wait for authentication ortapstate versionreadiness after a restart. status --watchandlogs --followcontinue until you press Ctrl+C.- Logs are node-local in the preview and are not a durable audit history.
snapshotcan report that no snapshot is available. Confirm source and target records instead of treating that response alone as proof of success or failure.- Shared-capture inbound observations can be attributed incorrectly in the current preview. Compare per-table target confirmations and data before diagnosing a consumer from inbound counts alone.
- Light CLI requests (such as
position,stop,pause, andresume) use a 3-second HTTP read timeout. On constrained or heavily loaded hosts where assembling the server response takes longer than 3 seconds (for example,GET /api/pipelines/{id}/positionor:stop), the CLI can reportrequest failed: <host:port> is unreachableeven when the server accepted the request or remains healthy. Verify withstatus <pipeline-id>or the corresponding REST endpoint. - In v0.8.0, running
tapstate -c <url> -u <user> data-browser '...'as a one-shot command returnscli.not-connected(exit code3). Pipe the read expression intotapstate -c <url> -u <user>on standard input or run it inside an interactive session.
Connector state and keyring diagnostics
When capture.recovery-log-gap or capture.recovery-progress-unproven refuses
recovery (including checkpoints written by some older server stores), back up
the server metadata and operator state before clearing checkpoints or rerunning.
Current preview releases prevent new unsafe checkpoints from being written, but
they do not repair existing ones.
| Diagnostic | What it means | What to do |
|---|---|---|
connector.state-unreadable | Stored connector state cannot be deserialized, for example after a downgrade. | Preserve a backup and use the release that wrote the state. If choosing to clear it, review shared-chain and target effects before rerunning. |
connector.state-value-unsupported | A connector attempted to persist an unmappable state data type in the storage layer. | Report the issue against the connector build; the connector's internal state cannot be persisted by the engine. |
store.source-config-keyring-invalid | The metadata keyring is missing, malformed, or inconsistent. | Restore the encrypted Source records and their matching keyring from a consistent backup; do not generate a replacement keyring for existing ciphertext. |
store.source-config-keyring-not-ready | This node cannot acknowledge the current keyring generation. | Check cluster membership and startup logs before retrying. Preserve the metadata and keyring for diagnosis. |
Lifecycle, position, and schema sync diagnostics
| Diagnostic | What it means | What to do |
|---|---|---|
lifecycle.purge-state-not-stated | A REST POST ...:stop request omitted the mandatory purgeState boolean body. | Supply {"purgeState": false} to preserve checkpoint offsets, or {"purgeState": true} to clear this pipeline's checkpoint position and operator state. |
actuation.schema-sync-while-running | derived-schema --accept was called while the pipeline is running or converging. | If upstream schemas changed, refresh the source schema first, stop the pipeline until STOPPED, then accept the derived schema. |
position.write-back-while-live | Attempted to update checkpoint positions while the pipeline or another pipeline sharing its mining chain is running. | Stop all pipelines reading from the same source connection before writing back positions. |
position.chain-not-read | The position document specifies a chain not read by the target pipeline. | Read the pipeline's current position document first, edit only its existing chains, and re-apply. |
position.field-not-editable | A non-editable position attribute outside resumeFrom.token was altered. | Re-export the position payload and edit only resumeFrom.token. |
Control plane and REST API diagnostics
| Diagnostic | HTTP status | What it means | What to do |
|---|---|---|---|
pipeline.not-found | 404 Not Found | The requested pipeline ID does not exist on the server. | Confirm the pipeline ID in Pipelines or GET /api/pipelines. |
pipeline.already-exists | 409 Conflict | A pipeline with the requested ID is already registered. | Use a unique pipeline ID or update the existing pipeline with PUT. |
pipeline.precondition-required | 428 Precondition Required | A pipeline update request (PUT /api/pipelines/{id}) omitted the required If-Match header. | Perform a GET request to read the current resource and its ETag, then pass that value in the If-Match header. |
pipeline.version-conflict | 412 Precondition Failed | The provided If-Match ETag does not match the pipeline's current version (concurrent edit conflict). | Re-fetch the pipeline resource to obtain the latest ETag and retry the update. |
Pipeline, transform, and observation diagnostics
Start with the pipeline's monitoring and logs pages, or use the observation interfaces for repeatable CLI diagnostics.
| Code or symptom | What to check |
|---|---|
dsl.unknown-field on view.schema | Remove the unused View policy; keep connector config.schema. See Upgrade to v0.6. |
actuation.source-schema-not-discovered | Discover every required source before starting either View or sync output. |
engine.execution-not-authorized | The run lost its execution lease or exhausted automatic lease-recovery retries while the server or capture layer was still starting. Inspect logs <pipeline-id>, run stop <pipeline-id> --keep-state, wait for STOPPED, and run start <pipeline-id> to resume from retained positions. Before a planned server restart, stop running pipelines with --keep-state first. |
engine.view-key-missing-from-before-image | Confirm the selected View key is present in source before images for updates and deletes. |
dsl.join-input-not-a-table / dsl.join-input-is-a-pattern | Use one physical table per Join alias, not a prior step or a table pattern. |
actuation.join-sql-invalid | Resolve the reported SQL column or input error before starting again. |
nest.flat-cardinality-violation | More than one live child matched a flat embed. Use an array or correct the relationship. |
nest.flat-field-conflict | Rename or drop conflicting fields before Nest while preserving its relationship keys. |
nest.state-database-changed-while-running | On v0.7 single-store deployments, stop all writers and follow the full state move; on three-layer v0.8 installations, restore the original state.database name or run a full pipeline rebuild rather than copying cache collections. |
transform.script-decimal-out-of-range | JavaScript cannot represent the decimal within its numeric range. Keep it unchanged or revise the calculation. |
transform.expression-failed | Check expression inputs, including null dimension values from an outer join. |
monitor.no-observation | No observation has been published; do not interpret missing data as success. |
monitor.cursor-expired | Start a fresh history query without the expired cursor. |
Engine out of memory
After the engine is lost to out-of-memory, affected running or paused pipelines
report engine.out-of-memory and /healthz returns 503 broken. Restart the
server process after addressing memory pressure; repeating pipeline start
cannot restore the lost engine. Check heap allocation, source batch sizes,
operator state, and Nest capacity.
A healthy /healthz response does not prove target writes or CDC continuity.
Inspect data and observations after recovery. Pipelines that failed for another
reason before a member restart retain that failure and need separate diagnosis.
Related pages
Observe self-hosted pipelines
Inspect pipeline status, metrics, snapshot progress, recent history, logs, and Prometheus or OTLP exports on a self-hosted tapstate server
To v0.8
Plan a separate three-layer v0.8 installation, preserve v0.7 databases and backups, and verify cutover without in-place migration