You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jack (JIRA)" <ji...@apache.org> on 2018/08/22 08:34:00 UTC

[jira] [Commented] (AIRFLOW-2931) Make Quick Start work when user doesn't have `cryptography` installed

    [ https://issues.apache.org/jira/browse/AIRFLOW-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16588551#comment-16588551 ] 

jack commented on AIRFLOW-2931:
-------------------------------

The instructions are written in the configuration guide: [https://airflow.apache.org/configuration.html]

> Make Quick Start work when user doesn't have `cryptography` installed
> ---------------------------------------------------------------------
>
>                 Key: AIRFLOW-2931
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2931
>             Project: Apache Airflow
>          Issue Type: Improvement
>    Affects Versions: Airflow 1.8
>            Reporter: Mitchell Lloyd
>            Priority: Minor
>
> Following the [Quick Start guide|https://airflow.incubator.apache.org/start.html] I ran into the following error when running airflow initdb:
> {code:java}
> [2018-08-21 21:31:38,602] {__init__.py:45} INFO - Using executor SequentialExecutor DB: sqlite:////Users/mitch/projects/airflow/airflow.db [2018-08-21 21:31:38,716] {db.py:312} INFO - Creating tables INFO [alembic.runtime.migration] Context impl SQLiteImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. [2018-08-21 21:31:38,792] {models.py:643} ERROR - Failed to load fernet while encrypting value, using non-encrypted value. Traceback (most recent call last): File "/Users/mitch/.pyenv/versions/3.6.6/lib/python3.6/site-packages/airflow/models.py", line 105, in get_fernet return Fernet(configuration.get('core', 'FERNET_KEY').encode('utf-8')) File "/Users/mitch/.pyenv/versions/3.6.6/lib/python3.6/site-packages/cryptography/fernet.py", line 34, in __init__ key = base64.urlsafe_b64decode(key) File "/Users/mitch/.pyenv/versions/3.6.6/lib/python3.6/base64.py", line 133, in urlsafe_b64decode return b64decode(s) File "/Users/mitch/.pyenv/versions/3.6.6/lib/python3.6/base64.py", line 87, in b64decode return binascii.a2b_base64(s) binascii.Error: Incorrect padding{code}
>  My airflow.cfg file contained
> {code:java}
> # Secret key to save connection passwords in the db fernet_key = cryptography_not_found_storing_passwords_in_plain_text{code}
> [~kevcampb] Helped me on gitter and directed me to [this link|https://bcb.github.io/airflow/fernet-key] which resolved my issue.
> It seems that the quick start instructions should be updated to include this fernet key generation information or perhaps there is a way to ensure that cryptography is installed when apache-airflow is installed and automatically generate a key. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)