Any idea how to connect to phytozome through biomart? It seems to be an Rcurl problem when digging into the biomaRt code. Specifically, getURL. Something to do with SSL certificates?
library(biomaRt) library(RCurl) phyto <- "https://phytozome.jgi.doe.gov" listMarts(host = phyto)
Request to BioMart web service failed. The BioMart web service you're accessing may be down. Check the following URL and see if this website is available: https://phytozome.jgi.doe.gov:80/biomart/martservice?type=registry&requestid=biomaRt Error in if (!grepl(x = registry, pattern = "^\n*<martregistry>")) { : argument is of length zero
getURL(phyto)
Error in function (type, msg, asError = TRUE) : error:1407742E:SSL routines:SSL23GETSERVER_HELLO:tlsv1 alert protocol version
url.exists(phyto)
[1] FALSE >
sessionInfo()
R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale: [1] LCCOLLATE=EnglishUnited Kingdom.1252 LCCTYPE=EnglishUnited Kingdom.1252 LCMONETARY=EnglishUnited Kingdom.1252 [4] LCNUMERIC=C LCTIME=English_United Kingdom.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] RCurl1.95-4.12 bitops1.0-6 biomaRt_2.38.0
Hey Mike, So I'm following this up again. It turns out that there are issues with doing this on windows but not on mac (for me at least with all my troubleshooting). It is related to the RCurl SSL version on windows vs mac;
Win
Mac
I found that in windows curl itself uses a newer SSL version
I made a small hack to listMarts that uses curl instead of RCurl to obtain the <martregistry> XML information, altered an error check and it worked (well, listing the marts worked)
And this is the output
.
I'm not sure how to get RCurl to change its SSL version, but at least I got here.
Thanks for looking into this in such depth. It's interesting that RCurl for Windows ships with such an outdated version of SSL. I don't think there's anyway to force RCurl to use the correct version of the protocol without instaling libcurl yourself and building the package from source - that's a total pain!
However I'm not sure there's anyreason to prefer RCurl over curl, so I'll look into swapping one for the other inside biomaRt.
I've taken a look at the code, and I think I've actually already removed the parts that relied on RCurl. Can you update your version of biomaRt to at least version 2.40.0? If I use that on Windows it works fine with Phytozome.
Hey Mike,
Sorry for the delay in response, but yes it is all working nicely now on Windows! Thank you greatly for your fast response and fixing of this. This will make my life much easier.
I think there may be a network issue at play here? I still have the error. I'm currently at my university. I may try at home and see what happens.
What happens if you follow the instruction in the error message and go to https://phytozome.jgi.doe.gov:80/biomart/martservice?type=registry&requestid=biomaRt in a browser?
I expect that should fail with a protocol error, so maybe it's more informative to visit https://phytozome.jgi.doe.gov:443/biomart/martservice?type=registry&requestid=biomaRt
So with port 433, the web link works..
But through R it does not;
Error in function (type, msg, asError = TRUE) : error:1407742E:SSL routines:SSL23GETSERVER_HELLO:tlsv1 alert protocol version
I've asked some friends off campus to try, and it works for them so it must be something with my university internet (proxy settings or something. I'm about to ask IT).