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 vCenter server's /var/log/vmware/vpxd/vpxd.log file:

    -- 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

  • VMware vCenter Server 7.x
  • VMware vCenter Server 8.x

Cause

This 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 errors, do not invoke vim.SessionManager.login during an active user session. If a session exists, call vim.SessionManager.logout before attempting a new login.