3

セロリは正常に動作していました。ある日、コマンドラインワーカーが次のトレースで起動できませんでした。

Traceback (most recent call last):
  File "/home/buildslave/venv/bin/celery", line 9, in <module>
    load_entry_point('celery==3.0.7', 'console_scripts', 'celery')()
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/__main__.py", line 14, in main
    main()
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 942, in main
    cmd.execute_from_commandline(argv)
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 886, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/bin/base.py", line 175, in execute_from_commandline
    return self.handle_argv(prog_name, argv[1:])
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 881, in handle_argv
    return self.execute(command, argv)
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 856, in execute
    return cls(app=self.app).run_from_argv(self.prog_name, argv)
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 142, in run_from_argv
    return self(*args, **options)
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 112, in __call__
    ret = self.run(*args, **kwargs)
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 214, in run
    return self.target.run(*args, **kwargs)
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/bin/celeryd.py", line 153, in run
    return self.app.Worker(**kwargs).run()
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/apps/worker.py", line 167, in run
    print(str(self.colored.cyan(' \n', self.startup_info())) +
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/celery/apps/worker.py", line 234, in startup_info
    'conninfo': self.app.connection().as_uri(),
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/kombu/connection.py", line 445, in as_uri
    fields = self.info()
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/kombu/connection.py", line 434, in info
    return OrderedDict(self._info())
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/kombu/connection.py", line 413, in _info
    D = self.transport.default_connection_params
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/kombu/connection.py", line 636, in transport
    self._transport = self.create_transport()
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/kombu/connection.py", line 395, in create_transport
    return self.get_transport_cls()(client=self)
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/kombu/connection.py", line 402, in get_transport_cls
    transport_cls = get_transport_cls(transport_cls)
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/kombu/transport/__init__.py", line 110, in get_transport_cls
    _transport_cache[transport] = _get_transport_cls(transport)
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/kombu/transport/__init__.py", line 92, in _get_transport_cls
    transport_module_name, transport_cls_name = resolve_transport(transport)
  File "/home/buildslave/venv/local/lib/python2.7/site-packages/kombu/transport/__init__.py", line 87, in resolve_transport
    raise KeyError('No such transport: %s' % (transport, ))
KeyError: 'No such transport: amqp'

コードをトレースすると、「amqp」が不思議なことに欠落していることがわかりましkombu.transport.TRANSPORT_ALIASESたが、それが私がトレイルを失った場所です。

4

1 に答える 1

7

この問題は、セロリ3.0.7へのアップグレードが原因のようです。以下は私にとって問題を解決しました:

pip install kombu==2.4.0

注:これは、 https://github.com/celery/kombu/commit/c3b7a0d885fef3a43b76af0881fee6b5d012923fごとにkombu==2.4.3によって解決されたようです。

于 2012-08-24T19:45:13.250 に答える