Closed HenrikBengtsson closed 4 years ago
Thanks for fixing this. I'm confirming that this now works with the Bioc 3.12 release (Oct 2020) on the same system that previously failed;
> BiocManager::version()
[1] ‘3.12’
> packageVersion("AnnotationHub")
[1] ‘2.22.0’
> hub <- AnnotationHub::AnnotationHub()
|======================================================================| 100%
Testing for internet connectivity via https_proxy... success!
snapshotDate(): 2020-10-27
cc/ @reliscu
Summary
We have HPC hosts that have working HTTP/HTTPS proxies, but no support for nslookup. This causes
AnnotationHub()
to incorrectly believe it has no access to the server. If the internal nslookup test could be skipped, then it would indeed have worked.Issue
Troubleshooting
This is because
AnnotationHub::AnnotationHub
uses:to test whether it can connect to that server. However, a non-nslookup connection test shows that it works:
Another proof that
curl::nslookup()
is a too conservative test is to override it's result, e.g.:Workaround
Call the following first, will workaround the current
AnnotationHub()
limitation:Suggestion
Since it's not "unheard of" that access to nslookup can be restricted on some compute environments, I'd like to suggest to use another approach, e.g. above
curl::curl()
approach, or something that works likecurl --head ...
and checks the return status. The latter could even be a fallback to the currentcurl::nslookup()
test.Even without changing the current approach, it would be neat if one could skip the test and just let it try. One natural approach would be to support:
by updating the code to:
Session info