连接问题 - Celery/Django
漫漫长夜...我的第二个 Celery/RabbitMQ 设置无法运行。
步骤 1
sudo rabbitmq-server
运行:ok!
步骤 2
python manage.py celeryd -l info
错误:[2010-12-28 03:38:24,690: ERROR/MainProcess] CarrotListener:连接错误:套接字已关闭。 28秒后重试...
我肯定:
- 添加了rabbitmq用户和vhost
- 更新了Django设置。py
编辑:
我认为可能必须从.deb而不是apt-get安装。
卸载 deb 并安装 apt-get 版本后,我得到:
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error processing rabbitmq-server (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
我的解决方案:
apt-get --purge 删除rabbitmq-server
apt-get 安装rabbitmq-server
...没有评论...也许需要一些睡眠:)
关于如何调试这个有什么想法吗? :|
long night... can't get my second Celery/RabbitMQ setup run to work.
step 1
sudo rabbitmq-server
runs: ok!
step 2
python manage.py celeryd -l info
error: [2010-12-28 03:38:24,690: ERROR/MainProcess] CarrotListener: Connection Error: Socket closed. Trying again in 28 seconds...
I have definitely:
- added rabbitmq user and vhost
- updated the Django setings.py
Edit:
I think it might have to with installing from a .deb instead of apt-get.
After uninstalling the deb and installing the apt-get version I get this:
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error processing rabbitmq-server (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
My Solution:
apt-get --purge remove rabbitmq-server
apt-get install rabbitmq-server
...no comment...maybe need some sleep :)
Any ideas on how I could debug this? :|
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查您正在使用的 RabbitMQ 的不同版本,较新的版本具有新功能,并且可能与 Celery 不兼容。我的机器上有最新的 2.3.1 版本,从 RabbitMQ deb 安装,这可以正常工作,除非您需要使用 SSL,在这种情况下您必须安装更新版本的 Erlang/OTP,这很痛苦。
另外,最好使用 init 脚本来启动代理:
如果您从 init 脚本启动代理,如果问题仍然存在,您应该能够查看代理错误日志:
HTH。
Check the different versions of RabbitMQ that you're using, newer versions have new features and may be incompatible with Celery. I've got the latest 2.3.1 version on my machine, installed from the RabbitMQ deb, this works OK unless you need to use SSL in which case you have to install a more recent version of Erlang/OTP, which is painful.
Also, it's probably better to use the init script to start the broker:
If you start the broker from the init script you should be able to look at the broker error logs if the problem persists:
HTH.
我在安装rabbitmq-server和安装chef时确实遇到了这个问题。
我的解决方法以及该问题的解决方案如下。
然后添加。
这是您的主机名,如果不确定主机名,请运行以下命令:
结果是您的主机名。只需将其添加到您的 /etc/hosts 中,然后运行:
它就启动了。:)
这对我有用。
感谢您花时间阅读。:)
I did faced this issue while installing rabbitmq-server, while i was installing chef.
The work around for me and the solution to this problem is given as follows.
Then add.
Here is your hostname, if not sure about the hostname then run the following command:
the Result is your hostname. Just add that to your /etc/hosts and then run:
And it was started.:)
This worked for me.
Thanks for your time to read.:)