<div class="iteye-blog-content-contain" style="font-size: 14px"></div>
17-04-21 15:10:46,496 INFO us.codecraft.webmagic.Spider(Spider.java:306) ## Spider hz.daoxila.com started!
17-04-21 15:10:47,511 WARN us.codecraft.webmagic.downloader.HttpClientDownloader(HttpClientDownloader.java:92) ## download page https://hz.daoxila.com/HunYan/ error
javax.net.ssl.SSLPeerUnverifiedException: Host name 'hz.daoxila.com' does not match the certificate subject provided by the peer (CN=*.ucdl.pp.uc.cn, OU=IT DEPT, O=广州市动景计算机科技有限公司, L=Guangzhou, ST=Guangdong, C=CN)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:465)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:395)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at us.codecraft.webmagic.downloader.HttpClientDownloader.download(HttpClientDownloader.java:86)
at us.codecraft.webmagic.Spider.processRequest(Spider.java:403)
at us.codecraft.webmagic.Spider.access$2(Spider.java:402)
at us.codecraft.webmagic.Spider$1.run(Spider.java:320)
at us.codecraft.webmagic.thread.CountableThreadPool$1.run(CountableThreadPool.java:74)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
原因:
查看网站证书的安全协议TLS v1.2,
TLS v1.2 wasn't implemented until java 7. Try upgrading your Java version or if you're stuck in java 5 or 6 and REALLY need to use TLS v1.2 try using BouncyCastle: https://goo.gl/Tg3jd0
webmagic maven功能默认是jdk1.6. 部分https的网站会有问题,解决方法,更改成1.7
相关推荐
访问带https请求忽略ssl证书,避免url.openStream报错javax.net.ssl.SSLHandshakeException url = new URL(imageUrl); if("https".equalsIgnoreCase(url.getProtocol())){ SslUtils.ignoreSsl(); } //不添加...
这一库主要提供了`javax.net.ssl`包,包括了SSL/TLS相关的各种类,如`SSLSocket`、`SSLServerSocket`、`SSLEngine`等,它们是构建安全网络连接的基础。`SSLSocket`用于创建客户端到服务器的安全连接,而`...
在Java编程中,`javax.net.ssl.SSLHandshakeException` 是一个常见的错误,通常发生在进行安全套接层(SSL)或传输层安全(TLS)协议握手时出现问题。这个异常通常是由于客户端和服务器之间的证书不匹配、信任锚点...
NULL 博文链接:https://xusaomaiss.iteye.com/blog/723167
解决webMagic0.7.3 出现javax.net.ssl.SSLException: Received fatal alert: protocol_version的问题-附件资源
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure的一个解决方案-附件资源
加密是报:javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair 此处提供 bcprov-ext-jdk15on-154.jar 和 bcprov-jdk15on-154.jar 压缩包中有使用说明
然而,当你遇到“javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair”的错误时,这意味着在建立SSL/TLS连接时,Diffie-Hellman(DH)密钥交换算法遇到了问题。DH是一种非对称...
3. **在Java代码中配置TrustStore**:在Java代码中,你需要设置`javax.net.ssl.trustStore`和`javax.net.ssl.trustStorePassword`系统属性,指向你的TrustStore文件和密码: ```java System.setProperty("javax...
MQTTv5版的客户端库,原地址:... 本资源合入了解决低于android7.0报错Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.net.ssl.SNIHostName"的问题。
import javax.net.ssl.SSLHandshakeException; public class CustomSSLSocketFactory { public static OkHttpClient getUnsafeOkHttpClient() { try { // 创建一个新的OkHttpClient.Builder实例 OkHttpClient....
Classes contained in javax.jms.jar: javax.transaction.xa.XAResource.class javax.jms.BytesMessage.class javax.jms.Message.class javax.jms.JMSException.class javax.jms.Destination.class javax.jms....
javax.jms.BytesMessage.class javax.jms.Connection.class javax.jms.ConnectionConsumer.class javax.jms.ConnectionFactory.class javax.jms.ConnectionMetaData.class javax.jms.DeliveryMode.class javax.jms....
Files contained in javax.persistence.jar: META-INF/MANIFEST.MF javax.persistence.Access.class javax.persistence.AccessType.class javax.persistence.AssociationOverride.class javax.persistence....
这通常涉及到`javax.net.ssl.HttpsURLConnection`类的设置,例如设置`SSLSocketFactory`,处理证书问题。 4. **调用Web Service**:使用生成的客户端代理类,通过其方法调用Web Service。注意,由于是HTTPS,所以在...
Files contained in javax.ejb.jar: META-INF/MANIFEST.MF javax.ejb.AccessLocalException.class javax.ejb.AccessTimeout.class javax.ejb.ActivationConfigProperty.class javax.ejb.AfterBegin.class javax....
WebMagic是一个开源的Java实现的网络爬虫框架,它的核心设计目标是轻量级、模块化,便于扩展和定制。0.7.3版本是WebMagic的一个稳定版本,据描述在实际项目中得到了良好的应用,没有发现明显的错误,这表明其在稳定...
javax.net.ssl.SSLHandshakeException:Chain validation failed timestamp check failed Certificate expired at Wed Nov 20 20:00:00 GMT+08:00 2019 (compared to Mon N… 当你遇到了类似以上的报错,先来说结论:...
ciphers="TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_RC4_128_SHA" /> ``` 在上面的配置信息中,指定了 HTTPS 连接的端口号、协议、SSL/TLS 协议...