Troubleshooting
This guide helps you diagnose and resolve common issues when using Eve.
Authentication Issues
"Unauthorized" Error
Symptoms: API returns 401 status code with "Unauthorized" error.
Possible Causes:
- Expired token
- Check if your JWT token has expired
- Solution: Refresh your token or re-authenticate
- Missing Authorization header
- Ensure you're including the header: Authorization: Bearer
- Invalid credentials during login
- Verify username and password are correct
- Check for typos or extra whitespace
Diagnosis:
# Check token expiry (decode the payload)
echo "<your_token_payload>" | base64 -d | jq '.exp'
# Compare with current timestamp
date +%s"Forbidden" Error
Symptoms: API returns 403 status code.
Possible Causes:
- Insufficient access level
- You have a valid token but lack permission for the operation
- Solution: Request higher access level from an Admin
- Resource-specific restriction
- You may have organization access but not endpoint-specific access
- Solution: Ask Admin to grant access to the specific resource
Diagnosis:
# Check your resolved control-plane and data-plane access for an endpoint
curl http://{host}:8000/api/v1/iam/access/endpoints/{endpoint_id} \
-H "Authorization: Bearer $TOKEN"Connection Issues
"Connection Timeout"
Symptoms: Queries fail with connection timeout errors.
Possible Causes:
- Database server unreachable
- Network connectivity issues
- Firewall blocking connections
- Database server is down
- Incorrect connection URL
- Wrong host, port, or database name in endpoint config
Solutions:
- Verify the database server is running and accessible
- Check network connectivity between Eden and the database
- Verify the endpoint configuration
"Connection Pool Exhausted"
Symptoms: Requests fail with "connection pool exhausted" error.
Possible Causes:
- Too many concurrent requests
- Long-running queries holding connections
- Pool size too small for workload
Solutions:
- Contact your administrator to increase pool size
- Optimize long-running queries
- Implement connection retry logic with backoff
"Connection Refused"
Symptoms: Endpoint operations fail with connection refused.
Possible Causes:
- Database not running
- Wrong port number
- Database not accepting connections from Eden's IP
Solutions:
- Verify database server is running
- Check port configuration
- Ensure firewall rules allow connections
Query Errors
"SQL Syntax Error"
Symptoms: Query fails with syntax error message.
Possible Causes:
- Invalid SQL syntax
- Wrong parameter placeholder format
- Database-specific syntax issues
Solutions:
- Verify SQL syntax is correct
- Use
$1, $2, $3placeholders for PostgreSQL - Use
?placeholders for MySQL - Test query directly against database first
Example Fix:
# Wrong - string concatenation
{"query": "SELECT * FROM users WHERE id = 123"}
# Correct - parameterized
{"query": "SELECT * FROM users WHERE id = $1", "params": [123]}"Parameter Count Mismatch"
Symptoms: Query fails with "wrong number of parameters" error.
Possible Causes:
- Number of
paramsdoesn't match placeholders in query
Solution:
# Query has 3 placeholders, provide 3 params
{
"query": "SELECT * FROM users WHERE status = $1 AND role = $2 LIMIT $3",
"params": ["active", "admin", 10]
}"Column Not Found"
Symptoms: Query fails with "column does not exist" error.
Possible Causes:
- Typo in column name
- Wrong table schema
- Case sensitivity issues
Solutions:
- Verify column names match database schema
- Check table structure
- Use double quotes for case-sensitive identifiers in PostgreSQL
Transaction Errors
"Transaction Rolled Back"
Symptoms: Transaction fails and all operations are rolled back.
Possible Causes:
- Constraint violation in one of the operations
- Deadlock detected
- Timeout exceeded
Solutions:
- Check constraint definitions
- Ensure operations are ordered consistently to prevent deadlocks
- Break large transactions into smaller ones
"Deadlock Detected"
Symptoms: Transaction fails with deadlock error.
Possible Causes:
- Multiple transactions competing for the same resources in different orders
Solutions:
- Order operations consistently across transactions
- Use shorter transactions
- Implement retry logic with backoff
Template Errors
"Template Not Found"
Symptoms: Template execution fails with "not found" error.
Possible Causes:
- Typo in template ID
- Template doesn't exist in your organization
- Template was deleted
Solution:
# List available templates
curl http://{host}:8000/api/v1/templates \
-H "Authorization: Bearer $TOKEN""Missing Required Parameter"
Symptoms: Template execution fails with missing parameter error.
Possible Causes:
- Not providing all required parameters
Solution:
# Check template to see required parameters
curl http://{host}:8000/api/v1/templates/{template_id} \
-H "Authorization: Bearer $TOKEN""Handlebars Parsing Error"
Symptoms: Template fails with parsing error.
Possible Causes:
- Unclosed Handlebars expression
- Invalid Handlebars syntax
Solution:
- Check template syntax for unclosed
{{or}} - Verify conditional logic (
{{#if}}...{{/if}})
Performance Issues
Slow Queries
Symptoms: Queries take longer than expected.
Possible Causes:
- Missing indexes
- Large result sets
- Complex joins
- Database server under load
Solutions:
- Add LIMIT clauses to queries
- Use parameterized queries for query plan caching
- Work with DBA to add appropriate indexes
- Use templates for frequently executed queries
Rate Limiting
Symptoms: Receiving 429 "Too Many Requests" responses.
Possible Causes:
- Exceeding configured rate limits
Solutions:
- Implement backoff and retry logic
- Batch operations where possible
- Contact administrator for rate limit adjustments
Endpoint-Specific Issues
PostgreSQL
"SSL Required" Error:
- Database requires SSL but endpoint not configured for it
- Update endpoint config to include SSL parameters
"Role Does Not Exist" Error:
- Connection user doesn't exist in PostgreSQL
- Verify username in connection URL
MongoDB
"Authentication Failed" Error:
- Wrong credentials or auth database
- Verify connection string includes correct authSource
Redis
"NOAUTH Authentication Required" Error:
- Redis requires password but none provided
- Update endpoint config with password
Getting Help
If you can't resolve an issue:
- Gather information:
- Error message and status code
- Request body (without sensitive data)
- Timestamp of the issue
- Your access level
- Check API documentation:
- Swagger UI: http://{host}:8000/swagger-ui/
- Contact your administrator with the gathered information
Common Error Reference
| Error | Status | Common Cause |
|---|---|---|
| Unauthorized | 401 | Invalid/expired token |
| Forbidden | 403 | Insufficient permissions |
| Not Found | 404 | Resource doesn't exist |
| Bad Request | 400 | Invalid request format |
| Conflict | 409 | Resource already exists |
| Too Many Requests | 429 | Rate limit exceeded |
| Internal Server Error | 500 | Server-side issue |
Related
- Authentication - Token management
- RBAC - Access control
- Error Responses - Error codes
- FAQ - Common questions