我正在使用官方的
我的某些容器似乎不健康:
docker-compose
文件来启动 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
中正在发生的事情呢?
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
但它永远不会退出,只会打印上面的消息,就是这样...
docker-compose up airflow-init
吗? - Elad Kalifdocker-compose up
就可以了,不是吗? - pkaramolhttp://localhost:8080
的curl请求失败,则可能存在防火墙或其他网络问题,阻止对该端口的访问。您能在浏览器中查看Airflow Web服务器GUI吗? - 7yl4r