简体   繁体   中英

Errors when configuring Apache Airflow to use a postgres database

I have been introducing myself to Apache Airflow, so far everything is going well however I have been using the default SQLite database and I now need to change to a PostgreSQL database. I have changed the executor to LocalExecutor and I have set the sql_alchemy_conn string to postgresql+psycopg2://airflow:airflow@postgres:5432/airflow which is the address of the airflow database I created in postgres.

Now when I run airflow initdb I recieve the error

airflow.exceptions.AirflowConfigException: error: cannot use sqlite with the LocalExecutor

I am using postgreSQL 9.4.24

Does anyone know why this is occuring?

resolved the issue I was using the wrong postgres user for the location of the database. Should have been using postgresql+psycopg2://user:user@localhost:5432/airflow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM