AttributeError: 'module' object has no attribute 'getrlimit'手動で(python manage.py celeryd_multi...)またはinit.dを介してデーモンとしてceleryd_multiを起動しようとすると、が表示されます。
- 手動でセロリドをうまく始めることができます
python manage.py celeryd - / etc / default / celeryd
CELERYD_MULTIを取り出すと、次のエラーでクラッシュします。usr/bin/python: No module named celery.__main__; 'celery' is a package and cannot be directly executed - celeryd_multiを手動で開始すると、「getrlimit」属性エラーも発生します
これは私の/etc/ default /celerydファイルがどのように見えるかです:
CELERYD_NODES="w1"
CELERYD_CHDIR="/code/project"
CELERYD_MULTI="python $CELERYD_CHDIR/manage.py celeryd_multi"
CELERYCTL="$CELERYD_CHDIR/manage.py celeryctl"
CELERYD_OPTS="--time-limit=300 --concurrency=8"
CELERY_CONFIG_MODULE="celeryconfig"
CELERYD_LOG_FILE="/var/log/celery/celeryd.log"
CELERYD_PID_FILE="/var/run/celery/celeryd.pid"
CELERYD_USER="celery"
CELERYD_GROUP="celery"
export DJANGO_SETTINGS_MODULE="project.settings"
以下はスタックトレースです。
>ノードを開始しています...
> w1.ip-10-28-232-109:OK
ubuntu @ ip-10-28-232-109:〜$トレースバック(最後の最後の呼び出し):
ファイル"/code/project/manage.py"、行14、
execute_manager(設定)
execute_managerのファイル「/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py」、438行目
Utility.execute()
ファイル"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py"、行379、実行中
self.fetch_command(subcommand).run_from_argv(self.argv)
run_from_argvのファイル"/usr/local/lib/python2.7/dist-packages/djcelery/management/commands/celeryd_detach.py"、26行目
detached()。execute_from_commandline(argv)
execute_from_commandlineのファイル"/usr/local/lib/python2.7/dist-packages/celery/bin/celeryd_detach.py"、行146
** vars(options)))
ファイル"/usr/local/lib/python2.7/dist-packages/celery/bin/celeryd_detach.py"、37行目、デタッチ
detached(logfile、pidfile、uid、gid、umask、working_directory、fake)を使用:
ファイル"/usr/local/lib/python2.7/dist-packages/celery/platforms.py"、行248、開いている
reverse(range(get_fdmax(default = 2048)))のfdの場合:
get_fdmaxのファイル"/usr/local/lib/python2.7/dist-packages/celery/platforms.py"、行83
fdmax = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
AttributeError:'module'オブジェクトに属性'getrlimit'がありません