dipoo / egdownloader

绅士(exhentai)下载器
GNU General Public License v2.0
220 stars 27 forks source link

创建异常:Received fatal alert: handshake_ failure #43

Open asimodi opened 1 year ago

asimodi commented 1 year ago

创建异常:Received fatal alert: handshake_ failure 麻烦大佬了

dipoo commented 1 year ago

试下在 hosts 文件加入一行:178.175.128.254 s.exhentai.org

asimodi commented 1 year ago

试下在 hosts 文件加入一行:178.175.128.254 s.exhentai.org

抱歉 修改完hosts文件还是提示异常 用e-hentai的地址就可以正常创建任务

dipoo commented 1 year ago

升级jar和脚本到最新

asimodi commented 1 year ago

升级jar和脚本到最新

感谢大佬 已解决问题

zyf722 commented 1 year ago

v0.95.13 版本在搜索里站时重新出现此问题,代理在下载器中测试可以连接,浏览器访问eh和ex都正常。切换为表站可以正常搜索。

错误日志如下:

Jul 05, 2023 11:16:25 AM com.mchange.v2.log.MLog <clinit>
信息: MLog clients using java 1.4+ standard logging.
Jul 05, 2023 11:16:25 AM com.mchange.v2.c3p0.C3P0Registry banner
信息: Initializing c3p0-0.9.0.2 [built 26-September-2005 12:55:26 -0400; debug? true; trace: 10]
Jul 05, 2023 11:16:25 AM com.mchange.v2.c3p0.PoolBackedDataSource getPoolManager
信息: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource@585b151a[ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, description -> null, driverClass -> org.sqlite.JDBC, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 585b151a, idleConnectionTestPeriod -> -1, initialPoolSize -> 3, jdbcUrl -> jdbc:sqlite:data/data.db, loginTimeout -> 0, maxIdleTime -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 300, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, usesTraditionalReflectiveProxies -> false ]
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
    at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
    at org.arong.egdownloader.spider.WebClient.getRequestUseJavaWithCookie(WebClient.java:495)
    at org.arong.egdownloader.ui.work.SearchComicWorker.doInBackground(SearchComicWorker.java:38)
    at org.arong.egdownloader.ui.work.SearchComicWorker.doInBackground(SearchComicWorker.java:1)
    at javax.swing.SwingWorker$1.call(SwingWorker.java:296)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at javax.swing.SwingWorker.run(SwingWorker.java:335)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
    at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
    at org.arong.egdownloader.spider.WebClient.getRequestUseJavaWithCookie(WebClient.java:495)
    at org.arong.egdownloader.ui.work.SearchComicWorker.doInBackground(SearchComicWorker.java:38)
    at org.arong.egdownloader.ui.work.SearchComicWorker.doInBackground(SearchComicWorker.java:1)
    at javax.swing.SwingWorker$1.call(SwingWorker.java:296)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at javax.swing.SwingWorker.run(SwingWorker.java:335)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
    at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
    at org.arong.egdownloader.spider.WebClient.getRequestUseJavaWithCookie(WebClient.java:495)
    at org.arong.egdownloader.ui.work.SearchComicWorker.doInBackground(SearchComicWorker.java:38)
    at org.arong.egdownloader.ui.work.SearchComicWorker.doInBackground(SearchComicWorker.java:1)
    at javax.swing.SwingWorker$1.call(SwingWorker.java:296)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at javax.swing.SwingWorker.run(SwingWorker.java:335)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
    at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
    at org.arong.egdownloader.spider.WebClient.getRequestUseJavaWithCookie(WebClient.java:495)
    at org.arong.egdownloader.ui.work.SearchComicWorker.doInBackground(SearchComicWorker.java:38)
    at org.arong.egdownloader.ui.work.SearchComicWorker.doInBackground(SearchComicWorker.java:1)
    at javax.swing.SwingWorker$1.call(SwingWorker.java:296)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at javax.swing.SwingWorker.run(SwingWorker.java:335)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

试下在 hosts 文件加入一行:178.175.128.254 s.exhentai.org

此处给出的 IP 无法正常访问,域名则返回 404 .

dipoo commented 1 year ago

是不能搜索还是不能创建?

zyf722 commented 1 year ago

是不能搜索还是不能创建?

两者都不能,无法搜索里站,无法通过 ex 链接手动创建任务。

dipoo commented 1 year ago

给个创建任务的截图,能看到控制台输出信息的

zyf722 commented 1 year ago

给个创建任务的截图,能看到控制台输出信息的

QQ截图20230705184144

控制台里隐去的部分是有效的 ex 网址。

dipoo commented 1 year ago

主域名都连不上,只能换代理节点了。

dipoo commented 1 year ago

不开代理,改hosts,178.175.128.254 exhentai.org

zyf722 commented 1 year ago

主域名都连不上,只能换代理节点了。

QQ截图20230705185431 QQ截图20230705185412

感觉不像是代理的问题,在代理测试里 Google 是可以直连的,同时用浏览器也是能够登上 ex 的。

image

dipoo commented 1 year ago

可能是我发布的EXE版本里用的java版本太低,https 协议的兼容性不好。

zyf722 commented 1 year ago

已定位问题,在 HttpsUtils.java 中 42 行禁用了 SNI 导致无法连接,将该行禁用即可,已经提交 pr (#46)。

猜测可能是 ex 开启了强制 SNI 所致。

Stack Overflow 上的一些参考:

另外才发现本项目最早从 13 年就开始维护了,感谢作者多年的付出了!

dipoo commented 1 year ago

感谢,测试了下这样改 hosts 的方式就不行了,我会在开代理的情况下放开 SNI ,发布一个版本看看情况。

这个项目开始就是自用的,现在已经有很多更优秀的替代了,不知不觉快 10 年了,感慨。

asimodi commented 1 year ago

我这里测试了下一切正常 创建下载搜索都没有报错

dipoo commented 1 year ago

我这里测试了下一切正常 创建下载搜索都没有报错

谢谢反馈

asimodi commented 1 year ago

抱歉 好像下载确实出了问题 有的任务显示代码403 创建和搜索暂时没事 坐标北美

dipoo commented 1 year ago

抱歉 好像下载确实出了问题 有的任务显示代码403 创建和搜索暂时没事 坐标北美

403 可能是因为配额不足或者处在E站限流时段,是一直都有的限流手段。

asimodi commented 1 year ago

抱歉 好像下载确实出了问题 有的任务显示代码403 创建和搜索暂时没事 坐标北美

403 可能是因为配额不足或者处在E站限流时段,是一直都有的限流手段。 两个下载任务 其中一个可以正常下载 另一个一直显示403 可以确定配额是够的 应该也不是限流

dipoo commented 1 year ago

给个截图,我看看输出信息

asimodi commented 1 year ago

image

asimodi commented 1 year ago

很奇怪 好像21年之前的都显示403 新的就没有这种问题

dipoo commented 1 year ago

现在应该是限流时段,这个时段即使配额充足也只能下载大概一个月以内的原图。你可以通过浏览器下载原图测试。

不过也奇怪,平常非周末只有北京时间22-03点才限流,今天不知怎么回事。

asimodi commented 1 year ago

好像是的 取消下载原图就行了 感谢作者大大