Third party solutions report vim.fault.InvalidLoginReasonRegisterFailed when connecting to vCenter Server
search cancel

Third party solutions report vim.fault.InvalidLoginReasonRegisterFailed when connecting to vCenter Server

book

Article ID: 376827

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Third party solutions report intermittent login failures.

You see the following fault in vpxd.log:

-- ERROR lro-675052729 -- SessionManager -- vim.SessionManager.login: vim.fault.InvalidLogin:
--> Result:
--> (vim.fault.InvalidLogin) {
-->    faultCause = (vmodl.MethodFault) null,
-->    faultMessage = (vmodl.LocalizableMessage) [
-->       (vmodl.LocalizableMessage) {
-->          key = "vim.fault.InvalidLoginWithReason",
-->          arg = (vmodl.KeyAnyValue) [
-->             (vmodl.KeyAnyValue) {
-->                key = "1",
-->                value = "vim.fault.InvalidLoginReasonRegisterFailed"
-->             }
-->          ],
-->          message = <unset>
-->       }
-->    ]

Environment

vCenter Server 7.x

vCenter Server 8.x

Cause

The cause of the issue is due to the API call vim.sessionmanager.login being used incorrectly.

  • vim.SessionManager.login will create a new SessionID. This ID is unique and active for the duration of the connection. Similar to a session cookie.
  • If another vim.SessionManager.login API is invoked within an active already logged on session(sessionID already exists), this call will fail with the fault, vim.fault.InvalidLoginReasonRegisterFailed

Resolution

To prevent the error, do not invoke the vim.SessionManager.login api call within an already logged on user session.

Do not invoke vim.SessionManager.login if there is an already logged on user session or use vim.SessionManager.logout before trying to login within the same session again.