k8s+helm+airflow+openmetadata问题:ingestion部署失败,airflowDAG消失,任务执行不成功

1

  • Q:1a745590-1590-4c5b-b6a4-7d4eb2284bd9 Failed to deploy Ingestion Pipeline due to airflow API returned Internal Server Error and response {"error": "Internal error while deploying due to [[Errno 2] No such file or directory: '/opt/airflow/dag_generated_configs/1a745590-1590-4c5b-b6a4-7d4eb2284bd9.json'] "}
  • A:webserver pod上没有/opt/airflow/dag_generated_configs目录

2

  • Q:openmetadata上配置好doris的元数据ingestion service,test connection成功,但是发布任务报错
  • A:需要:pip install pydoris

3

  • Q:airflow上任务的日志:*** Could not read served logs: Request URL is missing an 'http://' or 'https://' protocol.
work日志:
[2024-12-20 07:57:42,669: INFO/MainProcess] Task airflow.providers.celery.executors.celery_executor_utils.execute_command[9aec9a2f-7864-4c88-bfe2-4a8e25593053] received
[2024-12-20 07:57:42,675: INFO/ForkPoolWorker-15] [9aec9a2f-7864-4c88-bfe2-4a8e25593053] Executing command in Celery: ['airflow', 'tasks', 'run', '5515133c-4a36-4cf9-b920-58ee6a24dcc4', 'ingestion_task', 'manual__2024-12-20T07:44:03.945304+00:00', '--local', '--subdir', 'DAGS_FOLDER/5515133c-4a36-4cf9-b920-58ee6a24dcc4.py']
[2024-12-20 07:57:52,666: ERROR/ForkPoolWorker-15] Task airflow.providers.celery.executors.celery_executor_utils.execute_command[9aec9a2f-7864-4c88-bfe2-4a8e25593053] raised unexpected: AirflowException('Celery command failed on host: airflow-worker-0.airflow-worker.airflow.svc.cluster.local with celery_task_id 9aec9a2f-7864-4c88-bfe2-4a8e25593053 (PID: 351, Return Code: 256)')
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.10/site-packages/celery/app/trace.py", line 453, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/airflow/.local/lib/python3.10/site-packages/celery/app/trace.py", line 736, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/airflow/.local/lib/python3.10/site-packages/airflow/providers/celery/executors/celery_executor_utils.py", line 136, in execute_command
    _execute_in_fork(command_to_exec, celery_task_id)
  File "/home/airflow/.local/lib/python3.10/site-packages/airflow/providers/celery/executors/celery_executor_utils.py", line 151, in _execute_in_fork
    raise AirflowException(msg)
airflow.exceptions.AirflowException: Celery command failed on host: airflow-worker-0.airflow-worker.airflow.svc.cluster.local with celery_task_id 9aec9a2f-7864-4c88-bfe2-4a8e25593053 (PID: 351, Return Code: 256)
webserver日志:
10.60.36.76 - megarobo [20/Dec/2024:07:56:08 +0000] "GET /api/v1/openmetadata/status?dag_id=5515133c-4a36-4cf9-b920-58ee6a24dcc4&only_queued=true HTTP/1.1" 200 2 "-" "Java-http-client/17.0.13"
[2024-12-20T07:56:09.450+0000] {scheduler_job_runner.py:1001} INFO - Exiting scheduler loop as requested number of runs (1 - got to 1) has been reached
[2024-12-20T07:56:09.450+0000] {manager.py:312} INFO - Sending termination message to manager.
[2024-12-20T07:56:09.453+0000] {scheduler_job_runner.py:853} INFO - Deactivating DAGs that haven't been touched since 2024-12-20T07:56:08.262325+00:00
[2024-12-20T07:56:09.474+0000] {process_utils.py:132} INFO - Sending Signals.SIGTERM to group 103. PIDs of all processes in the group: []
[2024-12-20T07:56:09.474+0000] {process_utils.py:87} INFO - Sending the signal Signals.SIGTERM to group 103
[2024-12-20T07:56:09.475+0000] {process_utils.py:101} INFO - Sending the signal Signals.SIGTERM to process 103 as process group is missing.
[2024-12-20T07:56:09.475+0000] {scheduler_job_runner.py:872} INFO - Exited execute loop
[2024-12-20T07:56:09.484+0000] {utils.py:120} DEBUG - Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.10/site-packages/openmetadata_managed_apis/api/utils.py", line 118, in run
    scheduler_job.kill()
  File "/home/airflow/.local/lib/python3.10/site-packages/airflow/utils/session.py", line 79, in wrapper
    return func(*args, session=session, **kwargs)
  File "/home/airflow/.local/lib/python3.10/site-packages/airflow/jobs/job.py", line 161, in kill
    raise AirflowException("Job shut down externally.")
