-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
SSL link check fails, while curl succeeds #376
Comments
I have three new more URLs that fail the test, but return 200 with curl:
|
Some more, reported by Travis:
The workaround was to add |
anybody home? |
Well, that's part of the rub: was that This issue has come up before: #141 And it seems like passing |
yes, I provided the link to the Travis log
sorry, my knowledge of |
Sure! Generally it looks like this in Ruby: HTMLProofer.check_directory("out/", {
:typhoeus => {
:ssl_verifypeer => false,
:ssl_verifyhost => 0}
}).run I'm embarrassed to say that there doesn't seem to be a way to set Typheous options through the command-line. 😞 I'll open an issue for that. |
I'm currently taking a look at Ruby syntax, but I'm not sure I'll be able to update my travis scripts to replace bash commands with Ruby scripts, so I might wait for the new version that uses command line options. |
Try adding to your travis.yml;
The default CAs shipped with Ubuntu 12.04 are somewhat out of date now. Running |
as the title states, in exactly the same environment, curl was able to access the links; do you think that curl uses a newer list of certificates than the list updated by |
This should fix the problem where you get "response code 0" ie on; Regarding the issue you opened the ticket with; The request to |
I see several actionable items in this issue:
|
Installing libcurl3-dev seems to fix SSL error HTML Proofer gets when trying to get https://mochajs.org/ . See gjtorikian/html-proofer#141 gjtorikian/html-proofer#194 gjtorikian/html-proofer#376
Give the entire rug test doc the once-over, integrating the content on handler testing and adding as much missing stuff as I could think of. Install libcurl3-dev to fix HTML Proofer SSL error when it tests https://mochajs.org/ see gjtorikian/html-proofer#141 gjtorikian/html-proofer#194 gjtorikian/html-proofer#376 Add retry to HTML Proofer. Address review comments.
see if this fixes response code 0 errors gjtorikian/html-proofer#376
Here's the error I get:
I've tried There is no error on CircleCI and on my local machine. Maybe the solution is just to abandon Travis in favour of CircleCI. |
On the issue of getting SSL failures on travis specifically, I'm working on https://github.com/Floppy/jekyll-test which plans to automate all the required setup to make it work reliably, once I've found out how :) |
Also getting this error on Travis:
Re-running the build on Travis CI consistently generates this error. It doesn't occur locally (e.g.
|
Running into the same issue here with the error-code 0:
Travis information
Any other information I can provide to help make this easier to debug? Or would this be more of an issue for typhoeus to deal with? |
I wonder if anyone would try Travis' instructions for Troubleshooting Locally in a Docker Image? |
Personally I gave up, I added From time to time I run a manual build on my machine with the full check. |
@gjtorikian that's a brilliant idea, I forgot you could do that. I'm downloading the docker images now and will give it a go with https://github.com/SomethingNewUK/redirector which fails on a very regular basis :) EDIT: yes, I've now got it replicated locally. html-proofer fails, but curl succeeds. I can investigate more but it's bedtime now. 😴 |
OK, in my travis trusty environment, I'm running:
I've also run Currently I'm still failing with response code 0 in a number of cases, so those aren't the fix. Still looking... :) |
Sorry if I'm a bit noisy while I debug. I decided to drop down to typheous and try directly. So, with a simple GET:
...my test link (https://somethingnew.org.uk/news/2017/05/15/ge2017-brexit.html) returns 0. So that's good. Note that a simple CURL on that url returns a 200 successfully. |
AHA! Got it! Changing the libcurl to use openssl instead of gnutls fixes it. On the travis environment, if I do I've reported this upstream to typhoeus in the linked issue, but we can resolve it here with some instructions and suggested travis config. I'll work out how to get travis to do that itself and report back. |
ok, thank you. |
Keeping this open just so I remember to find a way to convey this fix as in my comment above. |
Yes @gjtorikian, you could also add a section explaining how to run the proofer via a Rakefile. Assume no Ruby knowledge. |
https://github.com/mizzao/andrewmao.net/blob/master/Rakefile |
great! something like this, together with examples how to invoke it, would be useful in the README. |
errors like #539 (comment) possible fix found at gjtorikian/html-proofer#376 (comment)
@Floppy did an amazing job documenting the fix in the wiki, so I just provided links in the README to that document. |
After updating all the spaconference.org links to use https, we're still getting errors in the build, for example: * External link https://[secure]rence.org/spa2017 failed: response code 0 * means something's wrong. It's possible libcurl couldn't connect to the server or perhaps the request timed out. Sometimes, making too many requests at once also breaks things. Either way, the return message (if any) from the server is: SSL connect error This fix is recommended on the [htmlproofer wiki][wiki], following on from gjtorikian/html-proofer#376. [wiki]: https://github.com/gjtorikian/html-proofer/wiki/Using-HTMLProofer-From-Ruby-and-Travis
After updating all the spaconference.org links to use https, we're still getting errors in the build, for example: * External link https://[secure]rence.org/spa2017 failed: response code 0 * means something's wrong. It's possible libcurl couldn't connect to the server or perhaps the request timed out. Sometimes, making too many requests at once also breaks things. Either way, the return message (if any) from the server is: SSL connect error This fix is recommended on the [htmlproofer wiki][wiki], following on from gjtorikian/html-proofer#376. [wiki]: https://github.com/gjtorikian/html-proofer/wiki/Using-HTMLProofer-From-Ruby-and-Travis
We've moved the site to HTTPS today and now the build is failing, for example: * External link http://[secure]rence.org/spa2016 failed: 301 SSL connect error This fix is recommended on the htmlproofer wiki [1], following on from gjtorikian/html-proofer#376. [1]: https://github.com/gjtorikian/html-proofer/wiki/Using-HTMLProofer-From-Ruby-and-Travis
* Use more modern APT installation on Travis not requiring `sudo` * Install `libcurl4-openssl-dev` to prevent HTMLProofer OpenSSL issues (gjtorikian/html-proofer#376) * Use custom HTMLProofer to allow specifying a sensible `timeout` option (the `htmlproofer` command-line does not support options)
* Use more modern APT installation on Travis not requiring `sudo` * Install `libcurl4-openssl-dev` to prevent HTMLProofer OpenSSL issues (gjtorikian/html-proofer#376) * Use custom HTMLProofer to allow specifying a sensible `timeout` option (the `htmlproofer` command-line does not support options)
* Fix SSL issues in TravisCI: gjtorikian/html-proofer#376 (comment) * Update html-proofer version * Update Rakefile options used for html-proofer * Fix pagination linking failure
I still struggle with this. I don't want to include a rake file, it should work directly from travis with --typhoeus_config string but I can not figure out how. Here is my line: |
Are you able to provide the Travis log? I just tried locally and It may be a Travis CI problem. |
Thanks, yes, it is a parsing problem of the travis file, which is why travis does not even start (so there is no log). I found out that removing the space after the ":" works:
Then travis runs and calls the htmlproofer. I still get several: External link <!deleted!> failed: response code 0 means something's wrong. And it definitely does not wait 30 sec (command finishes in 5 sec). So either it does not take the timeout , or does not wait for some other reason. Passing additionally the verbose: true did have an effect. |
|
I have carried this habit from using Travis. Not sure if this is still necessary with GitHub Actions on |
I'm getting the following error when running html-proofer in a Travis job:
However, in exactly the same environment, a curl to that address was ok:
The entire log is available at:
https://travis-ci.org/gnuarmeclipse/gnuarmeclipse.github.io-source/builds/198333357
For the moment I added the offending URLs to the
--url-ignore
list, but perhaps there is something you can do to accept these URLs too.Any thoughts?
The text was updated successfully, but these errors were encountered: