Apache Airflow 1.9安装在GitHub的debian 8上
由于debian 9上的命令行:Apache Airflow 1.9安装在GitHub的debian 8上,airflow,Airflow,由于debian 9上的命令行:pip install git,我从GitHub安装了ApacheAirflow 1.9+https://github.com/apache/incubator-airflow.git@v1-9-稳定 但是,我在期间遇到了一个由Fernet引起的错误,您知道如何解决这个问题吗 INFO [alembic.runtime.migration] Running upgrade 947454bf1dff -> d2ae31099d61, Increase
pip install git,我从GitHub安装了ApacheAirflow 1.9+https://github.com/apache/incubator-airflow.git@v1-9-稳定
但是,我在期间遇到了一个由Fernet引起的错误,您知道如何解决这个问题吗
INFO [alembic.runtime.migration] Running upgrade 947454bf1dff -> d2ae31099d61, Increase text size for MySQL (not relevant for other DBs' text types)
[2017-12-27 17:19:24,586] {models.py:643} ERROR - Failed to load fernet while encrypting value, using non-encrypted value.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 639, in set_extra
fernet = get_fernet()
File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 103, in get_fernet
raise AirflowException('Failed to import Fernet, it may not be installed')
AirflowException: Failed to import Fernet, it may not be installed
[2017-12-27 17:19:24,601] {models.py:643} ERROR - Failed to load fernet
我如何从我以前使用GitHub安装pip命令中指定类似于pip-install-apache-afflow[gcp-api]
的外包
如何安装最新的1.9.0RC?我有一个断言错误。在从源代码安装过程中,您必须替换airflow.cfg中的fernet_键,如您在文档中找到的。标记为“好”的答案有一个断开的链接,如果您以我的身份登录此处,并且该链接继续断开,则以下步骤对我有效:
pip安装加密技术
python-c“从cryptography.fernet导入fernet;打印(fernet.generate_key().decode())”
- 将生成的密钥添加到配置文件
afflow.cfg
,fernet\u key=YOUR\u generated\u key
在apache文档中,生成fernet密钥的脚本显然是错误的。
它说使用下面的脚本
from cryptography.fernet import Fernet
fernet_key= Fernet.generate_key()
print(fernet_key) # your fernet_key, keep it in secured place!
但它会在“aiffair initdb”命令处引发异常。
要解决此问题,请使用Fernet.generate_key()
而不是Fernet.generate_key().decode()
,如@skozz-answer所示