Question: Curl error on ensembl biomaRt access
gravatar for fca.collin
4 weeks ago by
fca.collin0 wrote:

Dear all,

I have been using biomaRt package for a while. Since I have reinstalled the OS (debian) I can't get my script working (Code and error below).

Any advise? Thanks in advance.



  biomart <- 'ENSEMBL_MART_ENSEMBL';
  host    <- '';
  dataset <- 'hsapiens_gene_ensembl';

  ensembl <- useMart(
    host    = host,
    biomart = biomart, 
    dataset = dataset

Error in curl::curl_fetch_memory(url, handle = handle) : 
error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure


R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/

 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8       
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                  LC_ADDRESS=C              

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] biomaRt_2.40.4 nvimcom_0.9-82

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.2           AnnotationDbi_1.46.1 magrittr_1.5         hms_0.5.1           
 [5] progress_1.2.2       IRanges_2.18.2       BiocGenerics_0.30.0  bit_1.1-14          
 [9] R6_2.4.0             rlang_0.4.0          httr_1.4.1           stringr_1.4.0       
[13] blob_1.2.0           tools_3.6.1          parallel_3.6.1       Biobase_2.44.0      
[17] DBI_1.0.0            assertthat_0.2.1     bit64_0.9-7          digest_0.6.20       
[21] tibble_2.1.3         crayon_1.3.4         vctrs_0.2.0          S4Vectors_0.22.1    
[25] bitops_1.0-6         curl_4.1             RCurl_1.95-4.12      zeallot_0.1.0       
[29] memoise_1.1.0        RSQLite_2.1.2        stringi_1.4.3        compiler_3.6.1      
[33] pillar_1.4.2         prettyunits_1.0.2    backports_1.1.4      stats4_3.6.1        
[37] XML_3.98-1.20        pkgconfig_2.0.2
biomart curl • 79 views
ADD COMMENTlink written 4 weeks ago by fca.collin0

Can you provide the output from curl::curl_version() ?

From what I can tell doesn't support SSL v3 so you might expect the error, but the curl and openssl libraries available on Debian Buster should be plenty new enough to use more up-to-date protocols.

ADD REPLYlink modified 4 weeks ago • written 4 weeks ago by Mike Smith4.0k

Thanks for the answer.

Hereafter the curl_version. I have to mention that I am not familiar with SSL and curl.

> curl::curl_version()
[1] "7.64.0"

[1] "OpenSSL/1.1.1c"

[1] "1.2.11"

[1] "libssh2/1.8.0"

[1] "2.0.5"

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

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

[1] TRUE

[1] TRUE

[1] TRUE
ADD REPLYlink written 4 weeks ago by fca.collin0

Thanks. I'm no SSL expert either, but having these details makes it easier to try and replicate the problem.

Do you experience the same problem if you use host <- '' or host <- '' ?

ADD REPLYlink written 4 weeks ago by Mike Smith4.0k

It seems to work when using the default host ( while it fails for the other addresses (,,; errors reported below).

So for now, I would say half success, that is already much better, thanks. Do you have any idea about the problem using ensembl archives?


  biomart <- 'ENSEMBL_MART_ENSEMBL';
  host    <- c(
    # => [nok] SSL routines:ssl3_get_record:wrong version number

    , '' # [nok]
    # => [nok] SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

    , ''
    # [=> nok] SSL routines:ssl3_get_record:wrong version number

    , '' # [Ok]
  dataset <- 'hsapiens_gene_ensembl';

  ensembl <- useMart(
    host    = host,
    biomart = biomart, 
    dataset = dataset
ADD REPLYlink written 4 weeks ago by fca.collin0

In this case the jul2019 archive is actually the most recent version of Ensembl, and when you access that URL you get redirected to (try it in a browser).

So it seems like there's two oddities which are probably related:

  1. Your system can't access any https addresses - we see the SSL routines:ssl3_get_record:wrong version number error for both
  2. When usinghttp it doesn't cope with the redirection from the july2019.archive URL to www but if you enter it explicitly it works.

As for why this is the case I don't know right now. The curl version information all looks good to me, but I'll have a dig around and try to find the cause. If this is something inherent with the default settings in Debian you will not be the last person to encounter the issue.

ADD REPLYlink written 4 weeks ago by Mike Smith4.0k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 170 users visited in the last hour