气流独立sqlite3完整性错误

发布于 2025-02-01 11:59:38 字数 6380 浏览 3 评论 0原文

我正在尝试运行sirflow startalone遵循以下指令 https://airflow.apache.org/docs/apache-airflow/stable/start/local.html 在“ Windows上的Ubuntu”上。我已经将airFlowhome文件夹放置在c:/users/my_user_name/中,这是我所做的所有更改。但是,我得到了完整性的,文档似乎非常神秘。你们能帮我吗?

standalone | Starting Airflow Standalone
standalone | Checking database is initialized
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
WARNI [airflow.models.crypto] empty cryptography key - values will not be stored encrypted.
standalone | Database ready
[2022-05-26 10:21:49,812] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 10:21:49,885] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 10:21:50,076] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 10:21:50,127] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
 triggerer | ____________       _____________
 triggerer | ____    |__( )_________  __/__  /________      __
 triggerer | ____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
 triggerer | ___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 triggerer | _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/
 triggerer | [2022-05-26 10:21:58,355] {triggerer_job.py:101} INFO - Starting the triggerer
 scheduler | ____________       _____________
 scheduler | ____    |__( )_________  __/__  /________      __
 scheduler | ____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
 scheduler | ___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 scheduler | _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/
 scheduler | [2022-05-26 10:21:58 -0400] [233] [INFO] Starting gunicorn 20.1.0
 scheduler | [2022-05-26 10:21:58 -0400] [233] [INFO] Listening at: http://0.0.0.0:8793 (233)
 scheduler | [2022-05-26 10:21:58 -0400] [233] [INFO] Using worker: sync
 scheduler | [2022-05-26 10:21:58 -0400] [234] [INFO] Booting worker with pid: 234
 scheduler | [2022-05-26 10:21:58,614] {scheduler_job.py:693} INFO - Starting the scheduler
 scheduler | [2022-05-26 10:21:58,614] {scheduler_job.py:698} INFO - Processing each file at most -1 times
 scheduler | [2022-05-26 10:21:58,619] {executor_loader.py:106} INFO - Loaded executor: SequentialExecutor
 scheduler | [2022-05-26 10:21:58,622] {manager.py:156} INFO - Launched DagFileProcessorManager with pid: 235
 scheduler | [2022-05-26 10:21:58,624] {scheduler_job.py:1218} INFO - Resetting orphaned tasks for active dag runs
 scheduler | [2022-05-26 10:21:58,639] {settings.py:55} INFO - Configured default timezone Timezone('UTC')
 scheduler | [2022-05-26 10:21:58 -0400] [236] [INFO] Booting worker with pid: 236
 scheduler | [2022-05-26 10:21:58,709] {manager.py:399} WARNING - Because we cannot use more than 1 thread (parsing_processes = 2) when using sqlite. So we set parallelism to 1.
 webserver | [2022-05-26 10:21:59 -0400] [231] [INFO] Starting gunicorn 20.1.0
 webserver | [2022-05-26 10:21:59 -0400] [231] [INFO] Listening at: http://0.0.0.0:8080 (231)
 webserver | [2022-05-26 10:21:59 -0400] [231] [INFO] Using worker: sync
 webserver | [2022-05-26 10:21:59 -0400] [239] [INFO] Booting worker with pid: 239
 webserver | [2022-05-26 10:21:59 -0400] [240] [INFO] Booting worker with pid: 240
 webserver | [2022-05-26 10:21:59 -0400] [241] [INFO] Booting worker with pid: 241
 webserver | [2022-05-26 10:22:00 -0400] [242] [INFO] Booting worker with pid: 242
 webserver | [2022-05-26 10:22:02,638] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
 webserver | [2022-05-26 10:22:02,644] {manager.py:587} ERROR - Remove Permission to Role Error: DELETE statement on table 'ab_permission_view_role' expected to delete 1 row(s); Only 0 were matched.
 webserver | [2022-05-26 10:22:02,776] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
 webserver | /home/carlos/.local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py:1461 SAWarning: DELETE statement on table 'ab_permission_view' expected to delete 1 row(s); 0 were matched.  Please set confirm_deleted_rows=False within the mapper configuration to prevent this warning.
 webserver | [2022-05-26 10:22:02,817] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
 webserver | /home/carlos/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py:2459 SAWarning: Identity map already had an identity for (<class 'airflow.www.fab_security.sqla.models.Permission'>, (185,), None), replacing it with newly flushed object.   Are there load operations occurring inside of an event handler within the flush?
 webserver | [2022-05-26 10:22:03,097] {manager.py:508} INFO - Created Permission View: menu access on Permissions
 webserver | [2022-05-26 10:22:03,168] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
 webserver | [2022-05-26 10:22:03,175] {manager.py:570} ERROR - Add Permission to Role Error: (sqlite3.IntegrityError) UNIQUE constraint failed: ab_permission_view_role.permission_view_id, ab_permission_view_role.role_id
 webserver | [SQL: INSERT INTO ab_permission_view_role (permission_view_id, role_id) VALUES (?, ?)]
 webserver | [parameters: (185, 1)]
 webserver | (Background on this error at: http://sqlalche.me/e/14/gkpj)
 webserver | [2022-05-26 10:22:03,188] {manager.py:570} ERROR - Add Permission to Role Error: (sqlite3.IntegrityError) UNIQUE constraint failed: ab_permission_view_role.permission_view_id, ab_permission_view_role.role_id
 webserver | [SQL: INSERT INTO ab_permission_view_role (permission_view_id, role_id) VALUES (?, ?)]
 webserver | [parameters: (185, 1)]
 webserver | (Background on this error at: http://sqlalche.me/e/14/gkpj)
standalone |
standalone | Airflow is ready
standalone | Login with username: admin  password: qhbDVvxz9ARPaWQt
standalone | Airflow Standalone is for development purposes only. Do not use this in production!

试图打开气流时,我总是会得到以下内容:

​/0.0.0.0:8793/

当我尝试运行AirFlow Weberver时,几乎完全相同。

谢谢!

I'm trying to run airflow standalone after following these instructions https://airflow.apache.org/docs/apache-airflow/stable/start/local.html on "Ubuntu on Windows". I already placed the AirflowHome folder inside C:/Users/my_user_name/ and that's esentially all the changes I did. However, I'm getting an IntegrityError and the documentation seems very cryptic. Could you guys help me out?

standalone | Starting Airflow Standalone
standalone | Checking database is initialized
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
WARNI [airflow.models.crypto] empty cryptography key - values will not be stored encrypted.
standalone | Database ready
[2022-05-26 10:21:49,812] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-05-26 10:21:49,885] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-05-26 10:21:50,076] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-05-26 10:21:50,127] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
 triggerer | ____________       _____________
 triggerer | ____    |__( )_________  __/__  /________      __
 triggerer | ____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
 triggerer | ___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 triggerer | _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/
 triggerer | [2022-05-26 10:21:58,355] {triggerer_job.py:101} INFO - Starting the triggerer
 scheduler | ____________       _____________
 scheduler | ____    |__( )_________  __/__  /________      __
 scheduler | ____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
 scheduler | ___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 scheduler | _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/
 scheduler | [2022-05-26 10:21:58 -0400] [233] [INFO] Starting gunicorn 20.1.0
 scheduler | [2022-05-26 10:21:58 -0400] [233] [INFO] Listening at: http://0.0.0.0:8793 (233)
 scheduler | [2022-05-26 10:21:58 -0400] [233] [INFO] Using worker: sync
 scheduler | [2022-05-26 10:21:58 -0400] [234] [INFO] Booting worker with pid: 234
 scheduler | [2022-05-26 10:21:58,614] {scheduler_job.py:693} INFO - Starting the scheduler
 scheduler | [2022-05-26 10:21:58,614] {scheduler_job.py:698} INFO - Processing each file at most -1 times
 scheduler | [2022-05-26 10:21:58,619] {executor_loader.py:106} INFO - Loaded executor: SequentialExecutor
 scheduler | [2022-05-26 10:21:58,622] {manager.py:156} INFO - Launched DagFileProcessorManager with pid: 235
 scheduler | [2022-05-26 10:21:58,624] {scheduler_job.py:1218} INFO - Resetting orphaned tasks for active dag runs
 scheduler | [2022-05-26 10:21:58,639] {settings.py:55} INFO - Configured default timezone Timezone('UTC')
 scheduler | [2022-05-26 10:21:58 -0400] [236] [INFO] Booting worker with pid: 236
 scheduler | [2022-05-26 10:21:58,709] {manager.py:399} WARNING - Because we cannot use more than 1 thread (parsing_processes = 2) when using sqlite. So we set parallelism to 1.
 webserver | [2022-05-26 10:21:59 -0400] [231] [INFO] Starting gunicorn 20.1.0
 webserver | [2022-05-26 10:21:59 -0400] [231] [INFO] Listening at: http://0.0.0.0:8080 (231)
 webserver | [2022-05-26 10:21:59 -0400] [231] [INFO] Using worker: sync
 webserver | [2022-05-26 10:21:59 -0400] [239] [INFO] Booting worker with pid: 239
 webserver | [2022-05-26 10:21:59 -0400] [240] [INFO] Booting worker with pid: 240
 webserver | [2022-05-26 10:21:59 -0400] [241] [INFO] Booting worker with pid: 241
 webserver | [2022-05-26 10:22:00 -0400] [242] [INFO] Booting worker with pid: 242
 webserver | [2022-05-26 10:22:02,638] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
 webserver | [2022-05-26 10:22:02,644] {manager.py:587} ERROR - Remove Permission to Role Error: DELETE statement on table 'ab_permission_view_role' expected to delete 1 row(s); Only 0 were matched.
 webserver | [2022-05-26 10:22:02,776] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
 webserver | /home/carlos/.local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py:1461 SAWarning: DELETE statement on table 'ab_permission_view' expected to delete 1 row(s); 0 were matched.  Please set confirm_deleted_rows=False within the mapper configuration to prevent this warning.
 webserver | [2022-05-26 10:22:02,817] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
 webserver | /home/carlos/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py:2459 SAWarning: Identity map already had an identity for (<class 'airflow.www.fab_security.sqla.models.Permission'>, (185,), None), replacing it with newly flushed object.   Are there load operations occurring inside of an event handler within the flush?
 webserver | [2022-05-26 10:22:03,097] {manager.py:508} INFO - Created Permission View: menu access on Permissions
 webserver | [2022-05-26 10:22:03,168] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
 webserver | [2022-05-26 10:22:03,175] {manager.py:570} ERROR - Add Permission to Role Error: (sqlite3.IntegrityError) UNIQUE constraint failed: ab_permission_view_role.permission_view_id, ab_permission_view_role.role_id
 webserver | [SQL: INSERT INTO ab_permission_view_role (permission_view_id, role_id) VALUES (?, ?)]
 webserver | [parameters: (185, 1)]
 webserver | (Background on this error at: http://sqlalche.me/e/14/gkpj)
 webserver | [2022-05-26 10:22:03,188] {manager.py:570} ERROR - Add Permission to Role Error: (sqlite3.IntegrityError) UNIQUE constraint failed: ab_permission_view_role.permission_view_id, ab_permission_view_role.role_id
 webserver | [SQL: INSERT INTO ab_permission_view_role (permission_view_id, role_id) VALUES (?, ?)]
 webserver | [parameters: (185, 1)]
 webserver | (Background on this error at: http://sqlalche.me/e/14/gkpj)
standalone |
standalone | Airflow is ready
standalone | Login with username: admin  password: qhbDVvxz9ARPaWQt
standalone | Airflow Standalone is for development purposes only. Do not use this in production!

When trying to open airflow, I always get the following:

enter image description here

And the same for http://0.0.0.0:8793/

Almost exactly the same happens when I try to run airflow webserver.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文