Skip to Content
šŸš€ SpaceDF v2025.12.19 is now live! Read the release notes
TroubleshootingIssuesRabbitMQ: Existing setup with different credentials

RabbitMQ: Existing setup with different credentials

This issue occurs when a previous RabbitMQ setup already exists on the machine and was initialized with different credentials than the ones currently configured for SpaceDF.

Symptoms

  • SpaceDF services fail to start or keep restarting
  • Logs show RabbitMQ authentication errors such as:
    • ACCESS_REFUSED
    • authentication failed
  • Updating RABBITMQ_DEFAULT_USER or RABBITMQ_DEFAULT_PASS does not fix the issue

Cause

RabbitMQ stores credentials in persistent volumes on first startup.

If RabbitMQ was previously started with different credentials:

  • Updating environment variables alone is not enough
  • RabbitMQ will continue using the old credentials stored in volumes
  • This results in a credential mismatch between SpaceDF services and RabbitMQ

How to verify

Check if an existing RabbitMQ container or volume is present:

docker ps -a | grep rabbitmq
docker volume ls | grep rabbitmq

If RabbitMQ volumes exist, they may contain credentials from a previous setup.

Fix (reset RabbitMQ credentials)

This will remove all RabbitMQ data. Only assume safe in development or fresh setups.

Stop all SpaceDF services:

docker compose down

Remove existing RabbitMQ volumes:

docker volume rm <rabbitmq_volume_name>

Verify credentials in .env:

RABBITMQ_DEFAULT_USER=your_username RABBITMQ_DEFAULT_PASS=your_password

Restart SpaceDF:

docker compose up -d

RabbitMQ will be re-initialized using the new credentials.

Notes

  • Changing RabbitMQ credentials always requires resetting volumes
  • Do not reuse RabbitMQ credentials across projects on the same host
  • For production systems, plan credential changes carefully to avoid data loss
Last updated on