[使用协议硒插件螺母时的javax.net.ssl.SSLHandshakeException

问题描述 投票:0回答:1

[我正在尝试使用Apache Nutch硒驱动程序为该page编制索引,但是在运行parsechecker命令时,它将引发SSLHandShake异常。

bin/nutch parsechecker -Dplugin.includes='protocol-selenium|parse-tika' -Dselenium.grid.binary=/usr/bin/geckodriver -Dselenium.enable.headless=true  -followRedirects -dumpText https://us.vwr.com/store/product?partNum=68300-353

Fetch failed with protocol status: exception(16), lastModified=0: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake

当我尝试使用协议-httpclient时,Nutch能够抓取页面的内容,但是它不抓取动态内容,因为httpclient不支持它。我也尝试过协议交互硒,但是与此同时我也遇到了SSL握手问题。

我已经下载了证书并已安装在JRE中,但仍然面临相同的问题。

版本:Nutch 1.16

Update-1

现在,当我检查hadoop.log时,它在日志文件中显示以下错误:

Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:505)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
... 12 more
ssl selenium-webdriver nutch
1个回答
0
投票

我认为这与NUTCH-2649有关。对于当前的protocol-httpclientprotocol-http,Nutch具有用于连接的虚拟TrustManager(即,我们不验证证书)。如NUTCH-2649中所述,protocol-selenium不使用自定义TrustManager,而是尝试正确验证证书。

话虽如此,将证书添加到JVM应该可以解决此特定域的问题。硒可能无法访问允许的证书列表。

© www.soinside.com 2019 - 2024. All rights reserved.