i try to start multiple workers with celery multi and celery beat simultaneously.
I start the workers as daemon with this command:
celery multi start 2 -A djangoproj -Q:1 longtaskqueue -Q:2 shorttaskqueue -c:1 1 -c:2 1
Now if i start the beat as daemon with:
celery multi start -A djangoproj workerbeat1 --beat
the workers crash with this error in the log file:
[2019-11-06 13:00:51,641: WARNING/MainProcess] /usr/local/lib/python3.7/dist-packages/celery/fixups/django.py:202: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments!
warnings.warn('Using settings.DEBUG leads to a memory leak, never '
[2019-11-06 13:01:16,722: ERROR/MainProcess] Control command error: OperationalError("\nCannot route message for exchange 'reply.celery.pidbox': Table empty or key no longer exists.\nProbably the key ('_kombu.binding.reply.celery.pidbox') has been removed from the Redis database.\n")
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/kombu/connection.py", line 439, in _reraise_as_library_errors
yield
File "/usr/local/lib/python3.7/dist-packages/kombu/connection.py", line 518, in _ensured
return fun(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/kombu/messaging.py", line 203, in _publish
mandatory=mandatory, immediate=immediate,
File "/usr/local/lib/python3.7/dist-packages/kombu/transport/virtual/base.py", line 605, in basic_publish
message, exchange, routing_key, **kwargs
File "/usr/local/lib/python3.7/dist-packages/kombu/transport/virtual/exchange.py", line 70, in deliver
for queue in _lookup(exchange, routing_key):
File "/usr/local/lib/python3.7/dist-packages/kombu/transport/redis.py", line 877, in _lookup
exchange, redis_key))
kombu.exceptions.InconsistencyError:
Cannot route message for exchange 'reply.celery.pidbox': Table empty or key no longer exists.
Probably the key ('_kombu.binding.reply.celery.pidbox') has been removed from the Redis database.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/celery/worker/pidbox.py", line 46, in on_message
self.node.handle_message(body, message)
File "/usr/local/lib/python3.7/dist-packages/kombu/pidbox.py", line 145, in handle_message
return self.dispatch(**body)
File "/usr/local/lib/python3.7/dist-packages/kombu/pidbox.py", line 115, in dispatch
ticket=ticket)
File "/usr/local/lib/python3.7/dist-packages/kombu/pidbox.py", line 151, in reply
serializer=self.mailbox.serializer)
File "/usr/local/lib/python3.7/dist-packages/kombu/pidbox.py", line 285, in _publish_reply
**opts
File "/usr/local/lib/python3.7/dist-packages/kombu/messaging.py", line 181, in publish
exchange_name, declare,
File "/usr/local/lib/python3.7/dist-packages/kombu/connection.py", line 551, in _ensured
errback and errback(exc, 0)
File "/usr/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.7/dist-packages/kombu/connection.py", line 444, in _reraise_as_library_errors
sys.exc_info()[2])
File "/usr/local/lib/python3.7/dist-packages/vine/five.py", line 194, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.7/dist-packages/kombu/connection.py", line 439, in _reraise_as_library_errors
yield
File "/usr/local/lib/python3.7/dist-packages/kombu/connection.py", line 518, in _ensured
return fun(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/kombu/messaging.py", line 203, in _publish
mandatory=mandatory, immediate=immediate,
File "/usr/local/lib/python3.7/dist-packages/kombu/transport/virtual/base.py", line 605, in basic_publish
message, exchange, routing_key, **kwargs
File "/usr/local/lib/python3.7/dist-packages/kombu/transport/virtual/exchange.py", line 70, in deliver
for queue in _lookup(exchange, routing_key):
File "/usr/local/lib/python3.7/dist-packages/kombu/transport/redis.py", line 877, in _lookup
exchange, redis_key))
kombu.exceptions.OperationalError:
Cannot route message for exchange 'reply.celery.pidbox': Table empty or key no longer exists.
Probably the key ('_kombu.binding.reply.celery.pidbox') has been removed from the Redis database.
My celery config in django looks like this:
djangoproj/djangoproj/settings.py:
CELERY_BROKER_URL = 'redis://localhost:6379'
CELERY_RESULT_BACKEND = 'redis://localhost:6379'
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TASK_SERIALIZER = 'json'
CELERY_TIMEZONE = 'Europe/Berlin'
CELERY_TASK_QUEUES = (
Queue('shorttaskqueue', Exchange('shorttaskqueue'), routing_key='shorttaskqueue'),
Queue('longtaskqueue', Exchange('longtaskqueue'), routing_key='longtaskqueue'),
)
CELERY_ROUTES = {
'api.tasks.shorttaskqueue': {'queue': 'shorttaskqueue'},
'api.tasks.longtaskqueue': {'queue': 'longtaskqueue'},
}
I use Redis 5.0.3, Django 2.2.3 and Celery 4.3.0.
Why it crashes and is there a way to start one beat and multiple workers with one command?
Thanks for help!
Related
I am currently going through 'The Definitive Guide to Celery and Django' course by testdriven.io. I've managed to containerize the whole application. Everything was built correctly and seemed to work just fine, but when I tried to enter the Django shell and run a task, to ensure everything works correctly, the following error appeared.
>>> divide.delay(1, 2)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/kombu/utils/functional.py", line 30, in __call__
return self.__value__
AttributeError: 'ChannelPromise' object has no attribute '__value__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 446, in _reraise_as_library_errors
yield
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 433, in _ensure_connection
return retry_over_time(
File "/usr/local/lib/python3.10/site-packages/kombu/utils/functional.py", line 312, in retry_over_time
return fun(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 877, in _connection_factory
self._connection = self._establish_connection()
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 812, in _establish_connection
conn = self.transport.establish_connection()
File "/usr/local/lib/python3.10/site-packages/kombu/transport/pyamqp.py", line 201, in establish_connection
conn.connect()
File "/usr/local/lib/python3.10/site-packages/amqp/connection.py", line 323, in connect
self.transport.connect()
File "/usr/local/lib/python3.10/site-packages/amqp/transport.py", line 129, in connect
self._connect(self.host, self.port, self.connect_timeout)
File "/usr/local/lib/python3.10/site-packages/amqp/transport.py", line 184, in _connect
self.sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/celery/app/task.py", line 425, in delay
return self.apply_async(args, kwargs)
File "/usr/local/lib/python3.10/site-packages/celery/app/task.py", line 575, in apply_async
return app.send_task(
File "/usr/local/lib/python3.10/site-packages/celery/app/base.py", line 788, in send_task
amqp.send_task_message(P, name, message, **options)
File "/usr/local/lib/python3.10/site-packages/celery/app/amqp.py", line 510, in send_task_message
ret = producer.publish(
File "/usr/local/lib/python3.10/site-packages/kombu/messaging.py", line 177, in publish
return _publish(
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 523, in _ensured
return fun(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/kombu/messaging.py", line 186, in _publish
channel = self.channel
File "/usr/local/lib/python3.10/site-packages/kombu/messaging.py", line 209, in _get_channel
channel = self._channel = channel()
File "/usr/local/lib/python3.10/site-packages/kombu/utils/functional.py", line 32, in __call__
value = self.__value__ = self.__contract__()
File "/usr/local/lib/python3.10/site-packages/kombu/messaging.py", line 225, in <lambda>
channel = ChannelPromise(lambda: connection.default_channel)
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 895, in default_channel
self._ensure_connection(**conn_opts)
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 432, in _ensure_connection
with ctx():
File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 450, in _reraise_as_library_errors
raise ConnectionError(str(exc)) from exc
kombu.exceptions.OperationalError: [Errno 111] Connection refused
I've done a quick research and in most cases it seemed to be a lack of the following lines
from config.celery import app as celery_app
__all__ = ['celery_app']
in the config.__init__.py, but it's clearly not an issue here.
I also double checked whether redis container is up and listening on port 6379.
The only difference between my code and the course code is that I decided to use Poetry package manager instead of requirements.txt file and pip.
At this point I am a little bit confused I'll be thankful for any tip. You can find the whole code below:
https://github.com/Kibraks/django-celery-app
I have an API app running Django. I have 2 containers,
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5620d232e96c django_worker:v1 "/bin/bash" 4 days ago Up 4 days drunk_goldberg
eeb5b0e8dbce django_main:v1 "./main.sh" 4 days ago Up 4 days 0.0.0.0:8000->8000/tcp sick_almeida
Both host the same code base. The main is exposing the API, The other is running the celery worker via the command,
su -m celery -c "celery --app=XXX.celery:app worker -Q ${QUEUE} --loglevel=INFO --autoscale=10,3"
The Django settings file in both containers is,
BROKER_URL = 'redis://10.1.1.8:6379/0'
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
However in the main container i get the error,
ERROR:XXX.views:Exception Raised:
Traceback (most recent call last):
File "/opt/XXX/XXX/views.py", line 169, in upgrade
ABC.delay(username,password,ip,device,manifest,peer_ip)
File "/usr/local/lib/python2.7/dist-packages/celery/app/task.py", line 453, in delay
return self.apply_async(args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/celery/app/task.py", line 560, in apply_async
**dict(self._get_exec_options(), **options)
File "/usr/local/lib/python2.7/dist-packages/celery/app/base.py", line 354, in send_task
reply_to=reply_to or self.oid, **options
File "/usr/local/lib/python2.7/dist-packages/celery/app/amqp.py", line 305, in publish_task
**kwargs
File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 172, in publish
routing_key, mandatory, immediate, exchange, declare)
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 457, in _ensured
interval_max)
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 369, in ensure_connection
interval_start, interval_step, interval_max, callback)
File "/usr/local/lib/python2.7/dist-packages/kombu/utils/__init__.py", line 243, in retry_over_time
return fun(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 237, in connect
return self.connection
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 741, in connection
self._connection = self._establish_connection()
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 696, in _establish_connection
conn = self.transport.establish_connection()
File "/usr/local/lib/python2.7/dist-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
conn = self.Connection(**opts)
File "/usr/local/lib/python2.7/dist-packages/amqp/connection.py", line 165, in __init__
self.transport = self.Transport(host, connect_timeout, ssl)
File "/usr/local/lib/python2.7/dist-packages/amqp/connection.py", line 186, in Transport
return create_transport(host, connect_timeout, ssl)
File "/usr/local/lib/python2.7/dist-packages/amqp/transport.py", line 299, in create_transport
return TCPTransport(host, connect_timeout)
File "/usr/local/lib/python2.7/dist-packages/amqp/transport.py", line 95, in __init__
raise socket.error(last_err)
error: [Errno 111] Connection refused
Now if I test the connection from the main container its fine.
Any ideas ?
I know the title is a little ambiguous and I'd only ever ask here if it wasn't a last resort - but I am stuck. I've pulled down a Django project from my work repo that is rather ancient (we're talking 1.13), and I've been tasked with bringing it into 1.9. Okay, fair enough.
I've loaded the database from a MySQL dump and faked the migrations just fine. However, when I run the server, I get hit with this:
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py", line 256, in __init__
(code, msg) = self.connect(host, port)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py", line 316, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py", line 291, in _get_socket
return socket.create_connection((host, port), timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 575, in create_connection
raise err
error: [Errno 60] Operation timed out
At first, I had no idea what was going on here, but from the look of it, SMTP is throwing this exception - probably due to the mailing server not being accessible. Any how, I can't even get print statements to show up in settings.py, and so have no idea where to even start to trace this problem through.
Any guidance would be lovely.
EDIT: Here is the new error:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/Users/krisvukasinovic/.virtualenvs/give2gether/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 63, in __call__
return self.application(environ, start_response)
File "/Users/krisvukasinovic/.virtualenvs/give2gether/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 177, in __call__
response = self.get_response(request)
File "/Users/krisvukasinovic/.virtualenvs/give2gether/lib/python2.7/site-packages/django/core/handlers/base.py", line 230, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/Users/krisvukasinovic/.virtualenvs/give2gether/lib/python2.7/site-packages/django/core/handlers/base.py", line 284, in handle_uncaught_exception
'request': request
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 1191, in error
self._log(ERROR, msg, args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 1284, in _log
self.handle(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 1294, in handle
self.callHandlers(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 1334, in callHandlers
hdlr.handle(record)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 757, in handle
self.emit(record)
File "/Users/krisvukasinovic/.virtualenvs/give2gether/lib/python2.7/site-packages/django/utils/log.py", line 117, in emit
self.send_mail(subject, message, fail_silently=True, html_message=html_message)
File "/Users/krisvukasinovic/.virtualenvs/give2gether/lib/python2.7/site-packages/django/utils/log.py", line 120, in send_mail
mail.mail_admins(subject, message, *args, connection=self.connection(), **kwargs)
File "/Users/krisvukasinovic/.virtualenvs/give2gether/lib/python2.7/site-packages/django/core/mail/__init__.py", line 97, in mail_admins
mail.send(fail_silently=fail_silently)
File "/Users/krisvukasinovic/.virtualenvs/give2gether/lib/python2.7/site-packages/django/core/mail/message.py", line 292, in send
return self.get_connection(fail_silently).send_messages([self])
File "/Users/krisvukasinovic/.virtualenvs/give2gether/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 100, in send_messages
new_conn_created = self.open()
File "/Users/krisvukasinovic/.virtualenvs/give2gether/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 58, in open
self.connection = connection_class(self.host, self.port, **connection_params)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py", line 256, in __init__
(code, msg) = self.connect(host, port)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py", line 316, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py", line 291, in _get_socket
return socket.create_connection((host, port), timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 575, in create_connection
raise err
error: [Errno 61] Connection refused
As you know, the error you were getting is because your logger was set up to send emails whenever you received an error. The problem being that your development environment doesn't have access to the mail server that this logger relies on.
What happens is django then raises this new error and the actual error gets hidden away.
The actual solution to this is to create a separate settings.py file for development, that way you don't need to worry about the mail server not being there, nor (I expect) would you really care.
When running runserver you can then specify this settings file with
runserver --settings=mysettings
For completeness, heres a very simple development settings.py file
from myapp.settings import *
print 'DEV'
DEBUG = True
# INSTALLED_APPS += ['debug_toolbar']
# MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware']
I have a Django + Celery setup working correctly in production with RabbitMQ.
AFAIK, it should be sufficient to set CELERY_ALWAYS_EAGER to True in django settings locally, to avoid setting up RabbitMQ for development. I have done this but when calling .delay() on a task I get:
Traceback (most recent call last):
File "lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
return handler(request, *args, **kwargs)
File "lib/python2.7/site-packages/django/views/generic/edit.py", line 215, in post
return self.form_valid(form)
File "app/web/views.py", line 188, in form_valid
form.send_email()
File "app/web/forms.py", line 17, in send_email
send_email.delay(mail, recipients, 'Contact %s' % name, comment)
File "lib/python2.7/site-packages/celery/app/task.py", line 453, in delay
return self.apply_async(args, kwargs)
File "lib/python2.7/site-packages/celery/app/task.py", line 559, in apply_async
**dict(self._get_exec_options(), **options)
File "lib/python2.7/site-packages/celery/app/base.py", line 353, in send_task
reply_to=reply_to or self.oid, **options
File "lib/python2.7/site-packages/celery/app/amqp.py", line 305, in publish_task
**kwargs
File "lib/python2.7/site-packages/kombu/messaging.py", line 172, in publish
routing_key, mandatory, immediate, exchange, declare)
File "lib/python2.7/site-packages/kombu/connection.py", line 457, in _ensured
interval_max)
File "lib/python2.7/site-packages/kombu/connection.py", line 369, in ensure_connection
interval_start, interval_step, interval_max, callback)
File "lib/python2.7/site-packages/kombu/utils/__init__.py", line 243, in retry_over_time
return fun(*args, **kwargs)
File "lib/python2.7/site-packages/kombu/connection.py", line 237, in connect
return self.connection
File "lib/python2.7/site-packages/kombu/connection.py", line 741, in connection
self._connection = self._establish_connection()
File "lib/python2.7/site-packages/kombu/connection.py", line 696, in _establish_connection
conn = self.transport.establish_connection()
File "lib/python2.7/site-packages/kombu/transport/librabbitmq.py", line 123, in establish_connection
conn = self.Connection(**opts)
File "lib/python2.7/site-packages/librabbitmq/__init__.py", line 199, in __init__
self.connect()
ConnectionError: Error opening socket: a socket error occurred
For the record, since celery 4.0 this setting has been renamed to task_always_eager:
# setting renamed on celery 4.0
CELERY_ALWAYS_EAGER --> task_always_eager
To help the migration to this version, Celery provides the following util to update automatically your settings:
# --django allows to keep uppercase settings and CELERY_ prefix
$ celery upgrade settings proj/settings.py --django
So I have found the problem. Basically I was missing:
from .celery import app as celery_app
in proj/proj/__init__.py
For some misterious reason this seems to fail only when running runserver and not when running wsgi.py via uWSGI. Not sure why, but with the import it works on runserver too.
i upgraded my celery from 2.4.X to celery-2.5.2, then modified the Broker_URL to be
BROKER_TRANSPORT = "sqlalchemy"
BROKER_URL = "sqla+mysql://root:root#localhost:3306/db"
this config can be referred via the page of http://docs.celeryproject.org/en/latest/getting-started/brokers/sqlalchemy.html#broker-sqlalchemy
the Celery process can be started successfully, but whan i call .delay or apply_async the process will throw out exception KeyError: 'No such transport: mysql'
i have no idea about this.. looks like everything should be right.
Traceback
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\Python27\lib\site-packages\celery-2.5.2-py2.7.egg\celery\app\task\__init__.py", line 353, in delay
return self.apply_async(args, kwargs)
File "C:\Python27\lib\site-packages\celery-2.5.2-py2.7.egg\celery\app\task\__init__.py", line 449, in apply_async
publish = publisher or self.app.amqp.publisher_pool.acquire(block=True)
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 625, in acquire
R = self.prepare(R)
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\pools.py", line 55, in prepare
p = p()
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\pools.py", line 46, in <lambda>
return lambda: self.create_producer()
File "C:\Python27\lib\site-packages\celery-2.5.2-py2.7.egg\celery\app\amqp.py", line 265, in create_producer
pub = self.app.amqp.TaskPublisher(conn, auto_declare=False)
File "C:\Python27\lib\site-packages\celery-2.5.2-py2.7.egg\celery\app\amqp.py", line 328, in TaskPublisher
return TaskPublisher(*args, **self.app.merge(defaults, kwargs))
File "C:\Python27\lib\site-packages\celery-2.5.2-py2.7.egg\celery\app\amqp.py", line 158, in __init__
super(TaskPublisher, self).__init__(*args, **kwargs)
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\compat.py", line 61, in __init__
super(Publisher, self).__init__(connection, self.exchange, **kwargs)
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\messaging.py", line 69, in __init__
channel = channel.default_channel
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 556, in default_channel
self.connection
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 549, in connection
self._connection = self._establish_connection()
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 509, in _establish_connection
conn = self.transport.establish_connection()
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 569, in transport
self._transport = self.create_transport()
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 324, in create_transport
return self.get_transport_cls()(client=self)
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\connection.py", line 331, in get_transport_cls
transport_cls = get_transport_cls(transport_cls)
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\transport__init__.py", line 94, in get_transport_cls
_transport_cache[transport] = _get_transport_cls(transport)
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\transport\__init__.py", line 75, in _get_transport_cls
transport_module_name, transport_cls_name = resolve_transport(transport)
File "C:\Python27\lib\site-packages\kombu-2.1.5-py2.7.egg\kombu\transport\__init__.py", line 70, in resolve_transport
raise KeyError("No such transport: %s" % (transport, ))
KeyError: 'No such transport: mysql'
After some debugging I've tracked this down to the version of kombu being installed. Kombu 2.1.5 was released on April 13th and does not appear to be compatible. I was able to resolve this issue by explicitly degrading to version 2.1.3.