Checking image compliance on ESXi fails with "Another task is already in progress" error
search cancel

Checking image compliance on ESXi fails with "Another task is already in progress" error

book

Article ID: 404561

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • ESXi image compliance check fails with below error
    'a failure occurred when starting a host compliance check operation on host: Error: com.vmware.vapi.std.errors.not_allowed_in_current_state Messages: com.vmware.esx.task.contention<Another task is in progress. Please retry later.> '
  • Error in ESXi host var/vmware/lifecycle/task-status.json
    {"52c8####-####-####-########2aa3": {"operation": "com.vmware.esx.settingsdaemon.software.scan", "status": "FAILED", "user": "root", "startTime": "yyyy-mm-ddThh:mm:ss.####", "endTime": "yyyy-mm-ddThh:mm:ss.####", "progress": {"completed": 0, "total": 100}, "error": {"id": "com.vmware.vcIntegrity.lifecycle.EsxImage.DepotConnectError", "message": {"id": "com.vmware.vcIntegrity.lifecycle.EsxImage.DepotConnectError", "default_message": "An error occurred while connecting to depot.", "args": []}, "resolution": null, "time": "yyyy-mm-ddThh:mm:ss.####"}}}
    task-status.json (END)
  • Error in ESXi host /var/run/log/esxupdate.log
    esxupdate: 2101731: LockFile: ERROR: Error locking file /var/run/liveimgdb.pid: [Errno 11] Resource temporarily unavailable, the file is currently locked by process with PID #####
    esxupdate: 2101731: LockFile: ERROR: Failed to lock LockFile /var/run/liveimgdb.pid: ('/var/run/liveimgdb.pid', 'Error locking file /var/run/liveimgdb.pid: [Errno 11] Resource temporarily unavailable, the file is currently locked by process with PID #####'), retrying
  • Error in ESXi host /var/run/log/lifecycle.log
    lifecycle: #####: DepotCollection:331 INFO Could not download from depot at http://vcenter.example.com:9084/vum/repository/hostupdate/__micro-depot__vendor-HPE__HPE-ESXi-8.0-Addon-cumulative_metadata__index__.xml, skipping (('http://vcenter.example.com:9084/vum/repository/hostupdate/__micro-depot__vendor-HPE__HPE-ESXi-8.0-Addon-cumulative_metadata__index__.xml', '',
     out>'))
    lifecycle: #####: DepotCollection:321 DEBUG Downloading depot index.xml from http://vcenter.example.com:9084/vum/repository/hostupdate/__micro-depot__vendor-HDS__HDS-ESXi-8.0-Addon-cumulative_metadata__index__.xml
    lifecycle: #####: Downloader:372 INFO Opening http://vcenter.example.com:9084/vum/repository/hostupdate/__micro-depot__vendor-HDS__HDS-ESXi-8.0-Addon-cumulative_metadata__index__.xml for download
    lifecycle: #####: Downloader:210 WARNING Download failed: <urlopen error timed out>, 9 retry left...
    lifecycle: #####: Downloader:210 WARNING Download failed: <urlopen error timed out>, 8 retry left...
    lifecycle: #####: Downloader:210 WARNING Download failed: <urlopen error timed out>, 7 retry left...
    lifecycle: #####: Downloader:210 WARNING Download failed: <urlopen error timed out>, 6 retry left...
    lifecycle: #####: Downloader:210 WARNING Download failed: <urlopen error timed out>, 5 retry left...
    lifecycle: #####: Downloader:210 WARNING Download failed: <urlopen error timed out>, 4 retry left...
    lifecycle: #####: Downloader:210 WARNING Download failed: <urlopen error timed out>, 3 retry left...
    lifecycle: #####: Downloader:210 WARNING Download failed: <urlopen error timed out>, 2 retry left...
    lifecycle: #####: Downloader:210 WARNING Download failed: <urlopen error timed out>, 1 retry left...
    lifecycle: #####: DepotCollection:331 INFO Could not download from depot at http://vcenter.example.com:9084/vum/repository/hostupdate/__micro-depot__vendor-HDS__HDS-ESXi-8.0-Addon-cumulative_metadata__index__.xml, skipping (('http://vcenter.example.com:9084/vum/repository/hostupdate/__micro-depot__vendor-HDS__HDS-ESXi-8.0-Addon-cumulative_metadata__index__.xml', '',
    '<urlopen error timed out>'))
  • Following steps in KB ESXi compliance check scan in a image based cluster fails with error "Another task is already in progress" do not resolve the issue

Cause

ESXi to vCenter connectivity on port 9084 is not working

Resolution

  1. SSH to the ESXi host with root
  2. List firewall rule to check the current status of update manager
    esxcli network firewall ruleset list | grep -i updateManager

    Sample output
    [root@esxi101:~]  esxcli network firewall ruleset list | grep -i updateManager
    updateManager                    false                         true                     true


  3. Enable the rule
    esxcli network firewall ruleset set --enabled=true -r updateManager
  4. Check ESXi to vCenter connectivity on port 9084
    nc -z vcsa01.example.com 9084

    Expected output
    [root@esxi101:~] nc -z vcsa01.example.com 9084
    Connection to vcsa01.example.com 9084 port [tcp/*] succeeded!
  5. Re-run the Image compliance check

Additional Information