Skip to content

Celery multi command loses app parameter to worker command #6381

Description

@leona-ya

Checklist

  • I have verified that the issue exists against the master branch of Celery.
  • This has already been asked to the discussion group first.
  • I have read the relevant section in the
    contribution guide
    on reporting bugs.
  • I have checked the issues list
    for similar or identical bug reports.
  • I have checked the pull requests list
    for existing proposed fixes.
  • I have checked the commit log
    to find out if the bug was already fixed in the master branch.
  • I have included all related issues and possible duplicate issues
    in this issue (If there are none, check this box anyway).

Mandatory Debugging Information

  • I have included the output of celery -A proj report in the issue.
    (if you are not able to do this, then at least specify the Celery
    version affected).
  • I have verified that the issue exists against the master branch of Celery.
  • I have included the contents of pip freeze in the issue.
  • I have included all the versions of all the external dependencies required
    to reproduce this bug.

Optional Debugging Information

  • I have tried reproducing the issue on more than one Python version
    and/or implementation.
  • I have tried reproducing the issue on more than one message broker and/or
    result backend.
  • I have tried reproducing the issue on more than one version of the message
    broker and/or result backend.
  • I have tried reproducing the issue on more than one operating system.
  • I have tried reproducing the issue on more than one workers pool.
  • I have tried reproducing the issue with autoscaling, retries,
    ETA/Countdown & rate limits disabled.
  • I have tried reproducing the issue after downgrading
    and/or upgrading Celery and its dependencies.

Related Issues and Possible Duplicates

Related Issues

Possible Duplicates

  • None

Environment & Settings

Celery version: 5.0.0 and master(431fffd)

celery report Output:

software -> celery:5.0.0 (singularity) kombu:5.0.2 py:3.8.5
            billiard:3.6.3.0 redis:3.5.3
platform -> system:Linux arch:64bit, ELF
            kernel version:5.8.10-arch1-1 imp:CPython
loader   -> celery.loaders.app.AppLoader
settings -> transport:redis results:redis://:**@mars.het.nue.de.vpn.fahrplandatengarten.de:6379/0

ABSOLUTE_URL_OVERRIDES: {
 }
ADMINS: []
ALLOWED_HOSTS: ['saturn.int.sig.de.labcode.de',
 'fahrplandatengarten.de',
 'www.fahrplandatengarten.de',
 '127.0.0.1',
 '::1']
APPEND_SLASH: True
AUTHENTICATION_BACKENDS: ['django.contrib.auth.backends.ModelBackend']
AUTH_PASSWORD_VALIDATORS: '********'
AUTH_USER_MODEL: 'auth.User'
BASE_DIR: '/home/em0lar/dev/bahn/FahrplanDatenGarten/FahrplanDatenGarten/FahrplanDatenGarten'
CACHES: {
    'default': {   'BACKEND': 'django_redis.cache.RedisCache',
                   'LOCATION': 'redis://:***@mars.het.nue.de.vpn.fahrplandatengarten.de:6379/1',
                   'OPTIONS': {   'CLIENT_CLASS': 'django_redis.client.DefaultClient'}},
    'redis': {   'BACKEND': 'django_redis.cache.RedisCache',
                 'LOCATION': 'redis://:***@mars.het.nue.de.vpn.fahrplandatengarten.de:6379/1',
                 'OPTIONS': {   'CLIENT_CLASS': 'django_redis.client.DefaultClient'}}}
CACHE_MIDDLEWARE_ALIAS: 'default'
CACHE_MIDDLEWARE_KEY_PREFIX: '********'
CACHE_MIDDLEWARE_SECONDS: 600
CELERYCONF_BROKER_URL: 'redis://:********@mars.het.nue.de.vpn.fahrplandatengarten.de:6379/0'
CELERYCONF_RESULT_BACKEND: 'redis://:********@mars.het.nue.de.vpn.fahrplandatengarten.de:6379/0'
CELERYCONF_TASK_IGNORE_RESULT: True
CELERYCONF_TASK_SERIALIZER: 'json'
CELERYCONF_TASK_STORE_ERRORS_EVEN_IF_IGNORED: True
COMPRESS_PRECOMPILERS: [('text/x-scss', 'django_libsass.SassCompiler')]
COMPRESS_ROOT: '/home/em0lar/dev/bahn/FahrplanDatenGarten/FahrplanDatenGarten/FahrplanDatenGarten/static'
CSRF_COOKIE_AGE: 31449600
CSRF_COOKIE_DOMAIN: None
CSRF_COOKIE_HTTPONLY: False
CSRF_COOKIE_NAME: 'csrftoken'
CSRF_COOKIE_PATH: '/'
CSRF_COOKIE_SAMESITE: 'Lax'
CSRF_COOKIE_SECURE: False
CSRF_FAILURE_VIEW: 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME: 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS: []
CSRF_USE_SESSIONS: False
DATABASES: {
    'default': {   'ATOMIC_REQUESTS': False,
                   'AUTOCOMMIT': True,
                   'CONN_MAX_AGE': 120,
                   'ENGINE': 'django.db.backends.postgresql',
                   'HOST': '10.151.4.8',
                   'NAME': 'fdg',
                   'OPTIONS': {},
                   'PASSWORD': '********',
                   'PORT': '5432',
                   'TEST': {   'CHARSET': None,
                               'COLLATION': None,
                               'MIGRATE': True,
                               'MIRROR': None,
                               'NAME': None},
                   'TIME_ZONE': None,
                   'USER': 'fdg'}}
DATABASE_ROUTERS: '********'
DATA_UPLOAD_MAX_MEMORY_SIZE: 2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS: 1000
DATETIME_FORMAT: 'N j, Y, P'
DATETIME_INPUT_FORMATS: ['%Y-%m-%d %H:%M:%S',
 '%Y-%m-%d %H:%M:%S.%f',
 '%Y-%m-%d %H:%M',
 '%m/%d/%Y %H:%M:%S',
 '%m/%d/%Y %H:%M:%S.%f',
 '%m/%d/%Y %H:%M',
 '%m/%d/%y %H:%M:%S',
 '%m/%d/%y %H:%M:%S.%f',
 '%m/%d/%y %H:%M']
DATE_FORMAT: 'N j, Y'
DATE_INPUT_FORMATS: ['%Y-%m-%d',
 '%m/%d/%Y',
 '%m/%d/%y',
 '%b %d %Y',
 '%b %d, %Y',
 '%d %b %Y',
 '%d %b, %Y',
 '%B %d %Y',
 '%B %d, %Y',
 '%d %B %Y',
 '%d %B, %Y']
