花卉用户界面不显示工作人员

时间:2018-08-02 11:42:38

标签: celery airflow flower

我设置了气流以使用celeryExecuter执行工作流。我已经启动了Web服务器,调度程序和工作程序,它们运行得很好。但是Flower UI不会显示任何工人。

airflow worker的输出是:

/usr/local/lib/python2.7/dist-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
[2018-08-02 11:29:09,827] {__init__.py:57} INFO - Using executor CeleryExecutor
[2018-08-02 11:29:09,983] {driver.py:124} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-08-02 11:29:10,052] {driver.py:124} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt

airflow flower的输出为:

/usr/local/lib/python2.7/dist-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
[2018-08-02 11:29:35,574] {__init__.py:57} INFO - Using executor CeleryExecutor
[2018-08-02 11:29:35,739] {driver.py:124} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-08-02 11:29:35,799] {driver.py:124} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[I 180802 11:29:36 command:139] Visit me at http://0.0.0.0:5555
[I 180802 11:29:36 command:144] Broker: amqp://guest:**@localhost:5672//
[I 180802 11:29:36 command:147] Registered tasks: 
    [u'celery.accumulate',
     u'celery.backend_cleanup',
     u'celery.chain',
     u'celery.chord',
     u'celery.chord_unlock',
     u'celery.chunks',
     u'celery.group',
     u'celery.map',
     u'celery.starmap']
[I 180802 11:29:36 mixins:224] Connected to amqp://guest:**@localhost:5672//

但是flower不会显示有关工作者或任务的任何信息,并且会在CLI上产生以下错误:

  

[E 180802 11:29:55 broker:82] RabbitMQ管理API调用失败:   [Errno 111]连接被拒绝

有什么问题的想法吗?

1 个答案:

答案 0 :(得分:0)

嗯,我能够解决问题。原来我应该在运行该工作程序之前将export C_FORCE_ROOT=true添加到我的~/.bashrc文件中。当您以超级用户身份执行工作程序时,就会发生这种情况。