theotherp / nzbhydra2

Usenet meta search
Other
1.27k stars 76 forks source link

AltHUB Indexer Error - Unable to find valid certification path #246

Closed cdalton713 closed 6 years ago

cdalton713 commented 6 years ago

Log Line:

{"@timestamp":"2018-10-03T21:37:30.003+00:00","@version":"1","message":"Connection check with indexer AltHUB failed with message: Error while communicating with indexer AltHUB. Server returned: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target","logger_name":"org.nzbhydra.indexers.capscheck.NewznabChecker","thread_name":"http-nio-0.0.0.0-5076-exec-5","level":"WARN","level_value":30000,"IPADDRESS":"172.19.0.1"}

nzbhydra-debuginfos-2018-10-03-16-46.zip

theotherp commented 6 years ago

As a quick fix you can just disable SSL certificate verification in the main settings.

I've looked into it and currently don't have an idea how to fix it properly as this is really in depth SSL stuff which I don't know enough about.

juanchristian commented 6 years ago

Have the same issue. Had to disable SSL check.

Hobbabobba commented 6 years ago

carefull: if you disable SSL check in general settings, you disable it for any indexer! better change the URL-setting for AltHub from HTTPS to HTTP and you are fine

theotherp commented 6 years ago

I'll try to add an option to disable certificate checking per indexer as a quick fix and get a proper solution for the problem in the long run, but I don't have much time at the moment.

theotherp commented 6 years ago

I can't reproduce this anymore. Can you verify this is fixed in the latest version?

If not, I at least added an option to disable SSL verification by host.

cdalton713 commented 6 years ago

Still happens for me. I added them to the disable by Host field and it worked again.

Thanks!

nzbhydra-debuginfos-2018-10-23-13-30.zip

Hobbabobba commented 6 years ago

updated to v2.0.11 but it still happens. thx.

theotherp commented 6 years ago

Which docker are you both running?

cdalton713 commented 6 years ago

I've had this issue on my Macbook (idk what version) and on Unraid running docker 18.06.1-ce

theotherp commented 6 years ago

By which maintainer? My docker? linuxserver.io's? Binhex'?

cdalton713 commented 6 years ago

Linuxserver's.

Docker 1bd30973bd80 (if that number is useful)

Hobbabobba commented 6 years ago

Docker from linuxserver (latest)

Hobbabobba commented 6 years ago

tried with a "normal" installation of nzbhydra2 on a Ubuntu 16 LTS server: same problem (didn´t use the docker container)

theotherp commented 6 years ago

Hm, could be related to the use of OpenJDK. At least I'll be able to reproduce it with the docker container.

theotherp commented 6 years ago

The problem is, as far as I understand it, is something called SNI which allows that the same certificate is used for multiple domains (on the same server). While Java 8 and upwards should support that for some reason I can't get it to work with my code. The certificate is found but is supposedly for "althub.co.za" which doesn't match "api.althub.co.za". I had to import the certificate for the latter into the packaged cacerts file. It should work with the next version.

The solution isn't ideal as I would need to do this for any indexer with the same problem but it's a solution nonetheless.

theotherp commented 6 years ago

I just tested it and it works.

cdalton713 commented 6 years ago

You're awesome, thanks! Linuxserver hasn't pushed the update for me yet but I'll try it out soon.

cdalton713 commented 6 years ago

Just updated, still not working for me.

screen shot 2018-10-26 at 8 26 48 am screen shot 2018-10-26 at 8 27 47 am

Unraid LinuxServer.io/hydra2 version 2.0.12 nzbhydra-debuginfos-2018-10-26-08-25.zip

theotherp commented 6 years ago

Try changing "api.althub.co.za" to "althub.co.za".

theotherp commented 6 years ago

I don't understand, it worked when I tested it :-(

cdalton713 commented 6 years ago

Genius! I should have tried that myself... removing api worked!

theotherp commented 6 years ago

That's a workaround, I just found out why the update didn't work. Should hopefully actually work in next release even with "api."

theotherp commented 6 years ago

Shit, still not fixed. Well, it works for now...