Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 18.04 SSL errors #723

Closed
inthebrilliantblue opened this issue Jun 21, 2018 · 10 comments
Closed

Ubuntu 18.04 SSL errors #723

inthebrilliantblue opened this issue Jun 21, 2018 · 10 comments

Comments

@inthebrilliantblue
Copy link
Contributor

inthebrilliantblue commented Jun 21, 2018

CLOSED: FIXED as per instructions from https://stackoverflow.com/questions/6784463/error-trustanchors-parameter-must-be-non-empty/50103533#50103533. Apparently is not backported yet to 18.04 from 18.10 Cosmic.

  • Ripme version: 1.7.54

  • Java version:
    openjdk 10.0.1 2018-04-17
    OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
    OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)

  • Operating system:
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04 LTS
    Release: 18.04
    Codename: bionic

  • Exact URL you were trying to rip when the problem occurred:
    https://www.reddit.com/r/wallpapers/hot

  • Please include any additional information about how to reproduce the problem:
    /gfs is a mounted glusterfs volume which I want ripme to save to in the subdirectory of /gfs/ripme/. I have done the necessary chown chmod to it for it to work, as it does create the reddit_sub_wallpapers directory there.

Expected Behavior

Submit terminal command "java -jar ripme.jar --saveorder --ripsdirectory /gfs/ripme/ --url https://www.reddit.com/r/wallpapers/hot"
and start downloading media from the wallpapers subreddit to directory /gfs/ripme.

Actual Behavior

Submitted command above and recieved these errors instead.

Loaded file:/scripts/ripme/ripme.jar!/rip.properties
Loaded log4j.properties
Initialized ripme v1.7.54
Error while loading https://www.reddit.com/r/wallpapers/hot.json
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.base/sun.security.ssl.Alerts.getSSLException(Alerts.java:214)
at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1974)
at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1926)
at java.base/sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1909)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1436)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:163)
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:449)
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:434)
at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:181)
at com.rarchives.ripme.utils.Http.response(Http.java:130)
at com.rarchives.ripme.ripper.rippers.RedditRipper.getJsonArrayFromURL(RedditRipper.java:132)
at com.rarchives.ripme.ripper.rippers.RedditRipper.getAndParseAndReturnNext(RedditRipper.java:79)
at com.rarchives.ripme.ripper.rippers.RedditRipper.rip(RedditRipper.java:68)
at com.rarchives.ripme.App.rip(App.java:92)
at com.rarchives.ripme.App.ripURL(App.java:258)
at com.rarchives.ripme.App.handleArguments(App.java:241)
at com.rarchives.ripme.App.main(App.java:67)
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.base/sun.security.validator.PKIXValidator.(PKIXValidator.java:89)
at java.base/sun.security.validator.Validator.getInstance(Validator.java:181)
at java.base/sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:330)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:180)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:192)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:133)
at java.base/sun.security.ssl.ClientHandshaker.checkServerCerts(ClientHandshaker.java:1947)
at java.base/sun.security.ssl.ClientHandshaker.certificateStatus(ClientHandshaker.java:1798)
at java.base/sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:276)
at java.base/sun.security.ssl.Handshaker.processLoop(Handshaker.java:1098)
at java.base/sun.security.ssl.Handshaker.processRecord(Handshaker.java:1026)
at java.base/sun.security.ssl.SSLSocketImpl.processInputRecord(SSLSocketImpl.java:1137)
at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1074)
at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at java.base/sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1402)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1429)
... 15 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.base/java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
at java.base/java.security.cert.PKIXParameters.(PKIXParameters.java:120)
at java.base/java.security.cert.PKIXBuilderParameters.(PKIXBuilderParameters.java:104)
at java.base/sun.security.validator.PKIXValidator.(PKIXValidator.java:86)
... 30 more
[!] Error while ripping URL https://www.reddit.com/r/wallpapers/hot
java.io.IOException: Failed to load https://www.reddit.com/r/wallpapers/hot.json after 1 attempts
at com.rarchives.ripme.utils.Http.response(Http.java:137)
at com.rarchives.ripme.ripper.rippers.RedditRipper.getJsonArrayFromURL(RedditRipper.java:132)
at com.rarchives.ripme.ripper.rippers.RedditRipper.getAndParseAndReturnNext(RedditRipper.java:79)
at com.rarchives.ripme.ripper.rippers.RedditRipper.rip(RedditRipper.java:68)
at com.rarchives.ripme.App.rip(App.java:92)
at com.rarchives.ripme.App.ripURL(App.java:258)
at com.rarchives.ripme.App.handleArguments(App.java:241)
at com.rarchives.ripme.App.main(App.java:67)
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.base/sun.security.ssl.Alerts.getSSLException(Alerts.java:214)
at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1974)
at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1926)
at java.base/sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1909)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1436)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:163)
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:449)
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:434)
at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:181)
at com.rarchives.ripme.utils.Http.response(Http.java:130)
... 7 more
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.base/sun.security.validator.PKIXValidator.(PKIXValidator.java:89)
at java.base/sun.security.validator.Validator.getInstance(Validator.java:181)
at java.base/sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:330)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:180)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:192)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:133)
at java.base/sun.security.ssl.ClientHandshaker.checkServerCerts(ClientHandshaker.java:1947)
at java.base/sun.security.ssl.ClientHandshaker.certificateStatus(ClientHandshaker.java:1798)
at java.base/sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:276)
at java.base/sun.security.ssl.Handshaker.processLoop(Handshaker.java:1098)
at java.base/sun.security.ssl.Handshaker.processRecord(Handshaker.java:1026)
at java.base/sun.security.ssl.SSLSocketImpl.processInputRecord(SSLSocketImpl.java:1137)
at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1074)
at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at java.base/sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1402)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1429)
... 15 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.base/java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
at java.base/java.security.cert.PKIXParameters.(PKIXParameters.java:120)
at java.base/java.security.cert.PKIXBuilderParameters.(PKIXBuilderParameters.java:104)
at java.base/sun.security.validator.PKIXValidator.(PKIXValidator.java:86)
... 30 more

