我正在使用官方的docker-compose 文件 of airflow将其拆分。
我的一些容器似乎不健康:
34d8698d67e7 apache/airflow:2.0.2 "/usr/bin/dumb-init …" 31 minutes ago Up 28 minutes (unhealthy) 0.0.0.0:5555->5555/tcp, :::5555->5555/tcp, 8080/tcp airflow_flower_1
a291cf238b9f apache/airflow:2.0.2 "/usr/bin/dumb-init …" 31 minutes ago Up 29 minutes 8080/tcp airflow_airflow-init_1
fdb20e9152f3 apache/airflow:2.0.2 "/usr/bin/dumb-init …" 31 minutes ago Up 29 minutes (unhealthy) 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp airflow_airflow-webserver_1
abf5a16aa846 apache/airflow:2.0.2 "/usr/bin/dumb-init …" 31 minutes ago Up 29 minutes 8080/tcp airflow_airflow-worker_1
f6dc352f407b apache/airflow:2.0.2 "/usr/bin/dumb-init …" 31 minutes ago Up 28 minutes 8080/tcp airflow_airflow-scheduler_1
12dfc71e518f redis:latest "docker-entrypoint.s…" 31 minutes ago Up 29 minutes (healthy) 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp airflow_redis_1然而,例如,其中一个的日志似乎并不能提供很好的信息。
# docker logs -f fdb20e9152f3
WARNING! You should run the image with GID (Group ID) set to 0
even if you use 'airflow' user (UID=50000)
You started the image with UID=50000 and GID=50000
This is to make sure you can run the image with an arbitrary UID in the future.
See more about it in the Airflow's docker image documentation
http://airflow.apache.org/docs/docker-stack/entrypoint
BACKEND=postgresql+psycopg2
DB_HOST=my-db-endpoint
DB_PORT=5432
WARNING! You should run the image with GID (Group ID) set to 0
even if you use 'airflow' user (UID=50000)
You started the image with UID=50000 and GID=50000
This is to make sure you can run the image with an arbitrary UID in the future.
See more about it in the Airflow's docker image documentation
http://airflow.apache.org/docs/docker-stack/entrypoint
BACKEND=postgresql+psycopg2
DB_HOST=my-db-endpoint
DB_PORT=5432不管有什么特定于airflow的问题,我如何才能从docker的角度检查到底发生了什么?
码头工人似乎意识到有几个集装箱不健康。
编辑:两个失败的容器都有healtcheck条件
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:5555/"]和
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080/"]通过查看他们的inspect输出,这似乎失败了。
Failed to connect to localhost port 8080: Connection refused但我无法确定是什么导致了失败。
编辑:我也尝试按照说明首先启动init服务
# docker-compose up airflow-init
Starting airflow_redis_1 ... done
Starting airflow_airflow-init_1 ... done
Attaching to airflow_airflow-init_1
airflow-init_1 | BACKEND=postgresql+psycopg2
airflow-init_1 | DB_HOST=my-db-endpoint
airflow-init_1 | DB_PORT=5432但它永远不会离开,它会打印上面的信息,仅此而已.
发布于 2022-09-26 09:40:22
我遇到了类似的问题,是码头的数量导致了这个问题。当我在mac上运行大量容器时,磁盘空间不足。我设法解决了这个问题,我修剪了码头卷。
码头容积修剪
这将删除mac簿上的任何未使用的卷。在运行此命令之前,请检查是否有任何有用的数据。
发布于 2022-09-27 05:40:29
对于坞-组合,从入口点,组id的默认值是0。
"${AIRFLOW_UID:-50000}:${AIRFLOW_GID:-0}"在您的气流项目存储库中编辑您的docker-compose.yaml文件或ad ass env.sh文件。
发布于 2022-09-27 19:39:07
这似乎是一个错误,因为为运行此映像分配给docker的内存较少,请尝试增加用于docker的可用资源,并查看魔术。
https://stackoverflow.com/questions/67487543
复制相似问题