Spark 编译出现 InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

简介: Spark 编译出现 InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

mvn 编译Spark代码的时候常见错误:

[ERROR] Failed to execute goal on project spark-tools_2.11: Could not resolve dependencies for project org.apache.spark:spark-tools_2.11:jar:2.4.3: Failed to collect dependencies at org.clapper:classutil_2.11:jar:1.1.2: Failed to read artifact descriptor for org.clapper:classutil_2.11:jar:1.1.2: Could not transfer artifact org.clapper:classutil_2.11:pom:1.1.2 from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]

[ERROR]

截图如下:

单独切换到tools模块

获取详细的报错信息

cd tools
 mvn -Pkubernetes -Phadoop-2.7 -Dhadoop.version=2.7.3 -Phive -Phive-thriftserver -DskipTests clean package -e
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at java.security.cert.PKIXParameters.setTrustAnchors (PKIXParameters.java:200)
    at java.security.cert.PKIXParameters.<init> (PKIXParameters.java:120)
    at java.security.cert.PKIXBuilderParameters.<init> (PKIXBuilderParameters.java:104)
    at sun.security.validator.PKIXValidator.<init> (PKIXValidator.java:88)
    at sun.security.validator.Validator.getInstance (Validator.java:179)
    at sun.security.ssl.X509TrustManagerImpl.getValidator (X509TrustManagerImpl.java:312)
    at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit (X509TrustManagerImpl.java:171)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted (X509TrustManagerImpl.java:184)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted (X509TrustManagerImpl.java:124)
    at sun.security.ssl.ClientHandshaker.serverCertificate (ClientHandshaker.java:1508)
    at sun.security.ssl.ClientHandshaker.processMessage (ClientHandshaker.java:215)
    at sun.security.ssl.Handshaker.processLoop (Handshaker.java:1024)
    at sun.security.ssl.Handshaker.process_record (Handshaker.java:954)
    at sun.security.ssl.SSLSocketImpl.readRecord (SSLSocketImpl.java:1065)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake (SSLSocketImpl.java:1384)
    at sun.security.ssl.SSLSocketImpl.startHandshake (SSLSocketImpl.java:1412)
    at sun.security.ssl.SSLSocketImpl.startHandshake (SSLSocketImpl.java:1396)
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at sun.security.ssl.Alerts.getSSLException (Alerts.java:214)
    at sun.security.ssl.SSLSocketImpl.fatal (SSLSocketImpl.java:1958)
    at sun.security.ssl.SSLSocketImpl.fatal (SSLSocketImpl.java:1915)
    at sun.security.ssl.SSLSocketImpl.handleException (SSLSocketImpl.java:1898)
    at sun.security.ssl.SSLSocketImpl.startHandshake (SSLSocketImpl.java:1419)
    at sun.security.ssl.SSLSocketImpl.startHandshake (SSLSocketImpl.java:1396)
    at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket (SSLConnectionSocketFactory.java:396)
    at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.connectSocket (SSLConnectionSocketFactory.java:355)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultHttpClientConnectionOperator.connect (DefaultHttpClientConnectionOperator.java:142)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.PoolingHttpClientConnectionManager.connect (PoolingHttpClientConnectionManager.java:373)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.establishRoute (MainClientExec.java:381)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.execute (MainClientExec.java:237)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.ProtocolExec.execute (ProtocolExec.java:185)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec.execute (RetryExec.java:89)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RedirectExec.execute (RedirectExec.java:111)
    at org.apache.maven.wagon.providers.http.httpclient.impl.client.InternalHttpClient.doExecute (InternalHttpClient.java:185)
    at org.apache.maven.wagon.providers.http.httpclient.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:83)
    at org.apache.maven.wagon.providers.http.wagon.shared.AbstractHttpClientWagon.execute (AbstractHttpClientWagon.java:825)
    at org.apache.maven.wagon.providers.http.wagon.shared.AbstractHttpClientWagon.fillInputData (AbstractHttpClientWagon.java:986)
    at org.apache.maven.wagon.providers.http.wagon.shared.AbstractHttpClientWagon.fillInputData (AbstractHttpClientWagon.java:963)
    at org.apache.maven.wagon.StreamWagon.getInputStream (StreamWagon.java:126)
    at org.apache.maven.wagon.StreamWagon.getIfNewer (StreamWagon.java:88)
    at org.apache.maven.wagon.StreamWagon.get (StreamWagon.java:61)
    at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunne

这里需要分析底层的调用,其实就是java请求http的时候出现安全检查问题

我们忽略安全检查

mvn -Pkubernetes -Phadoop-2.7 -Dhadoop.version=2.7.3 -Phive -Phive-thriftserver -DskipTests clean package -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

即可成功

目录
相关文章
|
1月前
|
分布式计算 大数据 Java
大数据-86 Spark 集群 WordCount 用 Scala & Java 调用Spark 编译并打包上传运行 梦开始的地方
大数据-86 Spark 集群 WordCount 用 Scala & Java 调用Spark 编译并打包上传运行 梦开始的地方
23 1
大数据-86 Spark 集群 WordCount 用 Scala & Java 调用Spark 编译并打包上传运行 梦开始的地方
|
6月前
|
分布式计算 Java Scala
Spark-Adaptive编译和打包
Spark-Adaptive编译和打包
35 0
Spark-Adaptive编译和打包
|
6月前
|
分布式计算 Java Hadoop
Spark3.3.0源码编译补充篇-抓狂的证书问题
Spark3.3.0源码编译补充篇-抓狂的证书问题
44 0
|
分布式计算 Hadoop Java
spark编译:构建基于hadoop的spark安装包及遇到问题总结
spark编译:构建基于hadoop的spark安装包及遇到问题总结
361 0
spark编译:构建基于hadoop的spark安装包及遇到问题总结
|
分布式计算 Java Hadoop
Spark3.2.1源码编译(傻瓜式图文教学)
Spark3.2.1源码编译(傻瓜式图文教学)
511 0
Spark3.2.1源码编译(傻瓜式图文教学)
HIVE3 兼容spark3.XX,编译过程
HIVE3 兼容spark3.XX,编译过程
340 0
HIVE3 兼容spark3.XX,编译过程
|
SQL 分布式计算 Java
spark入门(2.0.1版本):概述,下载,编译,运行环境及实例运行
spark入门(2.0.1版本):概述,下载,编译,运行环境及实例运行
183 0
|
分布式计算 Java Scala
Spark源码打包编译的过程
Spark源码打包编译的过程
308 0
Spark源码打包编译的过程
|
Java Maven
spark2.3.0 源码编译,一次成功。
1》基础环境准备: jdk1.8.0_101 maven 3.3.9 scala2.11.8 安装好上述软件,配置好环境变量,并检查是否生效。
2978 0