airflow异常捕捉
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了airflow异常捕捉相关的知识,希望对你有一定的参考价值。
参考技术A 代码发生错误。将在代码中发生的任何未捕获的异常都将被Airflow捕获并重试该任务。Airflow是一个Airbnb的Workflow开源项目,在Github上已经有超过两点一万星。异常lockfile.AlreadyLocked: ~/airflow/airflow-scheduler.pid is already locked
1 完整异常信息
File "/usr/bin/airflow", line 32, in <module> args.func(args) File "/usr/lib/python2.7/site-packages/airflow/utils/cli.py", line 74, in wrapper return f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/airflow/bin/cli.py", line 1000, in scheduler with ctx: File "/usr/lib/python2.7/site-packages/daemon/daemon.py", line 397, in __enter__ self.open() File "/usr/lib/python2.7/site-packages/daemon/daemon.py", line 389, in open self.pidfile.__enter__() File "/usr/lib/python2.7/site-packages/lockfile/__init__.py", line 197, in __enter__ self.acquire() File "/usr/lib/python2.7/site-packages/daemon/pidfile.py", line 60, in acquire super(TimeoutPIDLockFile, self).acquire(timeout, *args, **kwargs) File "/usr/lib/python2.7/site-packages/lockfile/pidlockfile.py", line 88, in acquire self.path) lockfile.AlreadyLocked: /home/cloudera-scm/airflow/airflow-scheduler.pid is already locked
问题
Airflow调度服务无法启动
解决办法
删除pid文件,重启就ok了。
以上是关于airflow异常捕捉的主要内容,如果未能解决你的问题,请参考以下文章
AirFlow 任务运行异常: Task is not able to be run
Apache Airflow 1.9:作业结束时的数据流异常
获取有关 Airflow on_failure_callback 上下文的异常详细信息