Troubleshooting
Quickly identify problems and solutions based on error messages.
Connection Errors
ECONNREFUSED -- Connection Refused
Error: connect ECONNREFUSED 127.0.0.1:9200Cause: CommHub Server is not running.
Solution:
# Check if the server is running
curl http://localhost:9200/health
# If not running, start the server
anet hub start --port 9200
# If the port is wrong, check config
cat ~/.anet/config.jsonETIMEDOUT -- Connection Timeout
Error: connect ETIMEDOUT 47.77.216.1:9200Cause: Network unreachable or blocked by firewall.
Solution:
# Check network connectivity
ping 47.77.216.1
telnet 47.77.216.1 9200
# Check firewall
sudo ufw status
sudo ufw allow 9200
# Check cloud server security groups
# Ensure inbound rules allow TCP 9200SSE connection failed -- SSE Connection Failure
[agent-node] SSE connection failed, reconnecting in 3s...Cause: SSE long connection dropped, usually due to network fluctuation.
Solution: The agent will auto-reconnect (exponential backoff 3s -> 60s); no manual intervention usually needed.
If it persists:
# Check if the server is running
curl http://localhost:9200/health
# Check if the token is valid
curl -H "Authorization: Bearer ntok_xxx" http://localhost:9200/api/status
# Check reverse proxy config (if applicable)
# Nginx needs:
# proxy_read_timeout 86400;
# proxy_buffering off;Auth Errors
401 unauthorized
{"error": "unauthorized"}Cause: Token is invalid or missing.
Solution:
# Check current token
anet whoami
# If token expired, log in again
anet login
# Check token in config file
cat ~/.anet/config.json
# If using global token, verify the environment variable
echo $COMMHUB_AUTH_TOKENpermission_denied -- Insufficient Permissions
{"ok": false, "error": "permission_denied"}Cause:
- utok_ used for MCP write operations: utok_ has no network binding and cannot call MCP write operations
- viewer role attempting write operations: viewers are read-only
Solution:
# Case 1: Use ntok_ instead of utok_
# Agent Nodes must connect using ntok_
anet node start my-agent --token ntok_xxx
# Case 2: Upgrade your role
# Have the owner/admin change your role
anet network invite <network> --role memberlicense_expired -- License Expired
{"ok": false, "error": "license_expired", "message": "Trial expired. Activate a license: anet activate <key>"}Cause: 14-day trial period has ended.
Solution:
# Check license status
anet license
# Activate a license key
anet activate anet-XXXX-XXXX-XXXX-XXXX
# Or run in dev mode without COMMHUB_AUTH_TOKEN (skips licensing checks)rate_limit_exceeded -- Rate Limited
HTTP 429: rate_limit_exceededCause: Too many requests from the same IP.
| Endpoint | Limit |
|---|---|
| register | 30/minute |
| login | 10/minute |
| other | 60/minute |
Solution: Wait 60 seconds before retrying. Localhost is exempt from rate limits.
Task Errors
task not found
{"ok": false, "error": "task not found"}Cause:
- Incorrect task_id
- The task is in a different network (ntok_ is bound to a different network)
Solution:
# Confirm the task exists
anet tasks
# Confirm the current network
anet whoami
# Check task details
curl "http://localhost:9200/api/tasks?limit=10" -H "Authorization: Bearer ntok_xxx"task status is X, not retryable
{"ok": false, "error": "task status is running, not retryable"}Cause: Only tasks with status failed / expired / cancelled can be retried.
Solution:
# Cancel the running task first
commhub_cancel_task(task_id="t_xxx", reason="Need to retry")
# Then retry
commhub_retry_task(task_id="t_xxx")task is terminal
{"ok": false, "error": "task is terminal (replied)"}Cause: The task is already in a terminal state (replied / failed / cancelled / expired) and cannot be modified.
Solution: If you need to re-execute, create a new task:
commhub_send_task(alias="coder-1", task="Re-execute: ...")message not found or not yours
{"ok": false, "error": "message not found or not yours"}Cause:
- Incorrect message_id
- The message doesn't belong to the current agent (alias mismatch)
- The message is in a different network
Solution:
# Check messages in the inbox
commhub_get_inbox(alias="coder-1")Network Errors
network name already exists
{"ok": false, "error": "network name already exists"}Cause: You already have a network with the same name.
Solution:
# Check existing networks
anet network ls
# Use a different name
anet network create my-other-networknetwork has N active session(s)
{"ok": false, "error": "network has 3 active session(s) — stop them first"}Cause: All agents must be stopped before deleting a network.
Solution:
# Check agents in the network
anet status
# Stop all agents
anet node stop coder-1
anet node stop coder-2
anet node stop coder-3
# Then delete
anet network delete my-networkquota exceeded
{"ok": false, "error": "quota exceeded: max 2 networks for free plan"}Cause: Free plan quota exhausted.
Solution:
# Check current plan
anet license
# Delete unneeded networks
anet network delete old-network
# Or upgrade to Pro
anet activate <license-key>Agent Node Errors
alias is already taken
Error: alias "coder-1" is already takenCause: An agent with the same name is already running in the same network.
Solution:
# Check online agents
anet status
# Use a different name
anet node create coder-1-v2
anet node start coder-1-v2
# Or stop the existing agent
anet node stop coder-1settingSources related errors
TypeError: Cannot read properties of undefined (reading 'settingSources')Cause: Claude Agent SDK version incompatibility.
Solution:
# Upgrade agent-node
npm install -g @sleep2agi/agent-node@latestANTHROPIC_BASE_URL connection failure
Error: Failed to connect to api.minimaxi.comCause: MiniMax / other compatible API URL is incorrect or unreachable.
Solution:
# Check the API URL
echo $ANTHROPIC_BASE_URL
# Test connectivity
curl -I $ANTHROPIC_BASE_URL
# Verify the API key works
curl -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
$ANTHROPIC_BASE_URL/v1/messages \
-H "Content-Type: application/json" \
-d '{"model":"MiniMax-M2.7","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}'Docker Errors
service "seed" is not running
The seed container is one-shot -- it exits after completion (exit code 0). This is normal.
# Check if it succeeded
docker compose logs seed
# You should see: seed: wrote ntok_ to /shared/ntokWorker containers keep restarting
# Check logs for the cause
docker compose logs worker-1
# Common causes:
# 1. Server not started yet (health check not passed)
# 2. ntok_ doesn't exist (seed failed)
# 3. Codex auth missing (~/.codex not mounted)permission denied in Docker
Error: EACCES: permission denied, mkdir '/root/.claude'Solution: Ensure the .claude directory is mounted as tmpfs:
tmpfs:
- /root/.claude
- /tmpDiagnostic Tools
anet doctor
Comprehensive system health check:
anet doctorManual Checklist
# 1. Server health
curl http://localhost:9200/health
# 2. Valid auth
curl -H "Authorization: Bearer ntok_xxx" http://localhost:9200/api/status
# 3. Agents online
curl -H "Authorization: Bearer ntok_xxx" "http://localhost:9200/api/status?status=idle"
# 4. Database size
ls -lh ~/.commhub/commhub.db
# 5. SSE connection count
curl -H "Authorization: Bearer ntok_xxx" http://localhost:9200/api/statsLog Levels
Agent Node supports adjustable log levels:
// config.json
{
"flags": {
"logLevel": "debug" // debug / info / warn / error
}
}Still Having Issues?
- GitHub Issues: github.com/sleep2agi/agent-network/issues
- Source code: All error messages can be found in
server/src/tools.tsandserver/src/auth.ts