airflow.exceptions.AirflowException: Job shut down externally.

[2024-12-20T07:56:09.485+0000] {utils.py:121} INFO - Rescan Complete: Killed Job: Job shut down externally.
192.168.4.64 - - [20/Dec/2024:07:56:09 +0000] "GET /health HTTP/1.1" 200 318 "-" "kube-probe/1.30"
  • A:找到日志中的['airflow', 'tasks', 'run', '5515133c-4a36-4cf9-b920-58ee6a24dcc4', 'ingestion_task', 'manual__2024-12-20T07:44:03.945304+00:00', '--local', '--subdir', 'DAGS_FOLDER/5515133c-4a36-4cf9-b920-58ee6a24dcc4.py'],去worker pod上执行下,发现worker pod上/opt/airflow/dags和/opt/airflow/dag_generated_configs目录下没有相应的python文件和json,于是把webserver上的文件复制过来,再执行成功了。原因:yaml文件中dag目录没有指定挂盘,要保证每个pod上的dag目录保持同步。

4

  • Q:
Airflow中的任务日志:
airflow-worker-0.airflow-worker.airflow.svc.cluster.local 
*** Found logs served from host 
[http://airflow-worker-0.airflow-worker.airflow.svc.cluster.local:8793/log/dag_id=5515133c-4a36-4cf9-b920-58ee6a24dcc4/run_id=manual__2024-12-20T12:11:25.712723+00:00/task_id=ingestion_task/attempt=1.log](http://airflow-worker-0.airflow-worker.airflow.svc.cluster.local:8793/log/dag_id=5515133c-4a36-4cf9-b920-58ee6a24dcc4/run_id=manual__2024-12-20T12:11:25.712723+00:00/task_id=ingestion_task/attempt=1.log) 
[2024-12-20, 12:11:35 UTC] {local_task_job_runner.py:120} ▶ Pre task execution logs 
[2024-12-20, 12:11:36 UTC] {server_mixin.py:74} INFO - OpenMetadata client running with Server version [1.5.10] and Client version [1.5.10.0] 
[2024-12-20, 12:11:36 UTC] {ingestion_pipeline_mixin.py:52} DEBUG - Created Pipeline Status for pipeline megar-airflow3.5515133c-4a36-4cf9-b920-58ee6a24dcc4: runId='ad6d76ca-9acc-47f3-aabe-d10f06565c11' pipelineState=<PipelineState.running: 'running'> startDate=Timestamp(root=1734696696000) timestamp=Timestamp(root=1734696696000) endDate=None status=None 
[2024-12-20, 12:11:36 UTC] {test_connections.py:203} INFO - Running CheckAccess... 
[2024-12-20, 12:11:37 UTC] {test_connections.py:228} INFO - Test connection results: 
[2024-12-20, 12:11:37 UTC] {test_connections.py:229} INFO - lastUpdatedAt=None status=<StatusType.Running: 'Running'> steps=[TestConnectionStepResult(name='CheckAccess', mandatory=True, passed=True, message=None, errorLog=None)] 
[2024-12-20, 12:11:37 UTC] {metadata.py:57} DEBUG - Source type:airflow,<class 'metadata.ingestion.source.pipeline.airflow.metadata.AirflowSource'> configured 
[2024-12-20, 12:11:37 UTC] {metadata.py:59} DEBUG - Source type:airflow,<class 'metadata.ingestion.source.pipeline.airflow.metadata.AirflowSource'> prepared 
[2024-12-20, 12:11:37 UTC] {local_task_job_runner.py:240} INFO - Task exited with return code Negsignal.SIGKILL 
[2024-12-20, 12:11:37 UTC] {taskinstance.py:3498} INFO - 0 downstream tasks scheduled from follow-on schedule check 
[2024-12-20, 12:11:37 UTC] {local_task_job_runner.py:222} ▲▲▲ Log group end

openmetadata上配置airflow的元数据ingestion,任务执行失败:Task exited with return code Negsignal.SIGKILL

  • A:Yaml文件中没有配置资源,默认资源有问题,设置资源2核4G,搞定
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 212,686评论 6 492
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 90,668评论 3 385
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 158,160评论 0 348
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,736评论 1 284
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,847评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,043评论 1 291
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,129评论 3 410
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,872评论 0 268
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,318评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,645评论 2 327
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,777评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,470评论 4 333
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,126评论 3 317
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,861评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,095评论 1 267
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,589评论 2 362
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,687评论 2 351

推荐阅读更多精彩内容