分布式部署 airflow (V) 启动 - /usr/lib/systemd/system/airflow-worker.service
最编程
2024-05-05 16:08:50
...
[Unit] Description=Airflow celery worker daemon After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service Wants=mysql.service redis.service [Service] EnvironmentFile=/etc/sysconfig/airflow User=root Group=root Type=simple ExecStart=/root/miniconda3/envs/py36/bin/airflow worker Restart=on-failure RestartSec=10s [Install] WantedBy=multi-user.target
配置完,之后执行以下命令
#重载所有修改过的配置文件 sudo systemctl daemon-reload #查看启动耗时,关键是可以查看启动失败的原因 sudo systemd-analyze verify airflow-webserver.service #查看启动失败任务的启动日志 sudo journalctl -u airflow-webserver.service #查看服务状态 systemctl status airflow-scheduler.service #判断是否自动重启 sudo systemctl is-enabled airflow-worker.service sudo systemctl enable airflow-worker.service #重启任务 systemctl stop airflow-scheduler.service systemctl start airflow-scheduler.service
报错记录:
FileNotFoundError: [Errno 2] No such file or directory: 'gunicorn'
这是因为没有把python3的path加入到PATH中,解决思路找到python3的路径加入到PATH即可
原文地址:https://www.cnblogs.com/wangbin2188/p/13926301.html
上一篇: 如何设置 Gerrit 启动