Troubleshooting¶
Start with the request or run id: the UI shows run ids, responses carry X-Request-ID, and every backend log line includes them.
Backend¶
| Symptom | Likely cause | Fix |
|---|---|---|
| Container exits right after start | Configuration error | docker compose logs forge-api lists every problem at once; fix deploy/backend.env |
PermissionError under /data |
Bind-mounted folder not owned by uid 10001 | chown -R 10001:10001 <folder> |
/health/ready returns 503 |
A check failed (database, storage, templates, LLM) | The checks object in the response names it |
| 401 on every request | API key mismatch | Compare FORGE_API_KEY with the pool's ForgeApi__ApiKey; rotate both together |
| "Planner LLM did not return a usable plan" | LLM unreachable, or replies are not JSON | Set FORGE_READY_CHECK_LLM=true and check /health/ready; use LLM_JSON_MODE=json_schema with a model that supports it |
| "LLM Provider NOT provided" | LiteLLM cannot route the model name | Without a custom base URL, prefix the model, e.g. LLM_MODEL=openai/local-model |
| TLS errors to the LLM or git server | Internal CA not trusted | Mount the CA bundle and set FORGE_CA_BUNDLE |
| Chat replies "I could not turn that into a plan change" | The model's reply did not match the JSON schema after one repair | Rephrase, use the Service Designer, or use a stronger instruct model with JSON-schema support |
| Approval refused with issues | Blocking plan issues | The Overview tab lists them; codes |
| Run paused, "Upload the missing XSD file(s)" | A schemaLocation in the WSDL/WADL is not uploaded |
Upload the XSDs; the run resumes automatically |
A run shows interrupted |
The backend restarted during generation | Resume on the Progress tab, or POST /v1/runs/{id}/resume |
| A run fails with "The plan is not ready for generation" | The approved plan became invalid for the parsed documents | Fix the listed issues and approve again |
| Validation findings after a run | Generated artifacts failed a check (reported, not fatal) | The Progress tab lists them; they often come from incomplete source schemas |
| Repository preview fails with an authentication error | Token missing or lacking scope | Check token_file / token_env; the account needs Code Read & Write |
| "A pull request for this branch already exists" | The same run was applied before | Use the existing pull request, or generate a new run |
| Disk fills up | Retention disabled or too long | Lower FORGE_RETENTION_DAYS |
Web UI on IIS¶
| Symptom | Likely cause | Fix |
|---|---|---|
HTTP 500.19, error 0x8007000d |
Hosting Bundle missing; AspNetCoreModuleV2 unknown |
Install or repair the Hosting Bundle, restart IIS |
| HTTP 500.30, in-process start failure | The app threw during startup (bad configuration, unreadable keys folder) | Enable stdout logging (below); check Event Viewer → Application (IIS AspNetCore Module V2, .NET Runtime) |
| HTTP 500.31 | The .NET 10 runtime is not installed | Install the matching Hosting Bundle |
| HTTP 500.32 | Bitness mismatch | Enable 32-Bit Applications: False |
| HTTP 502.5 | Out-of-process hosting failed to start | Check hostingModel="inprocess" and processPath |
| "Attempting to reconnect" in a loop | WebSockets blocked | Install the WebSocket Protocol feature; let proxies pass Upgrade; sticky sessions in a farm |
| Users disconnected about every 20 minutes | Application pool idle time-out | Idle Time-out 0, Start Mode AlwaysRunning |
| "Antiforgery token could not be decrypted" after a deploy | Keys not persisted or not shared | Set DataProtection__KeysPath, grant Modify, same path on all farm servers |
| App bar shows Backend unavailable | Wrong ForgeApi__BaseUrl, firewall, or FORGE_BIND_ADDRESS still 127.0.0.1 |
From the IIS server: Invoke-RestMethod <BaseUrl>/health/ready |
| ZIP download fails with 502 or 504 | Backend slow or unreachable | Backend logs and the network path |
| Live updates icon (cloud-off) in the workspace | The event stream reconnects | Usually transient; it resumes and refreshes. If permanent, check proxies that buffer or time out SSE |
stdout logs¶
For short diagnosis only; they grow without limit.
- Set
stdoutLogEnabled="true"inweb.configand createD:\MiddlewareForge\web\logs, writable by the pool identity. - Reproduce the problem and read the newest
logs\stdout_*.log. - Set
stdoutLogEnabledback tofalse.
Development¶
| Symptom | Fix |
|---|---|
uv warns that VIRTUAL_ENV does not match .venv |
Harmless when another environment (for example conda) is active; uv run uses .venv. Deactivate the other environment to silence it. |
| UI contract tests fail after an API change | Re-capture the fixtures: uv run --extra dev python scripts/capture_ui_fixtures.py |
mkdocs build --strict fails |
A link or page in nav is broken; the message names it |