Unable to patch the vCenter from VAMI/SSH : Error - error in method invocation Expecting value: line 1 column 1 (char 0)
search cancel

Unable to patch the vCenter from VAMI/SSH : Error - error in method invocation Expecting value: line 1 column 1 (char 0)

book

Article ID: 372811

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Unable to start the VCSA patch and unable to stage the ISO patch
  • The VAMI Ui displays an error message stating:

Expecting value line 1 column1 (char 0)

  • When reviewing /var/log/vmware/applmgmt/applmgmt.log, entries similar to below are found:
    <timestamp> AM UTC [2865]DEBUG:vmware.vherd.transport.authorization:Reloading failed modules
    <timestamp> AM UTC [2865]DEBUG:root:Reloading authorization_sso ...
    <timestamp> AM UTC [2865]DEBUG:root:Not reloading authorization_sso for user root
    <timestamp> AM UTC [2865]DEBUG:vmware.vherd.transport.authorization:Checking authorization for user "root" for function "com.vmware.appliance.version1.access.ssh.get" with required role "operator".
    <timestamp> AM UTC [2865]DEBUG:root:Validated user privileges in cache
    <timestamp> AM UTC [2865]DEBUG:vmware.vherd.transport.authorization:Authorization success: user "root" allowed function "com.vmware.appliance.version1.access.ssh.get" with required role "operator"
    <timestamp> AM UTC [2865]DEBUG:root:Validated user privileges in cache
    <timestamp> AM UTC [2865]INFO:vmware.vherd.transport.authorization:Setting superAdmin role for user : root
    <timestamp> AM UTC [2865]DEBUG:root:com.vmware.appliance.version1.access.ssh.get()
    <timestamp> AM UTC [2865]DEBUG:vmware.vherd.transport.authentication_manager:HTTP METHOD b'POST'
    <timestamp> AM UTC [2865]DEBUG:vmware.vherd.transport.authentication_local:authenticateRequest: RPCPath = system.methodSignature
    <timestamp> AM UTC [2865]DEBUG:vmware.vherd.transport.authentication_local:authenticateRequest: received cookie
    <timestamp> AM UTC [2865]DEBUG:vmware.vherd.transport.xmlrpc:Looking for function get
    <timestamp> AM UTC [2865]DEBUG:vmware.vherd.transport.xmlrpc:Method Signature = [['struct', 'string'], '[{"requiredRole": ["requiredRole", false, "str", false]}, {"requiredRole": ["str", "User role."]}, {}, ["requiredRole"], {"suppressCLI": true, "cliAlias": ""}]', 'This interface returns True if the logged in user has\n            the correct required role.', '[{"authorized": ["authorized", false, "bool", false]}, {"authorized": ["bool", "True if the user has the required role"]}, {}, ["authorized"], {"suppressCLI": true, "cliAlias": ""}]']
    <timestamp> AM UTC [2865]DEBUG:vmware.appliance.update.update_state:In State._get using state file /etc/applmgmt/appliance/software_update_state.conf
    <timestamp> AM UTC [2865]INFO:vmware.appliance.update.update_state:Found operation in progress /storage/core/software-update/stage_operation
    <timestamp> AM UTC [2865]DEBUG:vmware.appliance.update.update_state:Operation in progress is finished
    <timestamp> AM UTC [2865]DEBUG:vmware.vherd.transport.vapi:State 'UPDATES_PENDING'

Cause

Pending update details of the config table in the VCDB.

The value for resume-count in the config table in DB gets updated with the string "UPDATES_PENDING" instead of an integer value.

Resolution

To fix this problem, please apply the following steps:

  1. Take a fresh offline snapshot of the vCenter Server Appliance (VCSA), in powered off state. If this VCSA is part of an Enhanced Linked Mode (ELM) replication setup, ensure to take offline snapshots of all members of the ELM.
  2. Open an SSH connection to the VCSA and login with root
  3. Stop the appliance management service:
    # service-control --stop applmgmt
  4. Run the following commands on the VCSA via an SSH session:
    # rm -rf /storage/core/software-update/updates/*
    # rm -rf /storage/core/software-update/stage/*
    # rm -rf /storage/db/patching.db
    # mv /storage/core/software-packages/staged-configuration.json /storage/core
    # mv /etc/applmgmt/appliance/software_update_state.conf /storage/core
  5. Reboot the VCSA
  6. Retry the update.