DEBUG: True
DEBUG_PROPAGATE_EXCEPTIONS: False
DECIMAL_SEPARATOR: '.'
DEFAULT_CHARSET: 'utf-8'
DEFAULT_EXCEPTION_REPORTER: 'django.views.debug.ExceptionReporter'
DEFAULT_EXCEPTION_REPORTER_FILTER: 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE: 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL: 'webmaster@localhost'
DEFAULT_HASHING_ALGORITHM: 'sha256'
DEFAULT_INDEX_TABLESPACE: ''
DEFAULT_TABLESPACE: ''
DISALLOWED_USER_AGENTS: []
EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST: 'localhost'
EMAIL_HOST_PASSWORD: '********'
EMAIL_HOST_USER: ''
EMAIL_PORT: 25
EMAIL_SSL_CERTFILE: None
EMAIL_SSL_KEYFILE: '********'
EMAIL_SUBJECT_PREFIX: '[Django] '
EMAIL_TIMEOUT: None
EMAIL_USE_LOCALTIME: False
EMAIL_USE_SSL: False
EMAIL_USE_TLS: False
FILE_UPLOAD_DIRECTORY_PERMISSIONS: None
FILE_UPLOAD_HANDLERS: ['django.core.files.uploadhandler.MemoryFileUploadHandler',
 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE: 2621440
FILE_UPLOAD_PERMISSIONS: 420
FILE_UPLOAD_TEMP_DIR: None
FIRST_DAY_OF_WEEK: 0
FIXTURE_DIRS: []
FORCE_SCRIPT_NAME: None
FORMAT_MODULE_PATH: None
FORM_RENDERER: 'django.forms.renderers.DjangoTemplates'
IGNORABLE_404_URLS: []
INSTALLED_APPS: ['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'core',
 'DBApis',
 'FGRFiller',
 'verspaeti',
 'gtfs',
 'netzkarte']
INTERNAL_IPS: []
LANGUAGES: [
 ('de', 'German'),
 ('en', 'English'),
 ('en-au', 'Australian English'),
 ('en-gb', 'British English'),]
LANGUAGES_BIDI: ['he', 'ar', 'ar-dz', 'fa', 'ur']
LANGUAGE_CODE: 'de-de'
LANGUAGE_COOKIE_AGE: None
LANGUAGE_COOKIE_DOMAIN: None
LANGUAGE_COOKIE_HTTPONLY: False
LANGUAGE_COOKIE_NAME: 'django_language'
LANGUAGE_COOKIE_PATH: '/'
LANGUAGE_COOKIE_SAMESITE: None
LANGUAGE_COOKIE_SECURE: False
LIBSASS_SOURCE_COMMENTS: False
LOCALE_PATHS: []
LOGGING: {
 }
LOGGING_CONFIG: 'logging.config.dictConfig'
LOGIN_REDIRECT_URL: '/accounts/profile/'
LOGIN_URL: '/accounts/login/'
LOGOUT_REDIRECT_URL: None
MANAGERS: []
MEDIA_ROOT: ''
MEDIA_URL: '/'
MESSAGE_STORAGE: 'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE: ['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']
MIGRATION_MODULES: {
 }
MONTH_DAY_FORMAT: 'F j'
NUMBER_GROUPING: 0
PASSWORD_HASHERS: '********'
PASSWORD_RESET_TIMEOUT: '********'
PASSWORD_RESET_TIMEOUT_DAYS: '********'
PERIODIC_IMPORT_JOURNEYS: ['*', '*/5']
PERIODIC_IMPORT_TIMETABLES: ['*', '*/10']
PREPEND_WWW: False
ROOT_URLCONF: 'FahrplanDatenGarten.urls'
SECRET_KEY: '********'
SECURE_BROWSER_XSS_FILTER: False
SECURE_CONTENT_TYPE_NOSNIFF: True
SECURE_HSTS_INCLUDE_SUBDOMAINS: False
SECURE_HSTS_PRELOAD: False
SECURE_HSTS_SECONDS: 0
SECURE_PROXY_SSL_HEADER: None
SECURE_REDIRECT_EXEMPT: []
SECURE_REFERRER_POLICY: 'same-origin'
SECURE_SSL_HOST: None
SECURE_SSL_REDIRECT: False
SERVER_EMAIL: 'root@localhost'
SESSION_CACHE_ALIAS: 'default'
SESSION_COOKIE_AGE: 1209600
SESSION_COOKIE_DOMAIN: None
SESSION_COOKIE_HTTPONLY: True
SESSION_COOKIE_NAME: 'sessionid'
SESSION_COOKIE_PATH: '/'
SESSION_COOKIE_SAMESITE: 'Lax'
SESSION_COOKIE_SECURE: False
SESSION_ENGINE: 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE: False
SESSION_FILE_PATH: None
SESSION_SAVE_EVERY_REQUEST: False
SESSION_SERIALIZER: 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE: 'FahrplanDatenGarten.settings'
SHORT_DATETIME_FORMAT: 'm/d/Y P'
SHORT_DATE_FORMAT: 'm/d/Y'
SIGNING_BACKEND: 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS: []
STATICFILES_DIRS: ['/home/em0lar/dev/bahn/FahrplanDatenGarten/FahrplanDatenGarten/FahrplanDatenGarten/static']
STATICFILES_FINDERS: ['django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE: 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT: '/var/www/static'
STATIC_URL: '/static/'
TEMPLATES: [{'APP_DIRS': True,
  'BACKEND': 'django.template.backends.django.DjangoTemplates',
  'DIRS': ['FahrplanDatenGarten/templates/'],
  'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
                                     'django.template.context_processors.request',
                                     'django.contrib.auth.context_processors.auth',
                                     'django.contrib.messages.context_processors.messages']}}]
