Troubleshooting
Common issues, debugging tips, and solutions for DojOps.
Common Issues
API Key Errors
Symptom: Error: Authentication failed or 401 Unauthorized
Solution:
- Verify your API key is set:
dojops auth status - Check the correct environment variable is set for your provider:
echo $OPENAI_API_KEY # For OpenAI echo $ANTHROPIC_API_KEY # For Anthropic echo $DEEPSEEK_API_KEY # For DeepSeek echo $GEMINI_API_KEY # For Gemini - Re-configure:
dojops config
Provider Connection Failed
Symptom: Error: Connection refused or ECONNREFUSED
Solution:
- Ollama: Ensure the Ollama server is running (default
localhost:11434, or your configuredOLLAMA_HOST):ollama serve - Other providers: Check your internet connection and that the provider’s API is accessible
- Proxy: If behind a corporate proxy, ensure
HTTPS_PROXYis set
Ollama Setup Issues
Symptom: Error: connect ECONNREFUSED 127.0.0.1:11434
Solution:
- Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh - Start the server:
ollama serve - Pull a model:
ollama pull llama3 - Verify:
curl http://localhost:11434/api/tags
Using a remote Ollama server:
If your Ollama instance is not at localhost:11434, configure the host URL:
# Via interactive config
dojops config
# Via environment variable
export OLLAMA_HOST=https://ollama.corp.internal:8443
# For self-signed TLS certificates
export OLLAMA_TLS_REJECT_UNAUTHORIZED=falseRun dojops status to verify connectivity — it will show the resolved Ollama URL.
GitHub Copilot Authentication Issues
Symptom: Error: Not authenticated with GitHub Copilot or Error: GitHub token is invalid or expired
Solution:
- Re-authenticate:
dojops auth login --provider github-copilot - The Device Flow will open your browser for authorization
Symptom: Error: Access denied. Make sure your GitHub account has an active Copilot subscription.
Solution:
- Verify you have an active Copilot subscription (Pro, Pro+, Business, or Enterprise) at https://github.com/settings/copilot
- If using a GitHub organization, ensure Copilot is enabled for your account
Symptom: Token expires frequently / requests fail after ~30 minutes
Solution:
- This is expected — Copilot JWTs are short-lived (~30 min). DojOps auto-refreshes them before each API call using your long-lived GitHub OAuth token
- If auto-refresh fails, your GitHub OAuth token may have been revoked. Re-authenticate:
dojops auth logout --provider github-copilot dojops auth login --provider github-copilot
CI/CD Usage:
# Set a GitHub OAuth token to skip the interactive Device Flow
export GITHUB_COPILOT_TOKEN=ghu_xxx
export DOJOPS_PROVIDER=github-copilotDashboard Issues
Dashboard Not Loading
Symptom: Browser shows blank page or connection refused
Solutions:
- Verify the server is running:
dojops serve - Check the port isn’t in use:
lsof -i :3000 - Try a different port:
dojops serve --port=8080
Metrics Tabs Show Empty Data
Symptom: Overview, Security, or Audit tabs show no data
Solutions:
- Initialize the project (creates
.dojops/directory):dojops init - Run some operations to generate data:
dojops "Create a Terraform config" dojops scan - Check that the server detected the project root (look for “Metrics: enabled” in the startup output)
Scanner Issues
Scanner Tool Not Found
Symptom: Scanner skipped: trivy not found or similar
Solution: Install the required external tools:
# trivy
brew install aquasecurity/trivy/trivy # macOS
sudo apt-get install trivy # Ubuntu/Debian
# gitleaks
brew install gitleaks # macOS
go install github.com/gitleaks/gitleaks/v8@latest # Go
# checkov
pip install checkov
# hadolint
brew install hadolint # macOS
wget -O hadolint https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 # Linux
# pip-audit
pip install pip-auditDojOps gracefully skips unavailable scanners — they’re not required for basic functionality.
Scanner Timeout
Symptom: Scan takes very long or times out
Solution:
- Use targeted scans instead of full scans:
dojops scan --security # Faster than --all dojops scan --deps # Only dependency audit - Large monorepos may take longer due to sub-project discovery
Execution Issues
Lock File Conflict
Symptom: Error: Operation locked by PID <number> (exit code 4)
Solutions:
- Wait for the other operation to complete
- If the process is dead (stale lock), DojOps should auto-clean it
- Manually remove the lock (only if you’re sure no operation is running):
rm .dojops/lock.json
Audit Chain Integrity Failure
Symptom: dojops history verify reports integrity failure
Causes:
- Audit log file was manually edited
- Disk corruption
- File was truncated
Solution:
- Check the specific entry that failed verification
- If the file was accidentally modified, restore from backup
- If corruption occurred, the audit log may need to be reset (data loss)
Resume Not Working
Symptom: dojops apply --resume re-executes completed tasks
Solution:
- Verify the plan exists:
dojops history list - Check that execution logs were saved:
ls .dojops/execution-logs/ - Ensure you’re resuming the correct plan:
dojops apply --resume <plan-id>
CLI Issues
No .dojops/ Project
Symptom: Error: No .dojops/ project found (exit code 5)
Solution:
dojops initThis creates the project directory structure. Required for planning, execution, history, and metrics features.
Command Not Found
Symptom: dojops: command not found
Solution:
- Install globally:
npm i -g @dojops/cli - Or use the in-repo alternative:
pnpm dojops -- "your prompt"
Debug Mode
Enable verbose output for troubleshooting:
# Verbose output
dojops --verbose "Create a Terraform config"
# Debug-level output with stack traces
dojops --debug "Create a Kubernetes deployment"Debug mode shows:
- Provider configuration details
- Agent routing scores
- LLM request/response payloads
- Schema validation details
- Execution pipeline steps
Exit Code Reference
| Code | Meaning | Common Cause |
|---|---|---|
| 0 | Success | Operation completed normally |
| 1 | General error | LLM error, network issue, unexpected failure |
| 2 | Validation error | Schema validation failed (invalid input or LLM output) |
| 3 | Approval required | Operation needs user approval (use --yes to auto-approve) |
| 4 | Lock conflict | Another operation is running (PID-based lock) |
| 5 | No .dojops/ project | Run dojops init to create the project directory |
| 6 | HIGH findings | Security scan found HIGH severity issues |
| 7 | CRITICAL findings | Security scan found CRITICAL severity issues |
Getting Help
# Show help
dojops --help
dojops <command> --help
# System diagnostics
dojops doctor
# Inspect configuration
dojops config show
dojops inspect configIf you encounter a bug, please report it at: https://github.com/dojops/dojops/issues