Celery: linked task throws connection error -


i tried run simple task linked task mentioned in tutorial

add.apply_async((2, 2), link=add.s(16)) 

and got exception in worker process:

[2014-09-21 19:56:38,531: warning/worker-1] c:\python33\lib\site-packages\celery-3.1.15-  py3.3.egg\celery\app\trace.py:364: runtimewarning: exception raised outside body: oserror(connectionrefusederror(10061, 'no connection made because target machine actively refused it', none, 10061),): traceback (most recent call last):   file "c:\python33\lib\site-packages\kombu-3.0.23-py3.3.egg\kombu\utils\__init__.py", line 420, in __call__     return self.__value__ attributeerror: 'channelpromise' object has no attribute '__value__'  during handling of above exception, exception occurred:  traceback (most recent call last):   file "c:\python33\lib\site-packages\kombu-3.0.23-py3.3.egg\kombu\connection.py", line 436, in _ensured     return fun(*args, **kwargs)   file "c:\python33\lib\site-packages\kombu-3.0.23-py3.3.egg\kombu\messaging.py", line 173, in _publish     channel = self.channel   file "c:\python33\lib\site-packages\kombu-3.0.23-py3.3.egg\kombu\messaging.py", line 190, in _get_channel     channel = self._channel = channel()   file "c:\python33\lib\site-packages\kombu-3.0.23-py3.3.egg\kombu\utils\__init__.py", line 422, in __call__     value = self.__value__ = self.__contract__()   file "c:\python33\lib\site-packages\kombu-3.0.23-py3.3.egg\kombu\messaging.py", line 205, in <lambda>     channel = channelpromise(lambda: connection.default_channel)   file "c:\python33\lib\site-packages\kombu-3.0.23-py3.3.egg\kombu\connection.py", line 756, in default_channel     self.connection   file "c:\python33\lib\site-packages\kombu-3.0.23-py3.3.egg\kombu\connection.py", line 741, in connection     self._connection = self._establish_connection()   file "c:\python33\lib\site-packages\kombu-3.0.23-py3.3.egg\kombu\connection.py", line 696, in _establish_connection     conn = self.transport.establish_connection()   file "c:\python33\lib\site-packages\kombu-3.0.23-py3.3.egg\kombu\transport\pyamqp.py", line 112, in establish_connection     conn = self.connection(**opts)   file "c:\python33\lib\site-packages\amqp-1.4.6-py3.3.egg\amqp\connection.py", line 165, in __init__     self.transport = self.transport(host, connect_timeout, ssl)   file "c:\python33\lib\site-packages\amqp-1.4.6-py3.3.egg\amqp\connection.py", line 186, in transport     return create_transport(host, connect_timeout, ssl)   file "c:\python33\lib\site-packages\amqp-1.4.6-py3.3.egg\amqp\transport.py", line 299, in create_transport     return tcptransport(host, connect_timeout)   file "c:\python33\lib\site-packages\amqp-1.4.6-py3.3.egg\amqp\transport.py", line 95, in __init__     raise socket.error(last_err) oserror: [winerror 10061] no connection made because target machine actively refused 

i did brief debugging in transport.py , found worker trying connect port 5672 on localhost. seems worker thinks linked task needs executed via local rabbitmq instance. weird because specified remote rabbitmq broker in configuration setting. setting works if run async call without linked task:

add.apply_async((2, 2)) 

here setup:

  1. use rabbitmq broker , redis results end on remote windows server
  2. run test client on windows 7 machine

can shed light? thanks.

by default celry try cennect amqp://localhost (rabbitmq server) prof link before run tasks should install rabbitmq server or configure celery use redis or broker. install:

sudo apt-get install rabbitmq-server 

should fix issue.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -