【问题标题】:django-celery-email with rabbitMQ - Cannot connect. Socket closed带有 rabbitMQ 的 django-celery-email - 无法连接。插座关闭
【发布时间】:2013-01-15 19:39:20
【问题描述】:

我尝试使用 django-celery-email。我用的是rabbitMQ

如果我跑步:python manage.py celeryd -l info

我有这些错误:

(job)user@user-R520-R522-R620:~/Pulpit/job/dp$ python manage.py celeryd -l info
/home/user/Pulpit/job/local/lib/python2.7/site-packages/celery/utils/__init__.py:71: CPendingDeprecationWarning: 
    The 'BROKER_HOST' setting is scheduled for deprecation in     version 2.5 and removal in version v4.0.     BROKER_URL

  warnings.warn(w)
/home/user/Pulpit/job/local/lib/python2.7/site-packages/celery/utils/__init__.py:71: CPendingDeprecationWarning: 
    The 'BROKER_USER' setting is scheduled for deprecation in     version 2.5 and removal in version v4.0.     BROKER_URL

  warnings.warn(w)
/home/user/Pulpit/job/local/lib/python2.7/site-packages/celery/utils/__init__.py:71: CPendingDeprecationWarning: 
    The 'BROKER_PASSWORD' setting is scheduled for deprecation in     version 2.5 and removal in version v4.0.     BROKER_URL

  warnings.warn(w)
/home/user/Pulpit/job/local/lib/python2.7/site-packages/celery/utils/__init__.py:71: CPendingDeprecationWarning: 
    The 'BROKER_PORT' setting is scheduled for deprecation in     version 2.5 and removal in version v4.0.     BROKER_URL

  warnings.warn(w)
/home/user/Pulpit/job/local/lib/python2.7/site-packages/celery/utils/__init__.py:71: CPendingDeprecationWarning: 
    The 'BROKER_VHOST' setting is scheduled for deprecation in     version 2.5 and removal in version v4.0.     BROKER_URL

  warnings.warn(w)

 -------------- celery@user-R520-R522-R620 v3.0.13 (Chiastic Slide)
---- **** ----- 
--- * ***  * -- [Configuration]
-- * - **** --- . broker:      amqp://ruser@localhost:5672//
- ** ---------- . app:         default:0xa8dfb2c (djcelery.loaders.DjangoLoader)
- ** ---------- . concurrency: 2 (processes)
- ** ---------- . events:      OFF (enable -E to monitor this worker)
- ** ---------- 
- *** --- * --- [Queues]
-- ******* ---- . celery:      exchange:celery(direct) binding:celery
--- ***** ----- 

[Tasks]
  . djcelery_email.tasks.SendEmailTask

[2013-01-15 20:31:23,718: WARNING/MainProcess] celery@user-R520-R522-R620 ready.
[2013-01-15 20:31:26,735: ERROR/MainProcess] consumer: Cannot connect to amqp://ruser@127.0.0.1:5672//: Socket closed.
Trying again in 2.00 seconds...

[2013-01-15 20:31:31,746: ERROR/MainProcess] consumer: Cannot connect to amqp://ruser@127.0.0.1:5672//: Socket closed.
Trying again in 4.00 seconds...

在哪里可以找到错误?

【问题讨论】:

    标签: python django celery


    【解决方案1】:

    您的 RabbitMQ 实例似乎没有运行 - 这就是您在错误日志中看到 consumer: Cannot connect to amqp://ruser@127.0.0.1:5672//: Socket closed. 的原因。您的RabbitMQ 实例是否在127.0.0.1:5672 上运行并接受连接?

    【讨论】:

      猜你喜欢
      • 2014-09-28
      • 1970-01-01
      • 1970-01-01
      • 2011-12-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-20
      • 1970-01-01
      相关资源
      最近更新 更多