gpt4 book ai didi

ssl - 使用 protocol-selenium 插件 nutch 时出现 javax.net.ssl.SSLHandshakeException

转载 作者:太空宇宙 更新时间:2023-11-03 14:22:43 24 4
gpt4 key购买 nike

我正在尝试索引这个 page使用 Apache Nutch selenium 驱动程序,但在运行 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

当我尝试使用 protocol-httpclient 时,Nutch 能够抓取页面内容,但它无法抓取动态内容,因为 httpclient 不支持它。我也尝试过 protocol-interactiveselenium,但是我也遇到了 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

最佳答案

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

也就是说,将证书添加到 JVM 应该可以解决这个特定域的问题。也许 selenium 无法访问允许的证书列表。

关于ssl - 使用 protocol-selenium 插件 nutch 时出现 javax.net.ssl.SSLHandshakeException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59322605/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com