Skip to content

Troubleshooting

Run diagnostics to quickly identify common issues:

Terminal window
dockrion doctor
CheckTestsFix if it fails
Dockerdocker --version runs successfullyInstall Docker Desktop or Docker Engine
DockfileDockfile.yaml exists in current directoryRun dockrion init or cd to the right directory
Validationvalidate_dockspec() passesFix the validation errors reported
PackagesCore packages importableReinstall with pip install dockrion[all]

Doctor always exits 0 — it reports results but doesn’t fail.

Error: Validation failed:
agent.name: must match pattern ^[a-z][a-z0-9-]*$

Cause: Dockfile field doesn’t meet schema requirements.

Fix: Check the field rules in the Dockfile reference. Common issues:

  • Agent name has uppercase letters or spaces
  • entrypoint or handler missing the : separator
  • Invalid framework value
  • Rate limit format wrong (should be count/window)
Error: Missing required secrets: OPENAI_API_KEY, DATABASE_URL

Cause: Required secrets declared in Dockfile but not found in environment or .env file.

Fix:

  • Add them to your .env file
  • Or export them in your shell
  • Or use --env-file to point to the right file
  • For builds: use --allow-missing-secrets if secrets aren’t available locally
Error: Failed to load adapter: Module 'app.graph' not found

Cause: The module path in agent.entrypoint or agent.handler can’t be imported.

Fix:

  • Check the module path matches your file structure: app.graph:create_graphapp/graph.py with function create_graph
  • Ensure you’re running from the project root directory
  • Check that __init__.py exists in packages if needed
  • Verify the function/class exists in the module
Error: Docker build failed

Common causes and fixes:

CauseFix
Docker not runningStart Docker Desktop or Docker daemon
Missing files in build contextAdd them to build.include
Dependency conflictsCheck requirements.txt for version conflicts
Network issues during pip installRetry or use --no-cache
HTTP 401: {"detail": {"message": "API key required", "code": "AUTH_ERROR"}}

Fix: Include the correct auth header:

  • API key mode: X-API-Key: your-key or Authorization: Bearer your-key
  • JWT mode: Authorization: Bearer <jwt-token>
HTTP 503: {"status": "not_ready"}

Cause: The agent adapter hasn’t finished loading yet, or loading failed.

Fix:

  • Wait a few seconds (agent loading can take time, especially for LangGraph)
  • Check logs for import errors
  • Verify the entrypoint/handler module is accessible
Error: [Errno 98] Address already in use

Fix: Use a different port with --port 3000, or kill the process using port 8080:

Terminal window
lsof -i :8080 | grep LISTEN
kill <PID>

All Dockrion errors extend DockrionError from dockrion_common:

Error ClassCodeWhen
DockrionErrorINTERNAL_ERRORBase class
ValidationErrorVALIDATION_ERRORSchema/input validation failures
AuthErrorAUTH_ERRORAuthentication failures
RateLimitErrorRATE_LIMIT_EXCEEDEDRate limit exceeded
NotFoundErrorNOT_FOUNDResource not found
ConflictErrorCONFLICTConflicting state
ServiceUnavailableErrorSERVICE_UNAVAILABLEService not available
DeploymentErrorDEPLOYMENT_ERRORBuild/deploy failures
PolicyViolationErrorPOLICY_VIOLATIONSafety policy violations
MissingSecretErrorMISSING_SECRETRequired secrets not found
BuildConflictErrorBUILD_CONFLICTDependency conflicts during build

Adapter-specific errors (from dockrion_adapters):

Error ClassCodeWhen
AdapterLoadErrorADAPTER_LOAD_ERRORFailed to load agent
ModuleNotFoundErrorMODULE_NOT_FOUNDImport failure
CallableNotFoundErrorCALLABLE_NOT_FOUNDFunction/class not in module
InvalidAgentErrorINVALID_AGENTWrong agent shape
AgentExecutionErrorAGENT_EXECUTION_ERRORAgent threw during invocation
AgentCrashedErrorAGENT_CRASHEDUnexpected agent crash
InvalidOutputErrorINVALID_OUTPUTAgent returned non-dict

All errors have a to_dict() method that returns {"message": "...", "code": "..."}.


Previous: 5.7 Cloud Deployment | Next: 5.9 FAQ →