admin管理员组文章数量:1281065
Java project using apache airflow. Here is dockerfile in root directory:
FROM apache/airflow:2.10.0
USER root
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/
ENV PATH="${JAVA_HOME}/bin/:${PATH}"
RUN DOWNLOAD_URL=".0.2_linux-x64_bin.tar.gz" \
&& TMP_DIR="$(mktemp -d)" \
&& curl -fL "${DOWNLOAD_URL}" --output "${TMP_DIR}/openjdk-11.0.2_linux-x64_bin.tar.gz" \
&& mkdir -p "${JAVA_HOME}" \
&& tar xzf "${TMP_DIR}/openjdk-11.0.2_linux-x64_bin.tar.gz" -C "${JAVA_HOME}" --strip-components=1 \
&& rm -rf "${TMP_DIR}" \
&& java --version
COPY cert/cert_name.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates
USER airflow
WORKDIR /app
And there is an Airflow DAG in this project, that should send a POST request to external service. But after sending, i receive an error in logs:
Task error: Error executing request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targetcertification path to requested target
I open the URL from request path in browser, downloaded the certificate, adding to directory in project and adding this 2 lines in dockerfile above:
COPY cert/cert_name.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates
But it doesn't help, the error still comes back. Please help me, am i doing something wrong? What i need to correct?
本文标签: linuxHow to fixunable to find valid certification path to requested targetStack Overflow
版权声明:本文标题:linux - How to fix - unable to find valid certification path to requested target - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738431305a2086416.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论