我正在尝试在AWS EC2实例上安装气流。 Web上的各种来源似乎都很好地记录了该过程,但是,在“ pip安装”气流之后,我遇到了一个问题。执行命令“ airflow initdb”时出现以下错误:
KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());
keystore.load(new FileInputStream(filename), password.toCharArray());
X509Certificate certificate = (X509Certificate)keystore.getCertificate("Cert_name");
endate = certificate.getNotAfter();
我的安装步骤如下:
[2019-09-25 13:22:02,329] {__init__.py:51} INFO - Using executor SequentialExecutor
Traceback (most recent call last):
File "/home/cloud-user/.local/bin/airflow", line 22, in <module>
from airflow.bin.cli import CLIFactory
File "/home/cloud-user/.local/lib/python2.7/site-packages/airflow/bin/cli.py", line 68, in <module>
from airflow.www_rbac.app import cached_app as cached_app_rbac
File "/home/cloud-user/.local/lib/python2.7/site-packages/airflow/www_rbac/app.py", line 26, in <module>
from flask_appbuilder import AppBuilder, SQLA
File "/home/cloud-user/.local/lib/python2.7/site-packages/flask_appbuilder/__init__.py", line 5, in <module>
from .base import AppBuilder
File "/home/cloud-user/.local/lib/python2.7/site-packages/flask_appbuilder/base.py", line 5, in <module>
from .api.manager import OpenApiManager
File "/home/cloud-user/.local/lib/python2.7/site-packages/flask_appbuilder/api/__init__.py", line 11, in <module>
from marshmallow_sqlalchemy.fields import Related, RelatedList
File "/home/cloud-user/.local/lib/python2.7/site-packages/marshmallow_sqlalchemy/__init__.py", line 1, in <module>
from .schema import TableSchemaOpts, ModelSchemaOpts, TableSchema, ModelSchema
File "/home/cloud-user/.local/lib/python2.7/site-packages/marshmallow_sqlalchemy/schema.py", line 101
class TableSchema(ma.Schema, metaclass=TableSchemaMeta):
^
我也尝试按照在线说明安装Postgres:
sudo apt update -y
sudo apt install python-pip -y
pip install apache-airflow
export AIRFLOW_HOME=~/.local/bin
export PATH=$PATH:$AIRFLOW_HOME
cd $AIRFLOW_HOME
mkdir dags/
airflow initdb
airflow scheduler &
airflow webserver &
或:sudo apt-get install postgresql postgresql-contrib -y
关于可能需要进行的任何配置文件更改的内容不多。
尽管我坚持initdb步骤,但最终目标是将数据库分离到其自己的RDS实例中。
我还阅读了一些文档,这些文档指出在虚拟环境中可以运行气流,但这是一项要求吗?
答案 0 :(得分:4)
这是因为marshmallow-sqlalchemy
版本已升级,并且破坏了与py2和py3.5和0.19.0的兼容性
运行以下
pip install marshmallow-sqlalchemy==0.17.1
它应该可以工作。
有关Airflow Jira的相关问题:https://issues.apache.org/jira/browse/AIRFLOW-5430