TEST_NON_SERIALIZED_APPS: []
TEST_RUNNER: 'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR: ','
TIME_FORMAT: 'P'
TIME_INPUT_FORMATS: ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE: 'Europe/Berlin'
USE_I18N: True
USE_L10N: True
USE_THOUSAND_SEPARATOR: False
USE_TZ: True
USE_X_FORWARDED_HOST: False
USE_X_FORWARDED_PORT: False
WSGI_APPLICATION: 'FahrplanDatenGarten.wsgi.application'
X_FRAME_OPTIONS: 'DENY'
YEAR_MONTH_FORMAT: 'F Y'
is_overridden: <bound method Settings.is_overridden of <Settings "FahrplanDatenGarten.settings">>
deprecated_settings: None

Steps to Reproduce

Required Dependencies

  • Minimal Python Version: N/A or Unknown
  • Minimal Celery Version: 5.0.0
  • Minimal Kombu Version: N/A or Unknown
  • Minimal Broker Version: N/A or Unknown
  • Minimal Result Backend Version: N/A or Unknown
  • Minimal OS and/or Kernel Version: N/A or Unknown
  • Minimal Broker Client Version: N/A or Unknown
  • Minimal Result Backend Client Version: N/A or Unknown

Python Packages

pip freeze Output:

amqp==5.0.1
asgiref==3.2.10
billiard==3.6.3.0
celery==5.0.0
certifi==2020.4.5.2
chardet==3.0.4
click==7.1.2
click-didyoumean==0.0.3
click-repl==0.1.6
dj-database-url==0.5.0
Django==3.1.1
django-redis==4.12.1
dparse==0.5.1
entrypoints==0.3
fdfgen==0.16.1
flake8==3.8.3
future==0.18.2
idna==2.9
isort==5.5.3
kombu==5.0.2
lxml==4.5.2
mccabe==0.6.1
packaging==20.4
plotly==4.10.0
prompt-toolkit==3.0.7
psycopg2-binary==2.8.6
pycodestyle==2.6.0
pycryptodome==3.9.8
pyflakes==2.2.0
pyhafas==0.2.0
pyparsing==2.4.7
pytz==2020.1
PyYAML==5.3.1
redis==3.5.3
requests==2.24.0
retrying==1.3.3
safety==1.9.0
six==1.15.0
sqlparse==0.3.1
toml==0.10.1
urllib3==1.25.9
vine==5.0.0
wcwidth==0.2.5

Other Dependencies

Details

N/A

Minimally Reproducible Test Case

Details

Expected Behavior

Run multiple workers with the in the multi command supplied app

Actual Behavior

I ran: celery -A FahrplanDatenGarten multi --verbose start 4 --pidfile="tmp/%n.pid" --logfile="tmp/%n.log" -c 12
the output was the following:

celery multi v5.0.0 (singularity)
> Starting nodes...
	> celery1@mimas:   /home/em0lar/dev/Jugend_hackt/19/DE/FahrplanDatenGarten/.venv/bin/python3 -m celery worker --detach --pidfile=tmp/celery1.pid --logfile=tmp/celery1.log -c 12 -n celery1@mimas --executable=/home/em0lar/dev/Jugend_hackt/19/DE/FahrplanDatenGarten/.venv/bin/python3
OK
	> celery2@mimas:   /home/em0lar/dev/Jugend_hackt/19/DE/FahrplanDatenGarten/.venv/bin/python3 -m celery worker --detach --pidfile=tmp/celery2.pid --logfile=tmp/celery2.log -c 12 -n celery2@mimas --executable=/home/em0lar/dev/Jugend_hackt/19/DE/FahrplanDatenGarten/.venv/bin/python3
OK
	> celery3@mimas:   /home/em0lar/dev/Jugend_hackt/19/DE/FahrplanDatenGarten/.venv/bin/python3 -m celery worker --detach --pidfile=tmp/celery3.pid --logfile=tmp/celery3.log -c 12 -n celery3@mimas --executable=/home/em0lar/dev/Jugend_hackt/19/DE/FahrplanDatenGarten/.venv/bin/python3
OK
	> celery4@mimas:   /home/em0lar/dev/Jugend_hackt/19/DE/FahrplanDatenGarten/.venv/bin/python3 -m celery worker --detach --pidfile=tmp/celery4.pid --logfile=tmp/celery4.log -c 12 -n celery4@mimas --executable=/home/em0lar/dev/Jugend_hackt/19/DE/FahrplanDatenGarten/.venv/bin/python3
OK

In the commands to run the worker the app parameter is missing so the workers are not able to connect to the broker

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions