我正在使用官方docker yml文件运行airflow。official documentation
我使用以下dockerfile扩展了我的镜像:
FROM apache/airflow:2.0.2
USER root
RUN apt-get update
USER airflow
RUN pip install --no-cache-dir plotly==4.9
RUN pip install --no-cache-dir svglib==1.1.0
RUN pip install --no-cache-dir fpdf2这样做会导致我的调度程序conatiner变得不健康
如何解决此问题?
unhealth scheduler container after extending the official image
这是我从容器中获得的日志:
{
"Status": "unhealthy",
"FailingStreak": 7,
"Log": [
{
"Start": "2021-06-16T12:53:53.059066625Z",
"End": "2021-06-16T12:53:53.843581477Z",
"ExitCode": 2,
"Output": "\nairflow command error: argument GROUP_OR_COMMAND: invalid choice: 'jobs' (choose from 'celery', 'cheat-sheet', 'config', 'connections', 'dags', 'db', 'info', 'kerberos', 'kubernetes', 'plugins', 'pools', 'providers', 'roles', 'rotate-fernet-key', 'scheduler', 'sync-perm', 'tasks', 'users', 'variables', 'version', 'webserver'), see help above.\nusage: airflow [-h] GROUP_OR_COMMAND ...\n\npositional arguments:\n GROUP_OR_COMMAND\n\n Groups:\n celery Celery components\n config View configuration\n connections Manage connections\n dags Manage DAGs\n db Database operations\n kubernetes Tools to help run the KubernetesExecutor\n pools Manage pools\n providers Display providers\n roles Manage roles\n tasks Manage tasks\n users Manage users\n variables Manage variables\n\n Commands:\n cheat-sheet Display cheat sheet\n info Show information about current Airflow and environment\n kerberos Start a kerberos ticket renewer\n plugins Dump information about loaded plugins\n rotate-fernet-key\n Rotate encrypted connection credentials and variables\n scheduler Start a scheduler instance\n sync-perm Update permissions for existing roles and DAGs\n version Show the version\n webserver Start a Airflow webserver instance\n\noptional arguments:\n -h, --help show this help message and exit\n"
}提前感谢!
发布于 2021-06-16 21:53:38
我找到了我的问题的解决方案。
在我的扩展图像中,我使用的是airflow 2.0.2,这是不兼容的。升级到airflow 2.1.0解决了我的问题。
FROM apache/airflow:2.1.0
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential libopenmpi-dev \
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update
USER airflow
RUN pip install --no-cache-dir plotly==4.9
RUN pip install --no-cache-dir svglib==1.1.0
RUN pip install --no-cache-dir fpdf2https://stackoverflow.com/questions/68001003
复制相似问题