No subject alternative names matching IP address xxxxxx found

Posted 格格巫 MMQ!!

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了No subject alternative names matching IP address xxxxxx found相关的知识,希望对你有一定的参考价值。

背景:RestTemplate.getForEntity方法 http请求 8443接口(日志里变成https),报错

日志报错:
I/O error on GET request for “https://xxxxxxxxxx”: java.security.cert.CertificateException: No subject alternative names matching IP address xxxxxx found;
nested exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names matching IP address xxxxxx found
采用如下方法解决(可以添加证书或者跳过验证,我采用跳过的方式)
https://blog.csdn.net/flyestcoder/article/details/113242087

再请求报400
RestTemplate将http请求修改为https
再测试就OK了

以上是关于No subject alternative names matching IP address xxxxxx found的主要内容,如果未能解决你的问题,请参考以下文章

JDK安全证书的一个错误消息 No subject alternative names present的解决办法

SpringBoot 连接kafka ssl 报 CertificateException: No subject alternative names present 异常解决

Java笔记-解决WebServiceTemplate中No subject alternative names matching IP address xxx

为啥当我看到通配符条目时出现 javax.net.ssl.SSLHandshakeException: No subject Alternative DNS name matching found 异

Certificate for <xx.xxx.xxx.xxx> doesn‘t match any of the subject alternative names: [xx.xxxx.xxxx.

Certificate for <xx.xxx.xxx.xxx> doesn‘t match any of the subject alternative names: [xx.xxxx.xxxx.