@rautamiekka
Copy link
Contributor

First off, you've given /gfs/ripme/ as the target folder, which under normal circumstances is off limits. You probly meant ~/gfs/ripme/.

@inthebrilliantblue
Copy link
Contributor Author

rautamkiekka: No, I really mean /gfs/ripme/. It is a glusterfs mounted volume that I want ripme to save to. Would the save location on the filesystem have an impact on the SSL errors that I see?

@rautamiekka
Copy link
Contributor

^ Wouldn't be the first time something stupid happens, but as the second thing on the suspects list is OpenJDK 10, I had problems with Vuze when I tried that one, and all problems went when I went back to 8.

@inthebrilliantblue
Copy link
Contributor Author

^ Ok, just installed this version to try with ripme 1.7.54, and did the update-alternative on it:

$ java -showversion
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.18.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

And Im still getting the same errors as above. Also I tried just "java -jar ripme.jar --saveorder --url https://www.reddit.com/r/wallpapers/hot" and still got the SSL errors.

@cyian-1756
Copy link
Collaborator

@inthebrilliantblue

Are you only getting ssl errors with ripme? Can you rip other ssl enabled sites?

@cyian-1756
Copy link
Collaborator

After a bit of searching this seems to be a bug to do with java 10 on Ubuntu 18.04

You can read about how to fix it here

@inthebrilliantblue
Copy link
Contributor Author

https://imgur.com/gallery/jmak1cV
Does the same as reddit.

