0

我已经通过 github 源安装了气流。我已经使用带有本地执行器的 mysql metadb 配置了气流。当我尝试启动我的网络服务器时,它无法启动。

安装.sh

mkdir -p ~/home
export AIRFLOW_HOME=~/airflow
cd $AIRFLOW_HOME
virtualenv env
source env/bin/activate

mkdir -p /usr/local/src/
cd /usr/local/src/
git clone https://github.com/apache/incubator-airflow.git
cd incubator-airflow
git checkout tags/1.8.2
pip install -e .
pip install -e .[hive]
pip install -e .[gcp_api]
pip install -e .[mysql]
pip install -e .[password]
pip install -e .[celery]

气流.cfg:

[core]
# The home folder for airflow, default is ~/airflow
airflow_home = /root/airflow
dags_folder = /root/airflow/dags

base_log_folder = /root/airflow/logs


encrypt_s3_logs = False
executor = LocalExecutor
sql_alchemy_conn = mysql://root:*****@localhost/airflow

当我尝试使用它启动我的网络服务器时,它显示了 ttou 信号处理和现有工作人员。

气流网络服务器-p 8080

[2017-11-20 04:05:30,642] {__init__.py:57} INFO - Using executor LocalExecutor
[2017-11-20 04:05:30,723] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2017-11-20 04:05:30,756] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
  ____________       _____________
 ____    |__( )_________  __/__  /________      __
____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/

/root/env/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
[2017-11-20 04:05:31,437] [3079] {models.py:167} INFO - Filling up the DagBag from /root/airflow/dags
Running the Gunicorn Server with:
Workers: 8 sync
Host: 0.0.0.0:8080
Timeout: 120
Logfiles: - -
=================================================================            
[2017-11-20 04:05:32,074] {__init__.py:57} INFO - Using executor LocalExecutor
[2017-11-20 04:05:32,153] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2017-11-20 04:05:32,184] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2017-11-20 04:05:32 +0000] [3087] [INFO] Starting gunicorn 19.3.0
[2017-11-20 04:05:32 +0000] [3087] [INFO] Listening at: http://0.0.0.0:8080 (3087)
[2017-11-20 04:05:32 +0000] [3087] [INFO] Using worker: sync
[2017-11-20 04:05:32 +0000] [3098] [INFO] Booting worker with pid: 3098
[2017-11-20 04:05:32 +0000] [3099] [INFO] Booting worker with pid: 3099
/root/env/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
/root/env/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
[2017-11-20 04:05:32 +0000] [3100] [INFO] Booting worker with pid: 3100
[2017-11-20 04:05:32 +0000] [3101] [INFO] Booting worker with pid: 3101
/root/env/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
[2017-11-20 04:05:32 +0000] [3102] [INFO] Booting worker with pid: 3102
[2017-11-20 04:05:32 +0000] [3103] [INFO] Booting worker with pid: 3103
[2017-11-20 04:05:32 +0000] [3104] [INFO] Booting worker with pid: 3104
/root/env/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
[2017-11-20 04:05:32 +0000] [3105] [INFO] Booting worker with pid: 3105
/root/env/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
/root/env/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
/root/env/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
/root/env/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
[2017-11-20 04:05:33,198] [3099] {models.py:167} INFO - Filling up the DagBag from /root/airflow/dags
[2017-11-20 04:05:33,312] [3098] {models.py:167} INFO - Filling up the DagBag from /root/airflow/dags
[2017-11-20 04:05:33,538] [3100] {models.py:167} INFO - Filling up the DagBag from /root/airflow/dags
[2017-11-20 04:05:33,863] [3101] {models.py:167} INFO - Filling up the DagBag from /root/airflow/dags
[2017-11-20 04:05:33,963] [3102] {models.py:167} INFO - Filling up the DagBag from /root/airflow/dags
[2017-11-20 04:05:33,987] [3104] {models.py:167} INFO - Filling up the DagBag from /root/airflow/dags
[2017-11-20 04:05:34,062] [3105] {models.py:167} INFO - Filling up the DagBag from /root/airflow/dags
[2017-11-20 04:05:34,162] [3103] {models.py:167} INFO - Filling up the DagBag from /root/airflow/dags
[2017-11-20 04:06:05 +0000] [3087] [INFO] Handling signal: ttin
[2017-11-20 04:06:05 +0000] [3121] [INFO] Booting worker with pid: 3121
/root/env/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
[2017-11-20 04:06:05,426] [3121] {models.py:167} INFO - Filling up the DagBag from /root/airflow/dags
[2017-11-20 04:06:06 +0000] [3087] [INFO] Handling signal: ttou
[2017-11-20 04:06:06 +0000] [3098] [INFO] Worker exiting (pid: 3098)
[2017-11-20 04:06:36 +0000] [3087] [INFO] Handling signal: ttin
[2017-11-20 04:06:36 +0000] [3136] [INFO] Booting worker with pid: 3136
/root/env/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
[2017-11-20 04:06:36,818] [3136] {models.py:167} INFO - Filling up the DagBag from /root/airflow/dags
[2017-11-20 04:06:37 +0000] [3087] [INFO] Handling signal: ttou
[2017-11-20 04:06:37 +0000] [3099] [INFO] Worker exiting (pid: 3099)
[2017-11-20 04:07:07 +0000] [3087] [INFO] Handling signal: ttin
[2017-11-20 04:07:07 +0000] [3144] [INFO] Booting worker with pid: 3144
4

1 回答 1

-1

您的网络服务器运行良好。Worker 会定期以设置的时间间隔“刷新”,worker_refresh_interval以便他们获取新的或更新的 DAG。发生这种情况时,您将看到信号ttin(将进程增加一)始终紧随其后ttou(将进程减少一),其中在删除最旧的工作人员之前添加了一个新工作人员。

于 2017-11-20T17:20:12.350 回答