[ https://issues.apache.org/jira/browse/AIRFLOW-2675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16523661#comment-16523661 ]
Ash Berlin-Taylor edited comment on AIRFLOW-2675 at 6/26/18 12:33 PM: ---------------------------------------------------------------------- You are on master version of Airflow or the released 1.9.0? Missing cryptography is a bug that's been reported in AIRFLOW-2668. The k8s deps are only a warning - the second error is {{AirflowException: Could not create Fernet object: Incorrect padding}} which is again related to fernet/crypto. Is this a clean environment? Have you made any changes to airflow.cfg at all? was (Author: ashb): You are on master version of Airflow or the released 1.9.0? Missing cryptography is a bug that's been reported. The k8s deps are only a warning - the second error is {{AirflowException: Could not create Fernet object: Incorrect padding}} which is again related to fernet/crypto. Is this a clean environment? Have you made any changes to airflow.cfg at all? > Run commands error after installed > ---------------------------------- > > Key: AIRFLOW-2675 > URL: https://issues.apache.org/jira/browse/AIRFLOW-2675 > Project: Apache Airflow > Issue Type: Bug > Components: dependencies > Reporter: Guoqiang Ding > Assignee: Guoqiang Ding > Priority: Major > > After I installed airflow in my test environment, it raises error on the > dependencies. > > {code:java} > // > $ airflow > Traceback (most recent call last): > File "/opt/incubator-airflow/env/bin/airflow", line 6, in <module> > exec(compile(open(__file__).read(), __file__, 'exec')) > File "/opt/incubator-airflow/airflow/bin/airflow", line 21, in <module> > from airflow import configuration > File "/opt/incubator-airflow/airflow/__init__.py", line 37, in <module> > from airflow.models import DAG > File "/opt/incubator-airflow/airflow/models.py", line 31, in <module> > import cryptography > ImportError: No module named cryptography > {code} > > > And after I run "pip install cryptography" mannually, it raises error on the > k8s dependencies when I run "airflow init db". > > {code:java} > // > $ airflow initdb > [2018-06-26 10:52:08,259] {__init__.py:51} INFO - Using executor > SequentialExecutor > DB: sqlite:////home/openstack/airflow/airflow.db > [2018-06-26 10:52:08,394] {db.py:338} INFO - Creating tables > INFO [alembic.runtime.migration] Context impl SQLiteImpl. > INFO [alembic.runtime.migration] Will assume non-transactional DDL. > INFO [alembic.runtime.migration] Running upgrade -> e3a246e0dc1, current > schema > INFO [alembic.runtime.migration] Running upgrade e3a246e0dc1 -> > 1507a7289a2f, create is_encrypted > /opt/incubator-airflow/env/local/lib/python2.7/site-packages/alembic/util/messaging.py:69: > UserWarning: Skipping unsupported ALTER for creation of implicit constraint > warnings.warn(msg) > INFO [alembic.runtime.migration] Running upgrade 1507a7289a2f -> > 13eb55f81627, maintain history for compatibility with earlier migrations > INFO [alembic.runtime.migration] Running upgrade 13eb55f81627 -> > 338e90f54d61, More logging into task_isntance > INFO [alembic.runtime.migration] Running upgrade 338e90f54d61 -> > 52d714495f0, job_id indices > INFO [alembic.runtime.migration] Running upgrade 52d714495f0 -> > 502898887f84, Adding extra to Log > INFO [alembic.runtime.migration] Running upgrade 502898887f84 -> > 1b38cef5b76e, add dagrun > INFO [alembic.runtime.migration] Running upgrade 1b38cef5b76e -> > 2e541a1dcfed, task_duration > INFO [alembic.runtime.migration] Running upgrade 2e541a1dcfed -> > 40e67319e3a9, dagrun_config > INFO [alembic.runtime.migration] Running upgrade 40e67319e3a9 -> > 561833c1c74b, add password column to user > INFO [alembic.runtime.migration] Running upgrade 561833c1c74b -> 4446e08588, > dagrun start end > INFO [alembic.runtime.migration] Running upgrade 4446e08588 -> bbc73705a13e, > Add notification_sent column to sla_miss > INFO [alembic.runtime.migration] Running upgrade bbc73705a13e -> > bba5a7cfc896, Add a column to track the encryption state of the 'Extra' field > in connection > INFO [alembic.runtime.migration] Running upgrade bba5a7cfc896 -> > 1968acfc09e3, add is_encrypted column to variable table > INFO [alembic.runtime.migration] Running upgrade 1968acfc09e3 -> > 2e82aab8ef20, rename user table > INFO [alembic.runtime.migration] Running upgrade 2e82aab8ef20 -> > 211e584da130, add TI state index > INFO [alembic.runtime.migration] Running upgrade 211e584da130 -> > 64de9cddf6c9, add task fails journal table > INFO [alembic.runtime.migration] Running upgrade 64de9cddf6c9 -> > f2ca10b85618, add dag_stats table > INFO [alembic.runtime.migration] Running upgrade f2ca10b85618 -> > 4addfa1236f1, Add fractional seconds to mysql tables > INFO [alembic.runtime.migration] Running upgrade 4addfa1236f1 -> > 8504051e801b, xcom dag task indices > INFO [alembic.runtime.migration] Running upgrade 8504051e801b -> > 5e7d17757c7a, add pid field to TaskInstance > INFO [alembic.runtime.migration] Running upgrade 5e7d17757c7a -> > 127d2bf2dfa7, Add dag_id/state index on dag_run table > INFO [alembic.runtime.migration] Running upgrade 127d2bf2dfa7 -> > cc1e65623dc7, add max tries column to task instance > WARNI [airflow.utils.log.logging_mixin.LoggingMixin] Could not import > KubernetesPodOperator: No module named kubernetes > WARNI [airflow.utils.log.logging_mixin.LoggingMixin] Install kubernetes > dependencies with: pip install airflow['kubernetes'] > INFO [alembic.runtime.migration] Running upgrade cc1e65623dc7 -> > bdaa763e6c56, Make xcom value column a large binary > INFO [alembic.runtime.migration] Running upgrade bdaa763e6c56 -> > 947454bf1dff, add ti job_id index > INFO [alembic.runtime.migration] Running upgrade 947454bf1dff -> > d2ae31099d61, Increase text size for MySQL (not relevant for other DBs' text > types) > INFO [alembic.runtime.migration] Running upgrade d2ae31099d61 -> > 0e2a74e0fc9f, Add time zone awareness > INFO [alembic.runtime.migration] Running upgrade d2ae31099d61 -> > 33ae817a1ff4, kubernetes_resource_checkpointing > INFO [alembic.runtime.migration] Running upgrade 33ae817a1ff4 -> > 27c6a30d7c24, kubernetes_resource_checkpointing > INFO [alembic.runtime.migration] Running upgrade 27c6a30d7c24 -> > 86770d1215c0, add kubernetes scheduler uniqueness > INFO [alembic.runtime.migration] Running upgrade 86770d1215c0, 0e2a74e0fc9f > -> 05f30312d566, merge heads > INFO [alembic.runtime.migration] Running upgrade 05f30312d566 -> > f23433877c24, fix mysql not null constraint > INFO [alembic.runtime.migration] Running upgrade f23433877c24 -> > 856955da8476, fix sqlite foreign key > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 689, in set_password > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > ERROR [airflow.models.Connection] Failed to load fernet while encrypting > value, using non-encrypted value. > Traceback (most recent call last): > File "/opt/incubator-airflow/airflow/models.py", line 718, in set_extra > fernet = get_fernet() > File "/opt/incubator-airflow/airflow/models.py", line 124, in get_fernet > raise AirflowException("Could not create Fernet object: {}".format(ve)) > AirflowException: Could not create Fernet object: Incorrect padding > WARNI [airflow.utils.log.logging_mixin.LoggingMixin] Could not import > KubernetesPodOperator: No module named kubernetes > WARNI [airflow.utils.log.logging_mixin.LoggingMixin] Install kubernetes > dependencies with: pip install airflow['kubernetes'] > Done. > {code} > > I don't know it is a bug or there was wrong with my steps. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)