Below is the config im using
[core]
# The home folder for airflow, default is ~/airflow
airflow_home = /root/airflow
# The folder where your airflow pipelin
Without knowing what version of Airflow you are running and how you have configured your rabbitmq-server, it is somewhat difficult to answer your question with surety. However, I can offer some things for you to look into.
Here is the Celery documentation for specifying a broker URL. The broker URL in your airflow.cfg
does not specify a virtual host, so per the documentation the default virtual host will be used. I did some digging but could not find what the default virtual host for pyampq is, but this is worth looking in to.
Alternatively, you could explicitly configure a virtual host using rabbitmqctl
. Here is a post where someone lays out how to do this with Airflow. I have copy and pasted the relevant information below:
# Configure RabbitMQ: create user and grant privileges
rabbitmqctl add_user rabbitmq_user_name rabbitmq_password
rabbitmqctl add_vhost rabbitmq_virtual_host_name
rabbitmqctl set_user_tags rabbitmq_user_name rabbitmq_tag_name
rabbitmqctl set_permissions -p rabbitmq_virtual_host_name rabbitmq_user_name ".*" ".*" ".*"
Finally, you may be running into an issue with the Celery version you are using. At time of posting, Celery 4.X.X does not play nicely with Airflow. Try uninstalling Celery and reinstalling a version that works.
pip uninstall celery
pip install celery==3.1.7