Jenkins下载插件报错javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

linux下部署jenkins,jdk为1.8
控制台报错:

img

报错如下:

二月 18, 2022 4:48:31 下午 严重 hudson.model.UpdateCenter$DownloadJob run
Failed to install javax-activation-api
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.security.ssl.Alert.createSSLException(Alert.java:131)
at sun.security.ssl.Alert.createSSLException(Alert.java:117)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:311)
at sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:293)
at sun.security.ssl.TransportContext.dispatch(TransportContext.java:185)
at sun.security.ssl.SSLTransport.decode(SSLTransport.java:152)
at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1392)
at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1300)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:435)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:197)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2739)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2651)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1291)
Caused: java.io.IOException: Failed to load https://updates.jenkins.io/download/plugins/javax-activation-api/1.2.0-2/javax-activation-api.hpi to /var/lib/jenkins/plugins/javax-activation-api.jpi.tmp
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1302)
Caused: java.io.IOException: Failed to download from https://updates.jenkins.io/download/plugins/javax-activation-api/1.2.0-2/javax-activation-api.hpi (redirected to: https://get.jenkins.io/plugins/javax-activation-api/1.2.0-2/javax-activation-api.hpi)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1336)
at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1893)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:2205)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1867)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:121)
at java.lang.Thread.run(Thread.java:748)

我的解答思路和尝试过的方法 :

1、尝试过修改源地址,将配置文件的https改为http,结果报另一个错误
2、修改jdk,从Oracle下载jce_policy-8替换
网上的方法都试过,都没能解决

去官网https://www.jenkins.io/zh/download/?%ra=link上重新下载一个jenkins,我下载的打开是中文版,安装插件没有出现过错误;
Manage Plugins里面

在这里插入图片描述

最后重装jdk就好了,原来是centos自带的,奇怪的是之前也怀疑是jdk的问题,重新指定了jdk路径,但是没有生效