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

Error in curl::curl_fetch_memory(url, handle = handle) Failure when receiving data from the peer #568

Closed
blakiseskream opened this issue Jan 29, 2019 · 2 comments

Comments

@blakiseskream
Copy link

blakiseskream commented Jan 29, 2019

Moved over from SO post here

I am getting an error when performing the below,

httr::GET("https://wd5-services1.myworkday.com/ccx/service/")
#> Error in curl::curl_fetch_memory(url, handle = handle): Failure when receiving data from the peer

Created on 2019-01-29 by the reprex package (v0.2.0).

However the following below does work and returns the expected response.

RCurl::getURL("https://wd5-services1.myworkday.com/ccx/service/")
#> [1] "500 : Invalid request"

Created on 2019-01-29 by the reprex package (v0.2.0).

In the SO post it looks like someone was able to use httr::GET(). Anyone have any ideas on what might be going on?

My system version info is below,

sessionInfo()
#> R version 3.5.2 (2018-12-20)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 7 x64 (build 7601) Service Pack 1
#> 
#> Matrix products: default
#> 
#> locale:
#> [1] LC_COLLATE=English_United States.1252 
#> [2] LC_CTYPE=English_United States.1252   
#> [3] LC_MONETARY=English_United States.1252
#> [4] LC_NUMERIC=C                          
#> [5] LC_TIME=English_United States.1252    
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] compiler_3.5.2  backports_1.1.3 magrittr_1.5    rprojroot_1.3-2
#>  [5] tools_3.5.2     htmltools_0.3.6 yaml_2.2.0      Rcpp_1.0.0     
#>  [9] stringi_1.2.4   rmarkdown_1.10  highr_0.7       knitr_1.21     
#> [13] stringr_1.3.1   xfun_0.3        digest_0.6.18   evaluate_0.12

Created on 2019-02-05 by the reprex package (v0.2.0).

@blakiseskream
Copy link
Author

Update I assume this error has something to do with their SSL? RCurl::getURL() now fails with an SSL cipher error but httr::GET() now works. From this I assume that the original curl::curl_fetch_memory() error has something to do with SSL?

See below examples,

httr::GET("https://wd5-services1.myworkday.com/ccx/service/customreport2/")
#> Response [https://wd5-services1.myworkday.com/ccx/service/customreport2/]
#>   Date: 2019-02-07 01:21
#>   Status: 500
#>   Content-Type: <unknown>
#>   Size: 1 B
#> <BINARY BODY>

Created on 2019-02-06 by the reprex package (v0.2.0).

RCurl::getURL("https://wd5-services1.myworkday.com/ccx/service/customreport2/")
#> Error in function (type, msg, asError = TRUE) : error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

Created on 2019-02-06 by the reprex package (v0.2.0).

And the session info,

sessionInfo()
#> R version 3.5.2 (2018-12-20)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 7 x64 (build 7601) Service Pack 1
#> 
#> Matrix products: default
#> 
#> locale:
#> [1] LC_COLLATE=English_United States.1252 
#> [2] LC_CTYPE=English_United States.1252   
#> [3] LC_MONETARY=English_United States.1252
#> [4] LC_NUMERIC=C                          
#> [5] LC_TIME=English_United States.1252    
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] compiler_3.5.2  backports_1.1.3 magrittr_1.5    rprojroot_1.3-2
#>  [5] tools_3.5.2     htmltools_0.3.6 yaml_2.2.0      Rcpp_1.0.0     
#>  [9] stringi_1.2.4   rmarkdown_1.10  highr_0.7       knitr_1.21     
#> [13] stringr_1.3.1   xfun_0.3        digest_0.6.18   evaluate_0.12

Created on 2019-02-06 by the reprex package (v0.2.0).

@hadley
Copy link
Member

hadley commented Apr 1, 2019

This sort of question is a better fit for https://community.rstudio.com. Do you mind asking it over there?

@hadley hadley closed this as completed Apr 1, 2019
wibeasley added a commit to OuhscBbmc/REDCapR that referenced this issue Jul 19, 2022
I think all this is related to the web server, and how it handles non-SSL request.  I think it's unrelated to REDCap itself.

ref #396

https://stackoverflow.com/questions/51547900/rcurlgeturl-works-httrget-has-failure-when-receiving-data-from-the-peer/52465562

r-lib/httr#568
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

2 participants