[java] idea执行k8s api报错-SSLHandshakeException: should not be presented in certificate_request

0 解决方法

在jdk启动参数加上如下参数,修改ssl 客户端协议:

-Djdk.tls.client.protocols=TLSv1.2

1 错误详情及解决详解

本地java程序单元测试调用k8s相关https api发生报错SSLHandshakeException: should not be presented in certificate_request, 具体内容如下:

Caused by: javax.net.ssl.SSLHandshakeException: extension (5) should not be presented in certificate_requestat java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:314)at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:270)at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:261)at java.base/sun.security.ssl.SSLExtensions.<init>(SSLExtensions.java:89)at java.base/sun.security.ssl.CertificateRequest$T13CertificateRequestMessage.<init>(CertificateRequest.java:818)at java.base/sun.security.ssl.CertificateRequest$T13CertificateRequestConsumer.consume(CertificateRequest.java:922)at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:451)at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:428)at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:184)at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1151)at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1062)at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:336)at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:185)at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)at okhttp3.RealCall.execute(RealCall.java:81)

检索关键词should not be presented in certificate_reques~~删除线格式~~在stackoverflow得到解决办法:

https://stackoverflow.com/questions/61872520/spring-cloud-vault-error-nested-exception-is-javax-net-ssl-sslhandshakeexceptio

两种解决思路:

1、升级java版本;

2、添加启动参数,使用TLSv1.2协议:

-Djdk.tls.client.protocols=TLSv1.2

错误记录-java idea执行k8s https api报错 should not be presented in certificate_request相关推荐

  1. 【错误记录】Android 应用 POST 网络请求报错 ( java.io.IOException: Cleartext HTTP traffic to xxx not permitted )

    文章目录 一.报错信息 二.解决方案 一.报错信息 报错信息如下 : 执行 post 请求信息 , 报如下错误 : W/System.err: java.io.IOException: Clearte ...

  2. 【错误记录】编译 Android 版本的 ijkplayer 报错 ( ./init-android.sh: 第 37 行: cd: android/contrib/: 没有那个文件或目录 )

    文章目录 一.报错信息 二.解决方案 一.报错信息 编译 Android 版本的 ijkplayer 时 , 执行 init-android.sh 脚本 , 报如下错误 ; root@octopus: ...

  3. 【错误记录】Groovy 函数参数动态类型报错 ( Caught: groovy.lang.MissingMethodException: No signature of method )

    文章目录 一.报错信息 二.解决方案 一.报错信息 定义 Groovy 函数 , void fun(object) {object.hello() } 如果传入的 实例对象 中 , 没有定义 hell ...

  4. 【错误记录】Visual Studio 编译 C++ 代码报错 ( To disable deprecation, use _CRT_SECURE_NO_WARNINGS. )

    文章目录 一.报错信息 二.解决方案 一.报错信息 报错信息 : 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C4996 'scanf': This function or variabl ...

  5. 【错误记录】p7zip 交叉编译 Android 版本 NDK 报错 ( error: case value evaluates to -2 , which cannot be narrowed )

    文章目录 一.报错信息 二.解决方案 一.报错信息 下载 7zip 源码 , 下载页面 https://sourceforge.net/projects/p7zip/files/ , 解压源码 , 进 ...

  6. 【错误记录】p7zip 交叉编译 Android 版本 NDK 报错 ( Application.mk | APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 )

    文章目录 一.报错信息 二.解决方案 一.报错信息 下载 7zip 源码 , 下载页面 https://sourceforge.net/projects/p7zip/files/ , 解压源码 , 进 ...

  7. 【错误记录】Tinker 热修复示例运行报错 ( Execution failed for task ‘:app:tinkerProcessD‘ . tinkerId is not set!!! )

    文章目录 一.报错信息 二.问题分析 三.解决方案 1.解决方案 1 2.解决方案 2 一.报错信息 运行 tinker 官方示例 https://github.com/Tencent/tinker/ ...

  8. 【错误记录】编译 Android 版本的 ijkplayer 报错 ( You must define ANDROID_NDK before starting. | 下载指定版本 NDK )

    文章目录 一.报错信息 二.解决方案 一.报错信息 在编译 ijkplayer 的过程中 , 出现 root@octopus:~/ijkplayer/ijkplayer-android/android ...

  9. 【错误记录】Flutter 混合开发获取 BinaryMessenger 报错 ( FlutterActivityAndFragmentDelegate.getFlutterEngine() )

    文章目录 一. 报错信息 二. 解决方案 一. 报错信息 在 Flutter 混合开发中 , 开发 Android 与 Flutter 信息交互功能 ; 创建 BasicMessageChannel ...

  10. 【错误记录】Kotlin 1.5.0 编译报错 ( 1.5.0 中 Float 不能直接转 Byte 类型 )

    文章目录 一.报错信息 二.解决方案 一.报错信息 Kotlin 1.5.01.5.01.5.0 后语法与之前不同 , Float 类型不能直接转为 Byte 类型 , 需要先转为 Int , 然后转 ...

最新文章

  1. Nature | 有机合成的数字化
  2. Tomcat 架构探索
  3. Oracle 密码文件
  4. CentOS7-64bit 编译 Hadoop-2.5.0,并分布式安装
  5. java速算24,Java扑克牌速算24的方法
  6. boost::smart_ptr模块智能指针测试程序
  7. java8 streams_Java 8 Streams API作为友好的ForkJoinPool外观
  8. php怎么去除内容,php怎么把html标签去除?
  9. OpenShift 4 Tekton - Tekton实现包含Gogs+SonaQube+Nexus+Report+WebHook的Pipeline
  10. 在 Mac 上的“照片”中如何把文件夹中的相簿分组?
  11. sqlserver数据库分组查询
  12. python中的stopwords_中文分词停止词stopwords词典,可下载
  13. 生意参谋指数转化api
  14. 概念讲解:大地水准面 | 地球椭球体 | 参考椭球体 | 大地基准面 | 地图投影
  15. 吐血总结让你的项目管理水平提升最快的19种顶级思维
  16. codeforces1292C Xenon‘s Attack on the Gangs
  17. 孤单还是对你最好的惩罚
  18. mysql5.7.19winx64安装_mysql5.7.19winx64安装配置方法图文教程(win10)
  19. Ogre3D 1.8.1 Android移植
  20. HTML页面设计之导航栏

热门文章

  1. 吊打全球的顶级毫米波数字阵列项目-MIDAS
  2. 迅雷下载太慢怎么办?
  3. UE4_模型_Bound(边界)
  4. 密钥mysql_MySQL加密和密钥管理
  5. 日本語トレーニング(二十一)
  6. 狂神说 | Spring完整版笔记
  7. 元宇宙、区块链和潘家园
  8. 金彩教育:选择关键词要参考哪些数据
  9. Git基本知识和常用命令(IDEA)
  10. 俄勒冈之旅_欢迎美好的一天俄勒冈观众-消灭糖尿病2007