运行 气流网络服务器时气流出错
Error with airflow while running airflow webserver
我正在尝试在 windows 10.
上使用 wsl 安装 apache airflow
我正在学习本教程:https://towardsdatascience.com/run-apache-airflow-on-windows-10-without-docker-3c5754bb98b4
我能够 运行: airflow db init 和 airflow scheduler,没有任何错误。
在 运行ning airflow 网络服务器上,我遇到了以下错误:
File "/home/glinty/.local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: job
[SQL: SELECT job.id AS job_id, job.dag_id AS job_dag_id, job.state AS job_state, job.job_type AS job_job_type, job.start_date AS job_start_date, job.end_date AS job_end_date, job.latest_heartbeat AS job_latest_heartbeat, job.executor_class AS job_executor_class, job.hostname AS job_hostname, job.unixname AS job_unixname
FROM job
WHERE job.id = ? AND job.job_type IN (?)]
[parameters: (2, 'SchedulerJob')]
(Background on this error at: http://sqlalche.me/e/13/e3q8)
如何克服这个错误。
错误本身是 no such table: job
,所以数据库迁移一定不是 运行。引用的文章使用旧版本的 Airflow,其中的命令 (airflow initdb
) 不再有效。请改用 airflow db init
。
我找到了解决问题的方法(不确定是什么解决了这个问题),就我而言:
1) 我将 wsl 版本从 1 更改为 2。(此后重新启动电脑)
2) 启用虚拟化 windows 功能(此后重启电脑)
3) 使用此命令创建了一个帐户:
airflow 用户创建 --username admin --password admin --firstname --lastname --role Admin --email abc@gmail.com
4) 删除 AIRFLOW_HOME 目录和 运行 airlow db init 中的所有文件。
然后,运行 airflow 网络服务器命令。
我正在尝试在 windows 10.
上使用 wsl 安装 apache airflow 我正在学习本教程:https://towardsdatascience.com/run-apache-airflow-on-windows-10-without-docker-3c5754bb98b4
我能够 运行: airflow db init 和 airflow scheduler,没有任何错误。
在 运行ning airflow 网络服务器上,我遇到了以下错误:
File "/home/glinty/.local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: job
[SQL: SELECT job.id AS job_id, job.dag_id AS job_dag_id, job.state AS job_state, job.job_type AS job_job_type, job.start_date AS job_start_date, job.end_date AS job_end_date, job.latest_heartbeat AS job_latest_heartbeat, job.executor_class AS job_executor_class, job.hostname AS job_hostname, job.unixname AS job_unixname
FROM job
WHERE job.id = ? AND job.job_type IN (?)]
[parameters: (2, 'SchedulerJob')]
(Background on this error at: http://sqlalche.me/e/13/e3q8)
如何克服这个错误。
错误本身是 no such table: job
,所以数据库迁移一定不是 运行。引用的文章使用旧版本的 Airflow,其中的命令 (airflow initdb
) 不再有效。请改用 airflow db init
。
我找到了解决问题的方法(不确定是什么解决了这个问题),就我而言:
1) 我将 wsl 版本从 1 更改为 2。(此后重新启动电脑)
2) 启用虚拟化 windows 功能(此后重启电脑)
3) 使用此命令创建了一个帐户:
airflow 用户创建 --username admin --password admin --firstname --lastname --role Admin --email abc@gmail.com
4) 删除 AIRFLOW_HOME 目录和 运行 airlow db init 中的所有文件。
然后,运行 airflow 网络服务器命令。