0

I have a django project with heroku with celery integrated. I've got the rabbitmq add-on through heroku and have tested my task locally to success. The issue I'm having is connecting my remote server to rabbitmq/cloudamqp.

I believe the credentials I'm using are the culprit of the problem, but I'm unsure where I'm going wrong. I'm using the credentials provided to me via the cloudamqp dashboard. This includes:

AMQP URL
User & Vhost
Password

In my settings.py I have:

CELERY_BROKER_URL= "amqp://{User}:{Password}@{AMQP URL}:5672/"

I've tried a variety of other forms with similar results. The latest error output is:

amqp.exceptions.AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.

Am I using the right credentials? Do I need to create a rabbitmq user through the command line and not the admin dashboard?

user3050491
  • 95
  • 4
  • 12
  • Ok really stupid mistake but I was grabbing the the AMQP url from the details in cloudamqp and then adding the user + password to the beginning. Didn't realize the password was already include din the AMQP URL so my formatting was off. Very stupid mistake. – user3050491 Apr 16 '20 at 15:45

1 Answers1

0

It seems that AMQP URL has all details (this is for service cloudamqp).

CELERY_BROKER_URL= "{AMQP URL}"
Anton Pomieshchenko
  • 2,051
  • 2
  • 10
  • 24
  • Thanks for the response! Unfortunately I still get the same result when concatenating on the vhost. Also noting that the user and vhost are the same (given in cloudamqp) – user3050491 Apr 16 '20 at 13:51
  • I just tested, registered node in cloudamqp. just use CELERY_BROKER_URL = '< AMQP URL>'. They have AMQP URL in their settings. For me it works perfectly fine – Anton Pomieshchenko Apr 16 '20 at 20:31
  • Yes, I appreciate you looking into that. It was a simple mistake on my part. Needed to step away and look at the simple things again. You can see in my comment to the question. Thanks again for your time. – user3050491 Apr 16 '20 at 20:58