Troubleshooting
This page follows the path users experience: Compose startup, backend health, Admin login, Draft and Version publishing, then MCP and Skill Agent behavior.
Protect Secrets First
- Record the failing command, URL, page action, or Agent action.
- Record response envelope
code,status,message, andtrace_id. - Mask
.env, JWTs, MCP Tokens, database passwords, storage secrets, andAuthorizationheaders before sharing logs. - Do not put tokens in CLI args while reproducing issues.
Full Compose Does Not Start
Validate config from the workspace root without printing interpolated values:
docker compose --env-file .env config --quiet
docker compose --env-file .env psCommon causes:
scripts/vdoc-local-bootstrap.shwas not run to create.env, or.env.examplewas copied by hand without replacing placeholders.VDOC_POSTGRES_PASSWORD,VDOC_STORAGE_ACCESS_KEY,VDOC_STORAGE_SECRET_KEY,VDOC_JWT_KEY, orVDOC_MCP_TOKEN_CIPHER_KEYstill contains placeholder text.- A local port is already in use. Change
VDOC_BACKEND_HOST_PORT,VDOC_ADMIN_HOST_PORT,VDOC_POSTGRES_HOST_PORT,VDOC_RUSTFS_HOST_PORT, orVDOC_RUSTFS_CONSOLE_HOST_PORT. - Docker is building app images, so the first start takes longer.
Read logs:
docker compose --env-file .env logs --tail=100 postgres rustfs backend adminTo create a new disposable local .env, run:
scripts/vdoc-local-bootstrap.shIf .env already exists, the script refuses to overwrite it. Use --force only when you intend to discard the local environment.
Backend Health Fails
Check the health path:
curl http://127.0.0.1:8080/api/v1/open/healthIf .env changed VDOC_BACKEND_HOST_PORT, use the actual port.
Then check:
- Backend logs for PostgreSQL connection or migration failure.
- Backend logs for storage initialization failure.
VDOC_DATABASE_DSNuses the correct host. In full Compose, backend should usepostgres:5432, not127.0.0.1:5432.VDOC_STORAGE_ENDPOINTuses the correct endpoint. In full Compose, backend should userustfs:9000, not127.0.0.1:9000.- PostgreSQL password is percent encoded before being put in the DSN if needed.
When database or storage is enabled, unreachable dependencies stop backend startup instead of falling back to memory mode.
PostgreSQL Connection Fails
- Full Compose:
VDOC_DATABASE_DSNusespostgres:5432, and user, password, and database matchVDOC_POSTGRES_*in.env. - Backend running on the host: DSN uses
127.0.0.1and the port exposed byVDOC_POSTGRES_HOST_PORT. - External PostgreSQL: check network, SSL mode, user, password, database name, and provider host.
- Percent encode passwords containing URI-reserved characters such as
@,:,/,#, or?. - Do not use
docker compose down -vto fix a connection issue unless you intentionally want to delete local data.
RustFS or External Object Storage Fails
- Full Compose: backend uses
VDOC_STORAGE_ENDPOINT=rustfs:9000,VDOC_STORAGE_USE_SSL=false, andVDOC_STORAGE_PATH_STYLE=true. - Backend running on the host: endpoint uses
127.0.0.1:9000or your changedVDOC_RUSTFS_HOST_PORT. - External object storage: check endpoint, bucket, region, SSL, path style, access key, secret key, and bucket permissions.
- When storage is enabled, backend tries to create the bucket if it is missing. Creation failure usually means credential or permission problems.
- RustFS console defaults to
http://127.0.0.1:9001, but backend connects to the S3 API port9000.
Admin Does Not Open or Calls the Wrong Backend
- Full Compose Admin defaults to
http://127.0.0.1:8081. - Admin Docker uses
VDOC_ADMIN_API_BASE_URLto generate/runtime-config.js. - This value must be a backend origin the browser can reach, such as
http://127.0.0.1:8080or your domain. - Do not set it to
http://backend:8080, because browsers cannot resolve Compose service names. - Local Admin development uses
VITE_VDOC_API_BASE_URL. - Private API calls use raw JWT
Authorization, noBearerprefix.
Login API Returns HTTP 200 but Still Fails
Vdoc REST uses an envelope. Inspect the body, not only HTTP status:
codestatusmessagedetailtrace_id
If code is not 200 or status is not OK, handle it as a business error.
Draft or Version Flow Fails
- The current user needs the right role: Writer creates and submits Drafts, Project Admin or SuperAdmin reviews.
document_type=1means OpenAPI, anddocument_type=2means Markdown.- OpenAPI content should be OpenAPI 3.0 or 3.1.
relative_pathis Document identity. Do not query across systems by display name.- Publishing requires approve. v0.2 does not support MCP direct publish.
Admin AI Summary or Page Chat Fails
- Read Admin AI first. Confirm the Project has an enabled project provider or can fall back to an enabled system provider.
- Run the provider test for that scope. Check
base_url,api_mode,model, and timeout without printingapi_keyin logs. - Confirm provider detail exposes only
api_key_setandapi_key_last4. If no encrypted key is set, have an authorized administrator save the configuration. - Check whether the matching
draft_review_summary,version_change_summary,diff_change_summary, orpage_chatprompt is enabled. pendingmeans the latest request is still generating.skippedusually means no usable provider or a disabled prompt.failedmeans the provider call failed or its context changed before completion. None of these states should block Draft submission, Version publishing, machine Diff, or human review.- Page chat must bind to the current Draft, Version, or Diff. Cross-Project access, missing read permission, or an empty message fails.
- Diagnose with
trace_idand audit status. Audit may contain a failure reason and token usage, while prompt overrides, summaries, and chat content are managed product records. Logs and audit metadata must not contain raw API keys, JWTs, MCP Tokens,Authorizationheaders, or secrets embedded in prompts.
Live E2E Fails
From the backend directory, check the root Compose derived settings:
cd Vdoc
./scripts/vdoc-e2e.sh live-compose --env-file ../.env --check-only
./scripts/vdoc-e2e.sh live-compose --env-file ../.envLive E2E resets the selected disposable VDOC_TEST_POSTGRES_DB, vdoc_e2e by default. It does not reset the application database from VDOC_POSTGRES_DB. Common causes include root Compose not running, a wrong .env path, changed host ports without a container restart, or VDOC_TEST_POSTGRES_DB pointing at the application database.
MCP Adapter Fails
- Agent MCP config must set
VDOC_MCP_TOKEN. - Set either
VDOC_BASE_URLorVDOC_MCP_URL. - If using
VDOC_BASE_URL, the adapter appends/api/v1/open/mcp. - Do not put tokens in
args; useenv. - stdout is reserved for MCP protocol frames; diagnostics go to stderr.
- Confirm
/api/v1/open/mcpis reachable from the Agent machine.
Agent Does Not Use Vdoc Facts
- Confirm
@vdoc/mcptools/listsucceeds. - Confirm
Vdoc-skill/is installed as the target runtime'svdocskill folder andSKILL.mdis at the skill root. - Give explicit tasks such as: "First query Vdoc
get_endpoint_detail, then explain request fields." - If the Agent still guesses fields, enums, response shapes, or Markdown text, reload the Skill and require it to query Vdoc MCP first.
When to Roll Back
- Backend health fails and cannot be fixed quickly: return to the previous backend or workspace version first.
- Admin page fails but backend is healthy: roll back Admin build or container first.
- MCP
tools/listfails: check token and backend before rolling back MCP package. - Agent ignores Vdoc facts: check MCP and Skill installation before rolling back the Skill package.
- Admin AI fails while machine Diff and human review work: roll back provider or prompt configuration first. Do not roll back a published Version or let AI replace review.
Read Upgrade and Rollback before rolling back. Do not delete PostgreSQL or object storage data.
The local gate can be listed and then run:
scripts/vdoc-release-dry-run.sh --list
scripts/vdoc-release-dry-run.shIt runs local checks only. It does not publish or deploy.