RevolutionAnalytics / AzureML

An R interface to AzureML(https://studio.azureml.net/) experiments, datasets, and web services.
Other
46 stars 22 forks source link

AzureML workspace error - Invalid api_endpoint: https://studioapi.azureml.net #127

Closed maximuslee1226 closed 7 years ago

maximuslee1226 commented 7 years ago

When I run the following code running in HDInsight 3.6 with R server option, I get the following error

library(AzureML)
workspace <- workspace(config = "azureml-settings.json")
Error in workspace(config = "azureml-settings.json") : 
Invalid api_endpoint: https://studioapi.azureml.net

Even after I changed the json config file to https://ussouthcentral.stuido.azureml.net/, I still have the same error.

Please help!

andrie commented 7 years ago

We could probably catch the error better and display a better error message.

Doing a readLines() shows the root cause:

> readLines("https://studioapi.azureml.net")
Error in file(con, "r") : cannot open connection
In addition: Warning message:
In file(con, "r") :
  URL 'https://studioapi.azureml.net/': status was 'Problem with the SSL CA cert (path? access rights?)'

And the solution is documented at the AzureDataLake blog on MSDN: "Solving the problem of “Problem with the SSL CA cert (path? access rights?)” for R server on HDInsight".

Try this:

install.packages(c("curl", "httr"))

Then run your code and it should work.

maximuslee1226 commented 7 years ago

Thank you so much Andrie, That worked! Brandon