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

Trouble accessing datasets with getHdata #148

Closed
thomasgstewart opened this issue Nov 10, 2021 · 2 comments
Closed

Trouble accessing datasets with getHdata #148

thomasgstewart opened this issue Nov 10, 2021 · 2 comments

Comments

@thomasgstewart
Copy link

Several of my students have reported the following error when trying to access datasets with getHdata.

Hmisc::getHdata(nhgh) #loads nhgh, the NHANES data
Error in file(file, “r”) :
  cannot open the connection to ‘https://hbiostat.org/data/repo/Rcontents.txt’
In addition: Warning message:
In file(file, “r”) :
  URL ‘https://hbiostat.org/data/repo/Rcontents.txt’: status was ‘SSL peer certificate or SSH remote key was not OK’
@couthcommander
Copy link
Collaborator

couthcommander commented Nov 10, 2021

While relevant to Hmisc, I think this is either a problem with the users' system or the hbiostat server's generated certificate. This R code should fail on affected computers (basically what Hmisc uses):

file <- url('https://hbiostat.org/data/repo/Rcontents.txt')
ads <- scan(file, list(''), quiet=TRUE)[[1]]

The url function uses one of two methods to connect to a web site, either wininet (windows) or libcurl (unix). I'm not sure how to test wininet, but users could try a couple of things to test curl.
From a terminal (not R), try these commands:

curl -v https://hbiostat.org/data/repo/Rcontents.txt
curl -v --insecure https://hbiostat.org/data/repo/Rcontents.txt

Do both/neither/second-line work? I don't really have a fix for either case but I think this would at least tell us more information about how this is failing. My ultimate guess is that something is misconfigured on the hbiostat server.

I'll note that all of the above work for me on my Linux system.

@harrelfe
Copy link
Owner

After this point in time, I moved from hbiostat.org being on my own AWS server to just being a deployment on netlify. I’ll pretty sure that fixed this problem.

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

3 participants