Repository navigation
|
Is it possible to run the new version of Airflow 3.0.1 with a self-signed SSL certificate in Docker locally? I updated docker compose for five lines below: AIRFLOW__API__EXPOSE_CONFIG: "true" I updated the health check for API server: airflow-apiserver: Results: When I try to run a simple DAG though, worker calling API server does not like the self-signed certificate. Anyone know any workarounds I am missing? airflow-worker-1 | 2025-05-17 13:12:44.962740 [error ] Task execute_workload[73ed6338-5c59-450c-8e6a-284d52e0cf60] raised unexpected: ConnectError('[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1010)') [celery.app.trace] |
Replies: 5 comments 1 reply
|
Solution for testing only with a self-signed certificate in v3.01. In a Dockerfile for build, add self-signed certificate to Linux. Self-signed certificate must have "localhost" and "airflow-apiserver" included in openssl configuration to support web portal of api server and worker calls to api server. Dockerfile: FROM apache/airflow:3.0.1 |
|
we are facing similar issue while using self signed certificate airflow executor pod is not able to talk to airflow webserver, can you please share your command to generate the certificate? also, we tried turning of verify_ssl = false, but it didn't worked for us too. |
|
Hi I have tried to generate a certificate with localhost and airflow-apiserver as alternative subject names then add it to the container(s) but had no success with it. Sharing your steps would be helpful please? I think this should really also have a config parameter to turn of certificate verification. I imagine it is going to be a common issue. Thanks Daniel |
|
Hi, I have a setup with custom CA. Exporting env variable SSL_CERT_FILE=/path/to/custom-ca.crt on a worker instance solved the issues with untrusted certificates. Airflow v3.0.2 Best, |
|
Python HTTPX (which is used here rather than requests) only uses the environment variables when specifically enabled: Looking at the code there is no point where this is enabled so I am unsure why this would work. I have submitted a fix due out in the next release either way which makes it work. |
Solution for testing only with a self-signed certificate in v3.01. In a Dockerfile for build, add self-signed certificate to Linux. Self-signed certificate must have "localhost" and "airflow-apiserver" included in openssl configuration to support web portal of api server and worker calls to api server.
Dockerfile:
FROM apache/airflow:3.0.1
USER root
RUN apt-get update
&& apt-get install -y --no-install-recommends vim ca-certificates openjdk-17-jre-headless
&& apt-get autoremove -yqq --purge
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*
COPY cert2.pem /usr/local/share/ca-certificates/rootCA.crt
RUN update-ca-certificates
RUN cat /usr/local/share/ca-certificates/rootCA.crt >> 'python …