This branch provides a complete solution for fixing RabbitMQ authentication issues in Revolt deployments, specifically addressing the "PLAIN login refused: user 'rabbituser' - invalid credentials" error that causes API and pushd services to crash.
The solution includes:
- Automated fix script for immediate resolution
- Diagnostic test suite for verification and troubleshooting
- Reference implementation showing proper configuration
- Comprehensive documentation covering multiple scenarios
- Quick-start guides for users needing urgent fixes
-
revolt-rabbitmq-credentials-fix.sh (5.0KB)
- Automated fix script
- Creates RabbitMQ user with correct credentials
- Updates environment configuration
- Provides post-fix instructions
- Usage:
./revolt-rabbitmq-credentials-fix.sh [directory]
-
test-rabbitmq-connection.sh (9.1KB)
- Comprehensive diagnostic test suite
- 10 automated tests covering all aspects
- Color-coded output for easy reading
- Provides actionable recommendations
- Usage:
./test-rabbitmq-connection.sh [directory]
-
README_RABBITMQ_FIX.md (8.9KB)
- Main entry point for the solution
- Overview of the problem and solutions
- Quick-start guides for different scenarios
- Navigation to all resources
- Best practices and security recommendations
-
QUICK_FIX_GUIDE.md (2.2KB)
- Immediate solutions for active issues
- Copy-paste commands for fast resolution
- Both automated and manual options
- Verification steps
- Designed for urgent troubleshooting
-
REVOLT_RABBITMQ_FIX.md (7.1KB)
- Detailed technical documentation
- Root cause analysis
- Multiple solution approaches
- Comprehensive troubleshooting guide
- Common issues and resolutions
- Security best practices
- docker-compose-rabbitmq-example.yml (5.8KB)
- Reference Docker Compose configuration
- Properly configured RabbitMQ service
- Environment variable examples
- Service dependencies and health checks
- Inline documentation and comments
- Security recommendations
1ce9da8 Update documentation to include test script references
d941ad0 Add comprehensive RabbitMQ connection test script
76c18be Add comprehensive README for RabbitMQ fix solution
69851e5 Add Docker Compose example with proper RabbitMQ configuration
f3fa707 Add quick fix guide for immediate troubleshooting
e0525f1 Add RabbitMQ credentials fix for Revolt deployment
- API (revolt-delta) and pushd services crash on startup
- RabbitMQ logs show: "PLAIN login refused: user 'rabbituser' - invalid credentials"
- Services restart continuously with error: "Connection reset by peer (os error 104)"
- RabbitMQ starts without the required user credentials
- Revolt services expect user 'rabbituser' with specific password
- Mismatch causes authentication failures
- Services panic and crash due to connection errors
- Revolt deployment fails to start properly
- Real-time messaging features unavailable
- Push notifications don't work
- API endpoints return errors
- Detects and creates RabbitMQ user
- Sets proper permissions automatically
- Updates .env file with credentials
- Provides clear next steps
- Handles edge cases (existing users, missing files)
- 10 comprehensive tests
- Container and service health checks
- User and permission validation
- Environment configuration verification
- Service connectivity testing
- Log analysis for recent errors
- Color-coded results
- Actionable recommendations
- Example docker-compose.yml with correct setup
- Environment variable documentation
- Healthcheck configurations
- Service dependency management
- Security hardening examples
- Multiple documentation levels (quick, detailed, comprehensive)
- Scenario-based guidance
- Troubleshooting flowcharts
- Security best practices
- Production deployment guide
Solution: Run automated fix script
./revolt-rabbitmq-credentials-fix.sh /opt/matrix-discord-killer
docker compose restart api pushd eventsSolution: Use reference configuration
cp docker-compose-rabbitmq-example.yml docker-compose.yml
# Edit and configure, then:
docker compose up -dSolution: Run test suite
./test-rabbitmq-connection.sh /opt/matrix-discord-killerThe solution has been designed to handle:
- ✅ Missing RabbitMQ user
- ✅ Incorrect user permissions
- ✅ Missing environment configuration
- ✅ Running containers (hot-fix)
- ✅ Fresh deployments (prevention)
- ✅ Multiple container naming schemes
- ✅ Docker Compose v1 and v2
- Credential redaction in logs and output
- .env file backup before modification
- Permission validation
- Secure default recommendations
- Password generation examples
- Production security checklist
- Environment file protection
- Secret management recommendations
- Network security guidance
- Works with existing Revolt deployments
- No breaking changes to configurations
- Optional .env file creation
- Preserves existing settings when possible
- Backward compatible with older Docker Compose
- Manual credential sync required if changing passwords
- Requires container access (Docker permissions needed)
- English-only documentation (translations welcome)
- Tested with RabbitMQ 4.x (may work with 3.x)
Potential improvements for future versions:
- Interactive credential setup wizard
- Multi-language support for documentation
- Integration with external secret managers
- Automated credential rotation
- Monitoring integration (Prometheus, etc.)
- Web-based diagnostic interface
-
Run the diagnostic test:
./test-rabbitmq-connection.sh
-
Check detailed logs:
docker compose logs --tail=100 api pushd rabbit -
Verify Docker network:
docker network inspect <network-name>
-
Complete restart:
docker compose down && docker compose up -d
| Issue | Solution | Reference |
|---|---|---|
| User exists but wrong password | Delete and recreate user | REVOLT_RABBITMQ_FIX.md |
| .env not being read | Add env_file to services | docker-compose-rabbitmq-example.yml |
| Network connectivity | Check Docker network config | REVOLT_RABBITMQ_FIX.md |
| Permissions denied | Grant full permissions | revolt-rabbitmq-credentials-fix.sh |
Contributions welcome! Areas for improvement:
- Additional test cases
- More language translations
- Platform-specific fixes (Windows, macOS)
- Integration with other deployment methods (Kubernetes, etc.)
- Additional example configurations
Provided as-is for the Revolt and open-source community.
- Revolt team for the self-hosted chat platform
- Community members reporting the RabbitMQ credential issue
- Contributors to the documentation and testing
- Created: 2026-02-14
- Branch: cursor/rabbitmq-connection-credentials-0f84
- Commits: 6
- Files Added: 6
- Total Lines: ~1,100+
- Status: ✅ Ready for Merge
Quick Links: