You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/01/21 12:07:00 UTC

[jira] [Commented] (AIRFLOW-1543) Improve logging when `fernet_key` format is incorrect

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

ASF GitHub Bot commented on AIRFLOW-1543:
-----------------------------------------

ashb commented on pull request #2551: [AIRFLOW-1543] Improve error message for incorrect fernet_key
URL: https://github.com/apache/airflow/pull/2551
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Improve logging when `fernet_key` format is incorrect
> -----------------------------------------------------
>
>                 Key: AIRFLOW-1543
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1543
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: 1.9.0
>            Reporter: Tiantian Gao
>            Assignee: Tiantian Gao
>            Priority: Minor
>              Labels: newbie
>
> Using the default airflow.cfg, and modify "fernet_key" to some thing like "sdfsdfsfsdf", which incorrect format.
> then run "airflow initdb", raise below 
> {code}
> [2017-08-29 23:01:20,197] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
> [2017-08-29 23:01:20,231] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
> [2017-08-29 23:01:20,436] {__init__.py:45} INFO - Using executor SequentialExecutor
> DB: sqlite:////home/ubuntu/airflow/airflow.db
> [2017-08-29 23:01:20,618] {db.py:311} INFO - Creating tables
> INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
> INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
> /home/ubuntu/src/incubator-airflow/.venv/local/lib/python2.7/site-packages/cffi/model.py:525: UserWarning: 'point_conversion_form_t' has no values explicitly defined; guessing that it is equivalent to 'unsigned int'
>   % self._get_c_name())
> Traceback (most recent call last):
>   File "/home/ubuntu/src/incubator-airflow/.venv/bin/airflow", line 10, in <module>
>     execfile(__file__)
>   File "/home/ubuntu/src/incubator-airflow/airflow/bin/airflow", line 28, in <module>
>     args.func(args)
>   File "/home/ubuntu/src/incubator-airflow/airflow/bin/cli.py", line 894, in initdb
>     db_utils.initdb()
>   File "/home/ubuntu/src/incubator-airflow/airflow/utils/db.py", line 112, in initdb
>     schema='airflow_ci'))
>   File "<string>", line 4, in __init__
>   File "/home/ubuntu/src/incubator-airflow/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 414, in _initialize_instance
>     manager.dispatch.init_failure(self, args, kwargs)
>   File "/home/ubuntu/src/incubator-airflow/.venv/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
>     compat.reraise(exc_type, exc_value, exc_tb)
>   File "/home/ubuntu/src/incubator-airflow/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 411, in _initialize_instance
>     return manager.original_init(*mixed[1:], **kwargs)
>   File "/home/ubuntu/src/incubator-airflow/airflow/models.py", line 585, in __init__
>     self.extra = extra
>   File "<string>", line 1, in __set__
>   File "/home/ubuntu/src/incubator-airflow/airflow/models.py", line 646, in set_extra
>     fernet = get_fernet()
>   File "/home/ubuntu/src/incubator-airflow/airflow/models.py", line 105, in get_fernet
>     return Fernet(configuration.get('core', 'FERNET_KEY').encode('utf-8'))
>   File "/home/ubuntu/src/incubator-airflow/.venv/local/lib/python2.7/site-packages/cryptography/fernet.py", line 34, in __init__
>     key = base64.urlsafe_b64decode(key)
>   File "/usr/lib/python2.7/base64.py", line 112, in urlsafe_b64decode
>     return b64decode(s, '-_')
>   File "/usr/lib/python2.7/base64.py", line 76, in b64decode
>     raise TypeError(msg)
> TypeError: Incorrect padding
> {code}



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