I'm getting the following error authenticating in R with the Rfacebook package. I'm using a RHEL virtual machine...
Authentication complete. Error in function (type, msg, asError = TRUE)
: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate
verify failed
Please let me know how I can fix this. I have all the needed certificates installed in firefox..
Thanks,
Sam.
Related
I have been running api.bls in R successfully. However, BLS (Bureau of Labor Statistics) increased its security level and now I am getting this error message:
Error in function (type, msg, asError = TRUE) :
Unknown SSL protocol error in connection to api.bls.gov:443
BLS recommended that I turn-off settings TLS 1.0 and use TLS 1.2.
This doesn't help, I am still getting the same message.
Help is appreciated.
I am trying to connect to shinyapps via Rstudio using the setAccountInfo function in the rsconnect package:
rsconnect::setAccountInfo(name='MYACCOUNTNAME',
token='TOKEN',
secret='<SECRET>')
But I am getting the following error:
Error in function (type, msg, asError = TRUE) :
Failed to connect to api.shinyapps.io port 443: Timed out
I am in my office PC and one of the more likely problems would be the firewall of the enterprise, so my questions would be:
Is there a way to workaround this problem and connect anyway?
If not, what would be the instruction I would have to give the IT department to be capable of connecting?
The following options should help you see whats happening:
library(rsconnect)
options(rsconnect.http.trace = TRUE, rsconnect.error.trace = TRUE, rsconnect.http.verbose = TRUE)
rsconnect::setAccountInfo(name='MYACCOUNTNAME',
token='TOKEN',
secret='<SECRET>')
By running this you should see what IP addresses rsconnect is trying to use. Try adding this to a whitelist for your firewall.
If this doesn't work it may be a proxy issue. Issue setting up my shinyapps.io + AUTHORIZE ACCOUNT + time out port 443 This should help set up a proxy in rStudio.
I am trying to publish a shiny app but keep getting the following error:
(note that I've replaced my user/token/secret).
I've been following instructions from Shinyapps.io and here, and I have set up an account at both shinyapps.io and lately even tried RStudio Connect. I always end up at the same SSL certicate error. I'm on a corporate machine behind their firewall. Is there a way I can get my shiny published?
> setAccountInfo("user","token", "secret")
Error in function (type, msg, asError = TRUE) :
SSL certificate problem: unable to get local issuer certificate
Timing stopped at: 0.03 0 0.7
I am facing a challenge when trying to use the HTTR package in R and the GET() function:
pg2 = GET("http://httpbin.org/basic-auth/user/passwd", authenticate("user","passwd"))
and i am getting the below error:
Error in function (type, msg, asError = TRUE) :
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
I have searched on the web and found that I need to update the .Rprofile file using the below command line:
options(RCurlOptions = list(verbose = FALSE, capath = system.file("CurlSSL", "cacert.pem", package = "RCurl"), ssl.verifypeer = FALSE))
but still it doesn't work and I keep getting the same error message.
also when i tried the below code
> HEAD("https://www.google.com", verbose())
About to connect() to www.google.com port 443 (#0)
Trying 173.194.32.211... * connected
Connected to www.google.com (173.194.32.211) port 443 (#0)
successfully set certificate verify locations:
CAfile: C:/Users/malek.safa/Documents/R/win-library/3.0/httr/cacert.pem
CApath: none
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Closing connection #0
Error in function (type, msg, asError = TRUE) :
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
you can see that it is still looking for the CA in the cacert.pm file
I spent about five hours playing with curl and RCurl. I was able to get it working. The option you want is cainfo, not capath. Capath tells RCurl where to look for the certificate file. Cainfo specifies a file.
This works for me with RCurl.
library(RCurl)
cer_file <- "/home/user/curltest/cacert.pem"
server_url <- "some_server"
getURL(server_url, cainfo=cer_file)
Now the question is how to get httr to understand this setting. The documentation talks about a default ca_cert, but doesn't explain how to use a different cert. In my case, I'm connecting to an intranet site that wouldn't be in the default cert. The answer lies in config.R. Httr allows us to set RCurl configuration options as I've done below.
cer_file <- "/home/me/curltest/cacert.pem"
GET(login_url, config=list(cainfo=cer_file))
If you are connecting to the internet, you probably just need to update the default cacert that comes with HTTR. The Readme shows you how to do this. This way you don't need to specify the cert in every call.
setwd("path to httr package")
GET("https://raw.githubusercontent.com/bagder/ca-bundle/e9175fec5d0c4d42de24ed6d84a06d504d5e5a09/ca-bundle.crt",
write_disk("inst/cacert.pem", overwrite = TRUE))
I've been trying to download tweets with the twitteR package in a new PC:
library(twitteR)
z<-searchTwitter("#gold",n=1500)
and I get the following error message:
SSL certificate problem, verify that the CA cert is OK.
Details:\nerror:14090086:SSL
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"
Error in twInterfaceObj$doAPICall(cmd, params, "GET", ...) :
Error: SSL certificate problem, verify that the CA cert is OK.
Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Could you please help me on solving this issue?