none
mrsdeploy can't publish service RRS feed

  • Question

  • Hi,

    I've been trying to install and test Microsoft R server 9.0.1.

    So far I've been able to instantiate a remote connection successfully; however trying the publishService function as per the example in: https://msdn.microsoft.com/en-us/microsoft-r/mrsdeploy/mrsdeploy-websrv-vignette

    " publishService(name = "addition", code = "result <- x + y", inputs = list(x = "numeric", y = "numeric"), outputs = list(result = "numeric"), v = "v1.0.0", alias = "add")"

    results in the following error:

    " Error in curl::curl_fetch_memory(uri, handle = h) : 
      URL using bad/illegal format or missing URL "

    I've tried re-installing the curl and httr packages (inside the Microsoft R server Rgui) with no success. I've also tried installing this on various windows and ubuntu operating systems.

    Any help on getting this up and running would be much appreciated. 

    Saturday, December 10, 2016 3:03 AM

Answers

  • Hello,

    Can you double check that you are first authenticated, all APIS require authentication.

    You can authenticate in two ways via: Active Directory, Azure Active Directory

    ```R

    # ---  First authenticate AD

    endpoint <- "http://YOUR_HOST:12800"
    remoteLogin(endpoint, session = FALSE)

    # --- Next create a service

    ```

    -- OR --

    ```R

    # ---  First authenticate Azure AD

    remoteLoginAAD(
      "https://YOUR_HOST.com",
      authuri = "https://login.windows.net",
      tenantid = "microsoft.com",
      clientid = "YOUR_CLIENT_ID",
      resource = "YOUR_RESOURCE",
      session = FALSE
    )

    # --- Next create service 

    ```

    If this was the issue we will try and make this more prominent in the docs.

    Let us know how it goes. 

    • Marked as answer by Pluto89 Tuesday, December 13, 2016 9:49 AM
    Monday, December 12, 2016 6:05 PM

All replies

  • Hi, you have to login first without commandline like 'remoteLogin("...", commandline=false)'
    • Proposed as answer by szAndrew Thursday, December 15, 2016 6:56 PM
    Monday, December 12, 2016 3:54 PM
  • Hello,

    Can you double check that you are first authenticated, all APIS require authentication.

    You can authenticate in two ways via: Active Directory, Azure Active Directory

    ```R

    # ---  First authenticate AD

    endpoint <- "http://YOUR_HOST:12800"
    remoteLogin(endpoint, session = FALSE)

    # --- Next create a service

    ```

    -- OR --

    ```R

    # ---  First authenticate Azure AD

    remoteLoginAAD(
      "https://YOUR_HOST.com",
      authuri = "https://login.windows.net",
      tenantid = "microsoft.com",
      clientid = "YOUR_CLIENT_ID",
      resource = "YOUR_RESOURCE",
      session = FALSE
    )

    # --- Next create service 

    ```

    If this was the issue we will try and make this more prominent in the docs.

    Let us know how it goes. 

    • Marked as answer by Pluto89 Tuesday, December 13, 2016 9:49 AM
    Monday, December 12, 2016 6:05 PM