Error: "An error occurred while connecting to depot" occurs due to DNS resolution failure when updating an ESXi host using a cluster image
search cancel

Error: "An error occurred while connecting to depot" occurs due to DNS resolution failure when updating an ESXi host using a cluster image

book

Article ID: 411379

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vCenter Server

Issue/Introduction

  • Running a compliance check or remediation on a cluster using an image-based configuration fails.

  • ESXi host /var/run/log/lifecycle.log shows below log lines:

    YYYY-MM-DDTHH:MM:SS Er(##) lifecycle[########]: imagemanagerctl:## vmware.esximage.Errors.DepotConnectError: ([MetadataDownloadError('http://<vCenter_Server_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-vmw__metadata-###__index__.xml', '', "Could not download from depot at http://<vCenter_Server_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-vmw__metadata-227__index__.xml, skipping (('http://<vCenter_Server_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-vmw__metadata-227__index__.xml', '', '<urlopen error [Errno -3] Temporary failure in name resolution>'))"), MetadataDownloadError('http://<vCenter_Server_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-vmw__metadata-149__index__.xml', '', "Could not download from depot at http://<vCenter_Server_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-vmw__metadata-149__index__.xml, skipping (('http://<vCenter_Server_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-vmw__metadata-149__index__.xml', '', '<urlopen error [Errno -3] Temporary failure in name resolution>'))"), MetadataDownloadError('http://<vCenter_Server_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-DEL__metadata-211__index__.xml', '', "Could not download from depot at http://<vCenter_Server_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-DEL__metadata-211__index__.xml, skipping (('http://<vCenter_Server_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-DEL__metadata-211__index__.xml', '', '<urlopen error [Errno -3] Temporary failure in name resolution>'))")

  • During VCF cluster creation, the task can fail at: Remediate ESXi Host(s) to be Compliant with Cluster's Image - Failed

  • In the vSphere Client UI, the following error appears:

    • Failed to connect to depot: 'URL: 'http://<VC_FQDN>:9084/vum/repository/hostupdate/....' Error: <urlopen error [Errno -3] Temporary failure in name resolution>"

  • The ESXi host is unable to resolve the vCenter Server FQDN or IP address. Validate this by running the following command:

    • nslookup <vCenter_Server_FQDN/IP>

Environment

  • VMware Cloud Foundation (VCF) 5.x
  • VMware Cloud Foundation (VCF) 9.x
  • VMware vSphere ESXi 8.x
  • ESX 9.x

Cause

The "Temporary failure in name resolution" error indicates that the ESXi host cannot resolve the FQDN of the vCenter Server referenced in the depot URL.

Resolution

Refer the below steps to resolve the issue. 

  1. Ensure the ESXi host is able to resolve the DNS name of the vCenter Server to an IP address.
  2. If the DNS configuration is incorrect, update the DNS settings by following the Configuring DNS settings documentation.
  3. If DNS network communication is blocked within the environment, follow the steps in Configure the DNS Hosts File by Using ESXCLI Commands

Workaround: Manually map the vCenter IP in the /etc/hosts file.

  • Take SSH of the ESXi host and login with root credentials. 
  • Modify the /etc/hosts files with vCenter IP and FQDN,
    • vi /etc/hosts
      • add the entry
        • <vCenter_IP> <vCenter_FQDN> <vCenter_shortname>
    • :wq!   (To save the file)
  • Perform the check compliance again. 

Additional Information

Error: An error occurred while connecting to depot during ESXi vLCM image upgrade in vSphere 7.x and 8.x