Project

General

Profile

Actions

Support #21932

closed

Error using curl: Handshake failed

Added by Patricia Cabrera 5 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
_InfraScience Systems Engineer
Start date:
Aug 16, 2021
Due date:
% Done:

100%

Estimated time:
VREName:
Zoo-Phytoplankton_EOV

Description

Hello,

I am using an R package (developed by one of my colleagues) to improve one of the scripts of the demo. I have found an error using a function that gets data from an opencpu server -> opencpu.lifewatch.be (only public from R, not from a browser).

I have open an issue on the github of the package (https://github.com/lifewatch/lwdataexplorer/issues/2), but I think the problem must be in our side. Could this be an issue about memory or the Ubuntu version?

# install.packages("devtools")
devtools::install_github("lifewatch/lwdataexplorer")

library(lwdataexplorer)

getStationData("2017-11-01", "2017-12-31", stations = "all", categories = "all")
# Error in curl::curl_fetch_memory(url, handle = handle) : gnutls_handshake() failed: Handshake failed

I saw this issue on stackoverflow that might be related. Seems a problem with the connection protocol: https://stackoverflow.com/questions/60262230/fatal-unable-to-access-gnutls-handshake-failed-handshake-failed


Related issues

Related to D4Science Support - Support #22457: R / Rstudio (FAO Tuna atlas VRE) gnutls_handshake() failed: Handshake failed Closed_InfraScience Systems EngineerNov 23, 2021

Actions
Actions #1

Updated by Leonardo Candela 5 months ago

  • Assignee set to _InfraScience Systems Engineer

I'm tentatively assigning this request to the system engineers that can say about the OS version and the memory however we should properly identify the "engine" you are using.

If I'm not mistaking the scripts you are developing are Jupyter Notebooks ... in this case Andrea Manzi might help digging into this handshake issue.

Actions #2

Updated by Patricia Cabrera 5 months ago

This part of the demo are not Jupyter notebooks, but RMarkdown.

Actions #3

Updated by Andrea Dell'Amico 5 months ago

Patricia Cabrera wrote in #note-2:

This part of the demo are not Jupyter notebooks, but RMarkdown.

Is it on rstudio? it could be a GNU TLS problem, that can ben worked around installing the curl libraries linked to openssl, and recompiling the R curl package after that. Success is not guaranteed, because the rstudio instances do not support the more modern versions of the TLS protocol.

Actions #4

Updated by Andrea Dell'Amico 4 months ago

Patricia Cabrera is this happening on rstudio? what instance?

Actions #5

Updated by Patricia Cabrera 4 months ago

Andrea Dell'Amico wrote in #note-4:

Patricia Cabrera is this happening on rstudio? what instance?

Hello Andrea Dell'Amico , I am using R version 3.4.4. think it must be a problem with the version.

I have tested the Rpackage and functions in the VRE-Jupyter Hub and it worked.

Is there a plan to get an update of Rstudio?

Thanks!

Actions #6

Updated by Andrea Dell'Amico 4 months ago

Patricia Cabrera wrote in #note-5:

Is there a plan to get an update of Rstudio?

Yes, we are working on it. We cannot give you a release date because we are stuck investigating an authentication-related problem.

Actions #7

Updated by Patricia Cabrera 4 months ago

Andrea Dell'Amico wrote in #note-6:

Patricia Cabrera wrote in #note-5:

Is there a plan to get an update of Rstudio?

Yes, we are working on it. We cannot give you a release date because we are stuck investigating an authentication-related problem.

Ok, thank you. I will then keep the script how it was, and include these functions when there is an update of Rstudio.

Actions #8

Updated by Emmanuel Blondel 4 months ago

Hello all, for your information we have the same blocking issue (Handshake failed) since a while in the D4Science Rstudios (Blue-Cloud FisheriesAtlas, i-Marine VREs).

Trying to ping some websites we get this issue:

httr::HEAD("https://pae-paha.pacioos.hawaii.edu")
httr::HEAD("https://www.iana.org/assignments/media-types")

Not sure if it helps, but in case, we tried it on an external RStudio server, with success, and its characteristics are as follow:

  • R

R version 4.1.1 (2021-08-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

  • R Studio

Version 1.4.1106

  • curl
$version
[1] "7.68.0"

$ssl_version
[1] "OpenSSL/1.1.1f"

$libz_version
[1] "1.2.11"

$libssh_version
[1] "libssh/0.9.3/openssl/zlib"

$libidn_version
[1] "2.2.0"

$host
[1] "x86_64-pc-linux-gnu"

$protocols
 [1] "dict"   "file"   "ftp"    "ftps"   "gopher" "http"   "https"  "imap"   "imaps"  "ldap"   "ldaps"  "pop3"   "pop3s" 
[14] "rtmp"   "rtsp"   "scp"    "sftp"   "smb"    "smbs"   "smtp"   "smtps"  "telnet" "tftp"  

$ipv6
[1] TRUE

$http2
[1] TRUE

$idn
[1] TRUE

Actions #9

Updated by Andrea Dell'Amico about 2 months ago

  • Related to Support #22457: R / Rstudio (FAO Tuna atlas VRE) gnutls_handshake() failed: Handshake failed added
Actions #10

Updated by Andrea Dell'Amico about 2 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

I've found the problem, and there's a way to solve it. For some reason, the system installs a libcurl dev version that's linked to gnutls. Switching to the version linked to openssl and reinstalling the R curl and RCurl packages, fixes it.
A reinstallation of curl and RCurl is in progress on all the rstudio servers.

Actions #11

Updated by Patricia Cabrera about 2 months ago

Andrea Dell'Amico wrote in #note-10:

I've found the problem, and there's a way to solve it. For some reason, the system installs a libcurl dev version that's linked to gnutls. Switching to the version linked to openssl and reinstalling the R curl and RCurl packages, fixes it.
A reinstallation of curl and RCurl is in progress on all the rstudio servers.

Great! Can you let me know when it is ready? so i can test my script that was failing before.

Thanks!
Patricia

Actions #12

Updated by Andrea Dell'Amico about 2 months ago

The fixed version has been installed, can you try?

Actions #13

Updated by Patricia Cabrera about 2 months ago

Andrea Dell'Amico wrote in #note-12:

The fixed version has been installed, can you try?

It works now! Thanks a lol for your magic :)

Actions #14

Updated by Andrea Dell'Amico about 2 months ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF