晚上好
我将不得不在 S3 上使用 Spark,使用 parquet 作为文件格式,使用 Delta Lake 进行“数据管理”。 Spark 和 S3 之间的链接已经解决。 但是当我尝试将 DeltaLake 与 Spark 一起使用时(使用 python)...我收到此错误:
----------------------------------------------------------------------------------
> ::::::::::::::::::::::::::::::::::::::::::::::
>
> :: UNRESOLVED DEPENDENCIES ::
>
> ::::::::::::::::::::::::::::::::::::::::::::::
>
> :: io.delta#delta-core_2.12;2.2.0: not found
>
> ::::::::::::::::::::::::::::::::::::::::::::::
>
>
> :::: ERRORS
> Server access error at url https://repo1.maven.org/maven2/io/delta/delta-core_2.12/2.2.0/delta-core_2.12-2.2.0.pom
> (javax.net.ssl.SSLException: Unexpected error:
> java.security.InvalidAlgorithmParameterException: the trustAnchors
> parameter must be non-empty)
>
> Server access error at url https://repo1.maven.org/maven2/io/delta/delta-core_2.12/2.2.0/delta-core_2.12-2.2.0.jar
> (javax.net.ssl.SSLException: Unexpected error:
> java.security.InvalidAlgorithmParameterException: the trustAnchors
> parameter must be non-empty)
>
> Server access error at url https://repos.spark-packages.org/io/delta/delta-core_2.12/2.2.0/delta-core_2.12-2.2.0.pom (javax.net.ssl.SSLException: Unexpected error:
> java.security.InvalidAlgorithmParameterException: the trustAnchors
> parameter must be non-empty)
>
> Server access error at url https://repos.spark-packages.org/io/delta/delta-core_2.12/2.2.0/delta-core_2.12-2.2.0.jar (javax.net.ssl.SSLException: Unexpected error:
> java.security.InvalidAlgorithmParameterException: the trustAnchors
> parameter must be non-empty)
>
> ---------------------------------------------------------------------------
>
我知道这个错误与 HTTPS 和 SSL 证书(当尝试连接到 maven 或 spark repo 时)以及存储在服务器中的证书(/etc/ssl/certs/java/cacerts)有关。 我已经重新安装 openjdk 11 ,更新证书,做安装后 ca-certificates-java。但错误仍然存在。 我希望有人告诉我如何找到有关此错误的更多信息,并知道 java 是否正在寻找证书的好目录,证书是否好。错误日志不是那么明确。我深入研究了 StackOverFlow 以找到解决方案。但没有解决问题。
感谢您的帮助
晚上好
B.
重新安装openjdk-11 更新 management.properties,java 配置中的安全性(告知 java JKS 格式和 cacerts 位置)
java.security.InvalidAlgorithmParameterException: trustAnchors 参数在 Linux 上必须是非空的,否则为什么默认的信任库是空的
您确定这不是 JAVA 路径问题吗? Spark 基于在 Java 虚拟机上运行的 Scala。只是一个想法。
我找到了我的路。所以这是完整的解释:
我使用的是 Debian 11 发行版,因为我对我在 JVM 上的修改不太自信,所以我删除了
openjdk-11-jdk
包。
我已将文件 cacerts 重命名为
OLD_cacerts
位于 /etc/ssl/certs/java
我确实重新安装了软件包
openjdk-11-jdk
我去了目录
/usr/lib/jvm/java-11-openjdk-amd64/lib/security
并安装了所需的证书(Maven存储库的那个):
sudo keytool -import -file /your-path-to-the-file/upload/repo1-maven-org.pem -alias Maven -keystore cacerts
spark尝试解决包依赖时不再有错误。