Python中文
首页
教程
问答
标签
搜索
登录
注册
Django/芹菜-芹菜状态:错误:在时间限制内没有响应节点
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我正在尝试在我的生产服务器中部署一个简单的芹菜示例,我遵循了芹菜网站中关于将芹菜作为守护进程运行的教程<a href="http://docs.celeryproject.org/en/latest/tutorials/daemonizing.html#daemonizing">http://docs.celeryproject.org/en/latest/tutorials/daemonizing.html#daemonizing</a>,并且在<strong>/etc/default/celleryd</strong></p> <pre> 1 # Name of nodes to start 2 # here we have a single node 3 CELERYD_NODES="w1" 4 # or we could have three nodes: 5 #CELERYD_NODES="w1 w2 w3" 6 7 # Where to chdir at start. 8 CELERYD_CHDIR="/home/audiwime/cidec_sw" 9 10 # Python interpreter from environment. 11 ENV_PYTHON="/usr/bin/python26" 12 13 # How to call "manage.py celeryd_multi" 14 CELERYD_MULTI="$ENV_PYTHON $CELERYD_CHDIR/manage.py celeryd_multi" 15 16 # # How to call "manage.py celeryctl" 17 CELERYCTL="$ENV_PYTHON $CELERYD_CHDIR/manage.py celeryctl" 18 19 # Extra arguments to celeryd 20 CELERYD_OPTS="--time-limit=300 --concurrency=8" 21 22 # Name of the celery config module. 23 CELERY_CONFIG_MODULE="celeryconfig" 24 25 # %n will be replaced with the nodename. 26 CELERYD_LOG_FILE="/var/log/celery/%n.log" 27 CELERYD_PID_FILE="/var/run/celery/%n.pid" 28 29 # Workers should run as an unprivileged user. 30 CELERYD_USER="audiwime" 31 CELERYD_GROUP="audiwime" 32 33 export DJANGO_SETTINGS_MODULE="cidec_sw.settings" </pre> <p>但如果我跑</p> <pre>celery status</pre> <p>在终点站,我得到了这样的回答:</p> <pre>Error: No nodes replied within time constraint</pre> <p>我可以通过<a href="https://github.com/celery/celery/tree/3.0/extra/generic-init.d/">https://github.com/celery/celery/tree/3.0/extra/generic-init.d/</a>中提供的芹菜脚本重新启动芹菜</p> <pre> /etc/init.d/celeryd restart celeryd-multi v3.0.12 (Chiastic Slide) > w1.one.cloudwime.com: DOWN > Restarting node w1.one.cloudwime.com: OK </pre> <p>我能跑</p> <pre>python26 manage.py celeryd -l info</pre> <p>我在django中的任务运行良好,但是如果让守护进程完成它的工作,我就不会得到任何结果,甚至不会在<strong>/var/log/celeriy/w1.log中出错</p> <p>我知道我的任务已经登记了因为我做了这个</p> <pre><code>from celery import current_app def call_celery_delay(request): print current_app.tasks run.delay(request.GET['age']) return HttpResponse(content="celery task set",content_type="text/html") </code></pre> <p>在我的任务出现的时候我得到了一本字典</p> <pre><code>{'celery.chain': <@task: celery.chain>, 'celery.chunks': <@task: celery.chunks>, 'celery.chord': <@task: celery.chord>, 'tasks.add2': <@task: tasks.add2>, 'celery.chord_unlock': <@task: celery.chord_unlock>, **'tareas.tasks.run': <@task: tareas.tasks.run>**, 'tareas.tasks.add': <@task: tareas.tasks.add>, 'tareas.tasks.test_two_minute': <@task: tareas.tasks.test_two_minute>, 'celery.backend_cleanup': <@task: celery.backend_cleanup>, 'celery.map': <@task: celery.map>, 'celery.group': <@task: celery.group>, 'tareas.tasks.test_one_minute': <@task: tareas.tasks.test_one_minute>, 'celery.starmap': <@task: celery.starmap>} </code></pre> <p>但除此之外,我什么也得不到,任务没有结果,日志没有错误,什么也得不到。 有人能告诉我怎么了吗? 你是我唯一的希望。。。</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>我解决了我的问题,这是一个非常简单的解决方案,但也是一个奇怪的解决方案: 我所做的是:</p> <pre><code>$ /etc/init.d/celerybeat restart $ /etc/init.d/celeryd restart $ service celeryd restart </code></pre> <p>我必须按照这个顺序来做,否则我会得到一个难看的错误:在时间限制内没有节点响应。</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
python语法错误(如果不在Z中,则在X中表示s)
6 回答
Python语法错误(无效)概率
3 回答
python语法错误*带有可选参数的args
6 回答
python语法错误2.5版有什么办法解决吗?
8 回答
Python语法错误2.7.4
1 回答
python语法错误30/09/2013
3 回答
Python语法错误E001
6 回答
Python语法错误not()op
6 回答
python语法错误outpu
3 回答
Python语法错误print len()
7 回答
python语法错误w3
6 回答
Python语法错误不是caugh
3 回答
python语法错误及yt-packag的使用
7 回答
python语法错误可以查出来!!瓦里亚布
1 回答
Python语法错误可能是缩进?
3 回答
Python语法错误和缩进
9 回答
Python语法错误在while循环中生成随机numb
3 回答
Python语法错误在哪里?
9 回答
python语法错误在尝试导入包时,但仅在远程运行时
2 回答
Python语法错误在电子邮件地址提取脚本中
10 回答