Troubleshooting Guide
Solve common OpenClaw issues.
Quick Diagnostics
Run the diagnostic command first:
bash
openclaw doctorThis checks:
- Node.js version
- OpenClaw version
- Configuration validity
- Provider connectivity
- Channel status
Common Issues
Gateway Won't Start
Symptoms:
openclaw gateway startfails- "Port already in use" error
Solutions:
- Check if port is in use:
bash
lsof -i :3000- Kill existing process:
bash
kill -9 <PID>- Use different port:
bash
export OPENCLAW_PORT=3001
openclaw gateway startBot Not Responding
Symptoms:
- Messages sent but no reply
- Gateway shows running
Solutions:
- Check channel status:
bash
openclaw channel status telegram- View channel logs:
bash
openclaw logs --channel telegram- Restart channel:
bash
openclaw channel restart telegram- Verify bot token is correct
API Key Errors
Symptoms:
- "Invalid API key" errors
- Authentication failures
Solutions:
- Verify key is set:
bash
echo $ANTHROPIC_API_KEY- Check config references:
bash
openclaw config get providers.anthropic- Regenerate key from provider dashboard
Rate Limiting
Symptoms:
- "Rate limit exceeded" errors
- Slow or failed responses
Solutions:
- Reduce message frequency
- Enable caching
- Upgrade API plan
- Use multiple providers
json
{
"providers": {
"fallback": {
"enabled": true,
"provider": "openai"
}
}
}Memory Issues
Symptoms:
- Slow performance
- Out of memory errors
Solutions:
- Clear old sessions:
bash
openclaw sessions clear --older-than 7d- Reduce history:
json
{
"sessions": {
"maxHistoryLength": 50
}
}- Restart regularly:
bash
openclaw gateway restartTool Execution Failures
Symptoms:
- Tools timeout
- Permission denied errors
Solutions:
- Check tool permissions:
bash
openclaw config get tools- Increase timeout:
json
{
"tools": {
"exec": {
"timeout": 60000
}
}
}- Verify file permissions
Discord Permission Errors
Symptoms:
- Bot can't send messages
- Missing permissions errors
Solutions:
- Check bot roles in server
- Enable required intents in Discord Developer Portal
- Re-invite bot with correct permissions
WhatsApp Webhook Issues
Symptoms:
- No messages received
- Webhook verification fails
Solutions:
- Verify webhook URL is publicly accessible
- Check SSL certificate
- Confirm verify token matches
Log Analysis
View Logs
bash
# All logs
openclaw logs
# Follow logs
openclaw logs --follow
# Filter by level
openclaw logs --level error
# Filter by channel
openclaw logs --channel telegram
# Export logs
openclaw logs --export > debug.logCommon Log Patterns
| Pattern | Meaning | Action |
|---|---|---|
ECONNREFUSED | Connection failed | Check network |
ETIMEDOUT | Request timeout | Increase timeout |
401 Unauthorized | Auth failed | Check API key |
429 Too Many Requests | Rate limited | Reduce frequency |
Reset & Recovery
Full Reset
bash
# Stop gateway
openclaw gateway stop
# Backup config
cp ~/.openclaw/config.json ~/config.backup.json
# Clear sessions
rm -rf ~/.openclaw/sessions/*
# Clear logs
rm -rf ~/.openclaw/logs/*
# Restart
openclaw gateway startRestore from Backup
bash
openclaw backup restore <backup-id>Getting Help
If issues persist:
Search Issues: Check GitHub Issues
Discord: Join our community
Debug Mode: Run with verbose logging:
bashOPENCLAW_LOG_LEVEL=debug openclaw gateway startReport Bug: Include:
- OpenClaw version
- Node.js version
- OS
- Relevant logs
- Steps to reproduce
Before Reporting
Try openclaw doctor first and include the output in your bug report!