Troubleshooting¶
This guide covers common issues you may encounter when running CodeTether Server and how to resolve them.
SSL/TLS Certificate Errors¶
"Unable to verify the first certificate"¶
This error occurs when connecting to the A2A server via SSE (Server-Sent Events) and the server uses a self-signed certificate or a certificate from an untrusted Certificate Authority.
Error message:
Causes:
- Self-signed certificate on the server
- Certificate signed by an internal/private CA
- Missing intermediate certificates in the certificate chain
- Expired or invalid certificate
Solutions¶
Option 1: Development/Testing Only - Disable Certificate Verification¶
Security Risk
This disables all certificate verification and should never be used in production environments.
Set the environment variable before starting your MCP client:
For MCP configuration files (e.g., VS Code, Cline, Claude Desktop):
{
"mcpServers": {
"a2a-server": {
"command": "npx",
"args": ["-y", "@anthropic/a2a-mcp-client"],
"env": {
"NODE_TLS_REJECT_UNAUTHORIZED": "0",
"A2A_SERVER_URL": "https://your-server:8080"
}
}
}
}
Option 2: Trust the Server Certificate (Recommended for Internal CAs)¶
If your server uses a self-signed certificate or internal CA, add it to your system's trusted certificates.
Step 1: Export the certificate
openssl s_client -connect your-server:443 -showcerts </dev/null 2>/dev/null \
| openssl x509 -outform PEM > server.crt
Step 2: Add to trusted certificates
Step 3: For Node.js applications
You can also specify the certificate directly:
Or in MCP configuration:
{
"mcpServers": {
"a2a-server": {
"command": "npx",
"args": ["-y", "@anthropic/a2a-mcp-client"],
"env": {
"NODE_EXTRA_CA_CERTS": "/path/to/server.crt",
"A2A_SERVER_URL": "https://your-server:8080"
}
}
}
}
Option 3: Use a Valid Certificate (Recommended for Production)¶
For production deployments, use a certificate from a trusted Certificate Authority:
- Let's Encrypt: Free, automated certificates via certbot
- Commercial CAs: DigiCert, Comodo, GlobalSign, etc.
See the Production Checklist for TLS configuration guidance.
Option 4: Fix Certificate Chain Issues¶
If you have a valid certificate but are missing intermediate certificates:
# Check the certificate chain
openssl s_client -connect your-server:443 -showcerts
# Combine certificates in correct order
cat your-cert.crt intermediate.crt root.crt > fullchain.crt
Ensure your server is configured to serve the full certificate chain.
Connection Errors¶
"Connection refused"¶
Causes:
- Server is not running
- Wrong port number
- Firewall blocking the connection
Solutions:
-
Verify the server is running:
-
Check the correct port in your configuration:
-
Check firewall rules:
"Connection timeout"¶
Causes:
- Network connectivity issues
- Server overloaded
- DNS resolution problems
Solutions:
-
Test basic connectivity:
-
Check DNS resolution:
-
Check server health and load
Authentication Errors¶
"401 Unauthorized"¶
Causes:
- Missing or invalid API token
- Expired token
- Incorrect authentication configuration
Solutions:
-
Verify your API token is set:
-
Check token validity in the server logs
-
Generate a new token if needed (see API Tokens)
"403 Forbidden"¶
Causes:
- Token lacks required permissions
- Resource access denied by policy
Solutions:
- Check the required permissions for the endpoint
- Verify your token's scope and permissions
- Contact your administrator for access
SSE Streaming Issues¶
Events not received¶
Causes:
- Proxy/load balancer buffering responses
- Connection timeout settings too low
- Network interruptions
Solutions:
-
Disable proxy buffering:
-
Increase timeout settings:
-
For AWS ALB, enable streaming:
Worker SSE Task Distribution Issues¶
Workers not receiving tasks via SSE¶
Causes:
- Missing or incorrect
X-Codebasesheader - Missing or incorrect
X-Capabilitiesheader - Worker not listening for
task_availableevent type - Codebase ID mismatch
Solutions:
-
Verify headers are sent correctly when connecting to SSE:
-
Ensure worker listens for the correct event type (
task_available): -
Check worker registration and codebase IDs match:
Global tasks not being received¶
Causes:
- Worker doesn't have a global codebase registered
- Task filtering logic not handling
codebase_id: "global"
Solutions:
- Ensure worker has a global codebase registered
- Update filtering to accept global tasks:
SSE connection drops frequently¶
Causes:
- Server heartbeat timeout
- Network instability
- Load balancer idle timeout
Solutions:
- Check heartbeat is being received (every 30s by default)
- Implement exponential backoff reconnection:
- Increase load balancer idle timeout
Worker logs show "Unknown SSE event type"¶
This is usually informational. The worker should handle these event types:
| Event Type | Description |
|---|---|
task_available |
New task available |
task |
Full task object |
task_assigned |
Task assigned to worker |
connected |
Connection confirmed |
keepalive |
Heartbeat signal |
Getting Help¶
If you're still experiencing issues:
- Check the server logs for detailed error messages
- Search existing issues on GitHub
- Open a new issue with:
- Error message and stack trace
- Server version (
codetether --version) - Environment details (OS, Node.js version)
- Steps to reproduce