none
Microsoft R Server remoteLogin 400 Bad Request RRS feed

  • Question

  • Hello, i am running a Microsoft R Server 9.1.0. but when i try to open a R remote session with:

    > library(mrsdeploy)
    > remoteLogin("http://examplehostname:12800", session=TRUE, diff=TRUE, commandline=TRUE)
    
    Error: HTTP/1.1 400 Bad Request

    The WebNode logs:

    2017-07-04 11:49:11.738 +02:00 [Error] {"CorrelationId":"938f368c-66b1-4b55-94fb-f70f6fa3815b","Subject":{"uri":"http://localhost:12805","details":-1}}
    2017-07-04 11:49:14.161 +02:00 [Warning] {"CorrelationId":"f36cd3ab-6cdb-4e8b-9034-4db1dd6f7566","Subject":{"Message":"Value cannot be null.\r\nParameter name: loginRequest","StackTrace":"
       at Microsoft.RServer.WebNode.Controllers.LoginController.<LoginAsync>d__4.MoveNext() in C:\\swarm\\workspace\\deployr-9.0.2\\product\\server\\src\\Microsoft.RServer.WebNode\\Controllers\\LoginController.cs:line 57\r\n--- End of stack trace from
     previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__27.MoveNext()\r\n---
     End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__25.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)\r\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext()"}
    2017-07-04 11:49:15.771 +02:00 [Error] {"CorrelationId":"938f368c-66b1-4b55-94fb-f70f6fa3815b","Subject":{"uri":"http://localhost:12805","details":-1}}

    I use LDAP for authentication. That may be related to the cause.


    What's wrong?


    Best Regards,

    Steffen


    Tuesday, July 4, 2017 4:32 PM

Answers

  • Could you confirm that you can log into the administration utility using these credentials and run the diagnostics. If you can, please send the logs for the web and compute nodes. If not, please verify the LDAP settings you have defined. Check out your LDAP settings using the ldp.exe tool and compare them to what you’ve declared in appsettings.json. You can also consult with any Active Directory experts in your organization to identify the correct parameters.

    Regards,

    Josée

    Monday, July 17, 2017 4:58 PM
    Moderator
  • Hi Josée,

    the value of "SearchFilter" in the appsettings.json was formatted incorrectly.

    Thanks,

    Steffen

    Saturday, July 22, 2017 10:26 AM

All replies

  • Hi Steffen,

    It looks like you forgot to add the username and password to your request (Subject":{"Message":"Value cannot be null.\r\nParameter name: loginRequest").  

    Learn more here: https://docs.microsoft.com/en-us/r-server/operationalize/how-to-connect-log-in-with-mrsdeploy#authentication

    Thanks,

    Josee

    Saturday, July 15, 2017 5:00 PM
    Moderator
  • Hi Josee,

    if you left out username and password, there appears a dialog to input these parameters, which i did in the first example.

    But i tried the followding as well with the same result:

    > library(mrsdeploy)
    > remoteLogin("http://examplehostname:12800", session=TRUE, diff=TRUE, commandline=TRUE, username="MYUSER", password="MYPASSWORD")

    Thanks,

    Steffen

    Monday, July 17, 2017 7:08 AM
  • Could you confirm that you can log into the administration utility using these credentials and run the diagnostics. If you can, please send the logs for the web and compute nodes. If not, please verify the LDAP settings you have defined. Check out your LDAP settings using the ldp.exe tool and compare them to what you’ve declared in appsettings.json. You can also consult with any Active Directory experts in your organization to identify the correct parameters.

    Regards,

    Josée

    Monday, July 17, 2017 4:58 PM
    Moderator
  • Hi Josée,

    the value of "SearchFilter" in the appsettings.json was formatted incorrectly.

    Thanks,

    Steffen

    Saturday, July 22, 2017 10:26 AM