http://vidconblr.tumblr.com/
I get these lines, but it shows the same trustanchors issues Im having. Ctr-c'ed out to stop before rate limit hit me.
[!] Exceeded maximum retries (1) for URL https://78.media.tumblr.com/025b89012dedd78dd367240f00a5e9a0/tumblr_nsvnlshNeV1t0sm54o1_1280.jpg
Downloading file: https://78.media.tumblr.com/1225a574df7ee7a5088bc4a7aed550e5/tumblr_ns259cdQPD1t0sm54o1_1280.jpg Retry #1
[!] Exception while downloading file: https://78.media.tumblr.com/5fcb04ce7ed9637f769935e2e22eeeba/tumblr_ns44p5VARx1qiaklko1_1280.jpg - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Downloading file: https://78.media.tumblr.com/5fcb04ce7ed9637f769935e2e22eeeba/tumblr_ns44p5VARx1qiaklko1_1280.jpg Retry #2
[!] Exception while downloading file: https://78.media.tumblr.com/1225a574df7ee7a5088bc4a7aed550e5/tumblr_ns259cdQPD1t0sm54o1_1280.jpg - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Downloading file: https://78.media.tumblr.com/1225a574df7ee7a5088bc4a7aed550e5/tumblr_ns259cdQPD1t0sm54o1_1280.jpg Retry #2
[!] Exception while downloading file: https://78.media.tumblr.com/1225a574df7ee7a5088bc4a7aed550e5/tumblr_ns259cdQPD1t0sm54o1_1280.jpg - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[!] Exceeded maximum retries (1) for URL https://78.media.tumblr.com/1225a574df7ee7a5088bc4a7aed550e5/tumblr_ns259cdQPD1t0sm54o1_1280.jpg
Downloading file: https://78.media.tumblr.com/1d6869307ab2f2af46298e50d25a5064/tumblr_ns05ydS7Gu1t0sm54o1_1280.jpg Retry #1
Using api key: qpdkY6nMknksfvYAhf2xIHp0iNRLkMlcWShxqzXyFJRxIsZ1Zz
Retrieving http://api.tumblr.com/v2/blog/vidconblr.tumblr.com/posts/photo?api_key=qpdkY6nMknksfvYAhf2xIHp0iNRLkMlcWShxqzXyFJRxIsZ1Zz&offset=100
[!] Exception while downloading file: https://78.media.tumblr.com/1d6869307ab2f2af46298e50d25a5064/tumblr_ns05ydS7Gu1t0sm54o1_1280.jpg - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Downloading file: https://78.media.tumblr.com/1d6869307ab2f2af46298e50d25a5064/tumblr_ns05ydS7Gu1t0sm54o1_1280.jpg Retry #2
[!] Exception while downloading file: https://78.media.tumblr.com/1d6869307ab2f2af46298e50d25a5064/tumblr_ns05ydS7Gu1t0sm54o1_1280.jpg - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[!] Exceeded maximum retries (1) for URL https://78.media.tumblr.com/1d6869307ab2f2af46298e50d25a5064/tumblr_ns05ydS7Gu1t0sm54o1_1280.jpg
Downloading file: https://78.media.tumblr.com/73b9dc56b42d0e3833c016b7247744e3/tumblr_nrz136EWgi1t0sm54o1_1280.jpg Retry #1
[!] Exception while downloading file: https://78.media.tumblr.com/73b9dc56b42d0e3833c016b7247744e3/tumblr_nrz136EWgi1t0sm54o1_1280.jpg - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Downloading file: https://78.media.tumblr.com/73b9dc56b42d0e3833c016b7247744e3/tumblr_nrz136EWgi1t0sm54o1_1280.jpg Retry #2
[!] Exception while downloading file: https://78.media.tumblr.com/73b9dc56b42d0e3833c016b7247744e3/tumblr_nrz136EWgi1t0sm54o1_1280.jpg - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[!] Exceeded maximum retries (1) for URL https://78.media.tumblr.com/73b9dc56b42d0e3833c016b7247744e3/tumblr_nrz136EWgi1t0sm54o1_1280.jpg
Downloading file: https://78.media.tumblr.com/da3c124dafd26e8c17347075b52c8720/tumblr_nryomiNlz21t0sm54o1_1280.jpg Retry #1
[!] Exception while downloading file: https://78.media.tumblr.com/da3c124dafd26e8c17347075b52c8720/tumblr_nryomiNlz21t0sm54o1_1280.jpg - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Downloading file: https://78.media.tumblr.com/da3c124dafd26e8c17347075b52c8720/tumblr_nryomiNlz21t0sm54o1_1280.jpg Retry #2
[!] Exception while downloading file: https://78.media.tumblr.com/9cc39011e06dff4d5f8152d56a2e248a/tumblr_nsiv37Jpoy1t0sm54o2_1280.jpg - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Downloading file: https://78.media.tumblr.com/9cc39011e06dff4d5f8152d56a2e248a/tumblr_nsiv37Jpoy1t0sm54o2_1280.jpg Retry #2
[!] Exception while downloading file: https://78.media.tumblr.com/9cc39011e06dff4d5f8152d56a2e248a/tumblr_nsiv37Jpoy1t0sm54o2_1280.jpg - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[!] Exceeded maximum retries (1) for URL https://78.media.tumblr.com/9cc39011e06dff4d5f8152d56a2e248a/tumblr_nsiv37Jpoy1t0sm54o2_1280.jpg
Downloading file: https://78.media.tumblr.com/81d094e5075b13731fc59ae05e5fb9b3/tumblr_nrykeqZb9Y1t0sm54o1_1280.jpg Retry #1
[!] Exception while downloading file: https://78.media.tumblr.com/81d094e5075b13731fc59ae05e5fb9b3/tumblr_nrykeqZb9Y1t0sm54o1_1280.jpg - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

@inthebrilliantblue
Copy link
Contributor Author

cyian-1756, I was already suggested to try and use openjdk8, which I did switch to to try. Did not work. I will try that link you posted.

@inthebrilliantblue
Copy link
Contributor Author

cyian-1756, that link worked. It seems to be downloading now. I can see files being created on the shares from a windows desktop. Very annoying that a simple change like that can break every java app that uses SSL. Thank you everyone for your help.

@rautamiekka
Copy link
Contributor

Since you used update-alternatives you didn't purge the packages which is likely why you had the same issue with 8u171.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants