Common Issues and Troubleshooting¶
This guide covers the most common issues encountered when using A2A Registry and their solutions.
Installation Issues¶
Issue: pip install a2a-registry
fails¶
Symptoms:
Solutions:
-
Check Python version:
-
Upgrade pip:
-
Install from source:
Issue: Import errors after installation¶
Symptoms:
Solutions:
-
Verify installation:
-
Check virtual environment:
-
Reinstall in clean environment:
Server Startup Issues¶
Issue: Server won't start¶
Symptoms:
Common Causes & Solutions:
-
Port already in use:
-
Permission denied:
-
Missing dependencies:
Issue: Server starts but can't connect¶
Symptoms:
Solutions:
-
Check bind address:
-
Verify server is running:
-
Check firewall settings:
Registration Issues¶
Issue: Agent registration fails¶
Symptoms:
Common Validation Errors:
-
Missing required fields:
# ❌ Incomplete agent card agent_card = { "name": "my-agent" # Missing required fields } # ✅ Complete agent card agent_card = { "name": "my-agent", "description": "My test agent", "url": "http://localhost:3000", "version": "0.420.0", "protocol_version": "0.3.0", "capabilities": { "streaming": False, "push_notifications": False, "state_transition_history": False }, "default_input_modes": ["text"], "default_output_modes": ["text"], "skills": [], "preferred_transport": "http" }
-
Invalid URL format:
-
Invalid skill format:
Issue: Duplicate agent registration¶
Symptoms:
Solutions:
-
Check existing registrations:
-
Unregister old agent:
-
Use unique agent names:
Discovery Issues¶
Issue: Can't find registered agents¶
Symptoms: - Agents register successfully but don't appear in search results - Empty responses from list/search endpoints
Solutions:
-
Verify agent is registered:
-
Check search criteria:
-
Case sensitivity issues:
Issue: Search returns unexpected results¶
Solutions:
- Understand search behavior:
- Query searches in name and description (case-insensitive)
- Skills must match exactly (case-sensitive)
-
Multiple criteria are AND-ed together
-
Debug search criteria:
# Test each criterion separately by_query = await client.search_agents(query="weather") by_skills = await client.search_agents(skills=["forecast"]) combined = await client.search_agents(query="weather", skills=["forecast"]) print(f"By query: {len(by_query)}") print(f"By skills: {len(by_skills)}") print(f"Combined: {len(combined)}")
Network and Connectivity Issues¶
Issue: Connection timeouts¶
Symptoms:
Solutions:
-
Increase timeout:
-
Check network connectivity:
-
Use retry logic:
Issue: DNS resolution problems¶
Symptoms:
Solutions:
-
Use IP addresses:
-
Check DNS configuration:
-
Add to hosts file (if using custom hostnames):
Performance Issues¶
Issue: Slow response times¶
Symptoms: - Registration takes several seconds - Search requests are slow - High memory usage
Solutions:
-
Monitor server resources:
-
Optimize agent card size:
# ❌ Excessive data agent_card = { "description": "Very long description..." * 1000, "skills": [{"id": f"skill{i}", "description": "..."} for i in range(1000)] } # ✅ Reasonable size agent_card = { "description": "Concise description", "skills": [ {"id": "main_skill", "description": "Primary functionality"} ] }
-
Limit search results:
Issue: Memory leaks¶
Symptoms: - Server memory usage keeps growing - Eventually crashes with OutOfMemory
Solutions:
-
Restart server periodically:
-
Monitor registrations:
-
Clean up old agents:
Development and Testing Issues¶
Issue: Tests fail with "connection refused"¶
Solutions:
-
Start test registry:
-
Use test client:
Issue: Import errors in development¶
Solutions:
-
Install in development mode:
-
Add to Python path:
Configuration Issues¶
Issue: Environment variables not loaded¶
Solutions:
-
Check environment variable names:
-
Use .env file:
-
Verify loading:
Logging and Debugging¶
Enable Debug Logging¶
import logging
# Enable debug logging
logging.basicConfig(level=logging.DEBUG)
# Or for specific logger
logger = logging.getLogger("a2a_registry")
logger.setLevel(logging.DEBUG)
Server Debug Mode¶
# Start server with debug logging
a2a-registry serve --log-level DEBUG
# Or with reload for development
a2a-registry serve --reload --log-level DEBUG
Client Debug Information¶
import aiohttp
import logging
# Enable aiohttp debug logging
logging.getLogger("aiohttp").setLevel(logging.DEBUG)
# Custom debug wrapper
class DebugRegistryClient(A2ARegistryClient):
async def _make_request(self, method, url, **kwargs):
print(f"Making {method} request to {url}")
print(f"Data: {kwargs.get('json')}")
response = await super()._make_request(method, url, **kwargs)
print(f"Response status: {response.status}")
print(f"Response data: {await response.text()}")
return response
Getting Help¶
Check Server Health¶
Expected response:
Collect Debug Information¶
# System info
python --version
pip list | grep -E "(a2a|fastapi|uvicorn)"
# Network info
netstat -an | grep 8000
curl -v http://localhost:8000/health
# Logs
journalctl -u a2a-registry # If running as service
Community Support¶
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Questions and community support
- Documentation - Complete documentation
Reporting Bugs¶
When reporting issues, please include:
- Environment information:
- Python version
- Operating system
-
Package versions
-
Steps to reproduce:
- Minimal code example
- Configuration used
-
Expected vs actual behavior
-
Logs and error messages:
- Full error tracebacks
- Server logs
- Network request/response details
Example bug report template:
**Environment:**
- Python: 3.9.7
- OS: Ubuntu 20.04
- a2a-registry: 0.1.5
**Issue:**
Agent registration fails with validation error
**Steps to reproduce:**
1. Start registry: `a2a-registry serve`
2. Register agent with code:
```python
# Code here
```
3. See error: `Validation error: ...`
**Expected behavior:**
Agent should register successfully
**Actual behavior:**
Gets validation error
**Logs:**
Next Steps¶
- Review Performance Tuning for optimization tips
- Check Logging and Monitoring for observability setup
- Explore Developer Guide for contribution guidelines