Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-6684

Airflow initdb failing

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.10.5
    • Fix Version/s: None
    • Component/s: database
    • Labels:

      Description

      When trying to do an airflow init on Airflow 1.10.5 and 1.10.7 on a postgresql, it is throwing the following error. 

       

      Traceback (most recent call last):  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1249, in _execute_context    cursor, statement, parameters, context  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute    cursor.execute(statement, parameters)psycopg2.errors.UndefinedTable: relation "chart" does not existLINE 2: FROM chart             ^  

      The above exception was the direct cause of the following exception: 

      Traceback (most recent call last):  File "/Library/Frameworks/Python.framework/Versions/3.7/bin/airflow", line 32, in <module>    args.func(args)  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airflow/bin/cli.py", line 1102, in initdb    db.initdb(settings.RBAC)  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airflow/utils/db.py", line 342, in initdb    chart = session.query(Chart).filter(Chart.label == chart_label).first()  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3232, in first    ret = list(self[0:1])  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3018, in _getitem    return list(res)  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3334, in __iter_    return self._execute_and_instances(context)  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3359, in _execute_and_instances    result = conn.execute(querycontext.statement, self._params)  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 988, in execute    return meth(self, multiparams, params)  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection    return connection._execute_clauseelement(self, multiparams, params)  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement    distilled_params,  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1253, in _execute_context    e, statement, parameters, cursor, context  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1473, in _handle_dbapi_exception    util.raise_from_cause(sqlalchemy_exception, exc_info)  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause    reraise(type(exception), exception, tb=exc_tb, cause=cause)  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 152, in reraise    raise value.with_traceback(tb)  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1249, in _execute_context    cursor, statement, parameters, context  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute    cursor.execute(statement, parameters)sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "chart" does not existLINE 2: FROM chart

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              issac_koshy Issac Koshy Panicker
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: