如何将气流调度程序作为守护进程运行? [英] How to run airflow scheduler as a daemon process?
问题描述
我是Airflow的新手。我正在尝试将气流调度程序作为守护进程运行,但是该进程不会存在很长时间。我在airflow.cfg文件中配置了 LocalExecutor,并运行以下命令来启动调度程序。(我正在使用Google计算引擎并通过PuTTY访问服务器)
I am new to Airflow. I am trying to run airflow scheduler as a daemon process, but the process does not live for long. I have configured "LocalExecutor" in airflow.cfg file and ran the following command to start the scheduler.(I am using Google compute engine and accessing server via PuTTY)
airflow scheduler --daemon --num_runs=5 --log-file=/root/airflow/logs/scheduler.log
当我运行此命令时,气流调度程序启动,我可以在气流主文件夹中看到airflow-scheduler.pid文件,但是该过程不会持续很长时间。当我关闭PuTTY会话并重新连接到服务器时,找不到调度程序进程。我想念什么吗?我如何将气流调度程序作为守护进程运行?
When I run this command, the airflow scheduler starts and I can see the airflow-scheduler.pid file in my airflow home folder, but the process does not live for long. When I close the PuTTY session and reconnect to the server, I cannot find the scheduler process. Am I missing something? How can I run the airflow scheduler as a daemon process?
推荐答案
我遇到了类似的问题。
当我将调度程序作为守护进程执行时,我的气流调度程序没有继续作为守护进程运行。
I had a similar problem. My airflow scheduler did not keep running as a deamon process when I executed scheduler as deamon:
airflow scheduler -D
但是当我正常运行时,调度程序确实起作用了。在我删除了airflow-scheduler.err文件并作为守护进程重新运行了调度程序之后,它开始工作:
But the scheduler did work when I ran it normally. After I deleted the airflow-scheduler.err file and rerun the scheduler as a deamon process it started working:
rm airflow-scheduler.err
airflow scheduler -D
这篇关于如何将气流调度程序作为守护进程运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!