2012-11-27 32 views
8

मैं अपने उत्पादन सर्वर में अजवाइन का एक साधारण उदाहरण तैनात करने की कोशिश कर रहा हूं, मैंने अजवाइन के रूप में अजवाइन चलाने के बारे में अजवाइन वेबसाइट में ट्यूटोरियल का पालन किया है http://docs.celeryproject.org/en/latest/tutorials/daemonizing.html#daemonizing , और मैं /etc/default में कॉन्फ़िग फ़ाइल/celeryddjango/अजवाइन - अजवाइन की स्थिति: त्रुटि: कोई नोड्स समय बाधा के भीतर उत्तर दिया

 
    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" 

मिला लेकिन अगर मैं टर्मिनल में

celery status

चलाने के लिए, मैं इस प्रतिक्रिया मिली:

012,351,
Error: No nodes replied within time constraint

मैं मैं

python26 manage.py celeryd -l info

चला सकते हैं और Django में अपने कार्यों ठीक से चलाने के https://github.com/celery/celery/tree/3.0/extra/generic-init.d/

 
/etc/init.d/celeryd restart 
celeryd-multi v3.0.12 (Chiastic Slide) 
> w1.one.cloudwime.com: DOWN 
> Restarting node w1.one.cloudwime.com: OK 

में प्रदान की celeryd स्क्रिप्ट के माध्यम से अजवाइन पुनः आरंभ कर सकते, लेकिन अगर मैं जाने डेमॉन अपना कार्य करने मुझे कोई परिणाम नहीं मिलते हैं, /var/log/celery/w1.log

मुझे त्रुटियां भी नहीं मिलतीं क्योंकि मैं इस

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") 

किया मेरे कार्य पंजीकृत किया गया है और मैं जिसमें एक शब्दकोश मिल मेरे कार्य दिखाई

{'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>} 

लेकिन उस के अलावा मैं अपने काम में कोई त्रुटि से और कुछ नहीं मिलता है, कोई परिणाम लॉग, कुछ भी नहीं। क्या कोई मुझे बता सकता है कि क्या गलत हो सकता है? आप कर रहे हैं मेरी ही उम्मीद ...

उत्तर

-1

मैं मेरी समस्या हल है, यह एक बहुत ही सरल समाधान था, लेकिन यह भी एक अजीब से एक था: मैं क्या किया था:

$ /etc/init.d/celerybeat restart 
$ /etc/init.d/celeryd restart 
$ service celeryd restart 

मैं करना पड़ा यह उस क्रम में, दूसरी तरफ मुझे बदसूरत त्रुटि मिलेगी: कोई नोड्स समय बाधा के भीतर जवाब नहीं दिया।

+0

का उपयोग करके इसे पुनरारंभ करें, मुझे नहीं लगता कि आपको 'सेलेरीबीट' और 'सेलेरीड' दोनों की आवश्यकता है। आप 'सेलेरीड-बी' चला सकते हैं, जो वही है। मैं अभी भी बहुत उत्सुक हूं कि आपको 'सेवा सेलेरीड' कैसे मिला? (पीएस।मुझे अभी भी यह त्रुटि मिलती है) – Houman

+1

@ सहेजें यह त्रुटि मुख्य रूप से तब आती है जब सभी फ़ाइल अनुमतियां सही नहीं होतीं –

+0

@AkashDeshpande आपकी प्रतिक्रिया के लिए धन्यवाद। कृपया आप बहुत दयालु हो और इस पेस्ट पर नज़र डालें: http://pastebin.com/e3GK4eax इस प्रकार मैंने अनुमतियों को सेट अप किया है, क्या आप ऑर्डर के बाहर कुछ भी स्पष्ट देखते हैं? – Houman

1

समस्या का पता लगाने के लिए निम्न आदेश का उपयोग करें:

अजवाइन डॉक्स में उल्लेख किया है

C_FAKEFORK=1 sh -x /etc/init.d/celeryd start 

यह आमतौर पर होता है क्योंकि आपकी स्रोत परियोजना में समस्याओं (अनुमति के मुद्दों, सिंटेक्स त्रुटि आदि) कर रहे हैं: -

If the worker starts with “OK” but exits almost immediately afterwards and there is nothing in the log file, then there is probably an error but as the daemons standard outputs are already closed you’ll not be able to see them anywhere. For this situation you can use the C_FAKEFORK environment variable to skip the daemonization step

गुड लक

स्रोत: Celery Docs

0

इसकी वजह यह है कि अजवाइन डिमन शुरू नहीं हो सकता है। यह एक कारण है। तो कृपया इसे python manage.py celeryd --loglevel = INFO

संबंधित मुद्दे