ESXi upgrade failing with an errror as “Cannot execute upgrade script on host”
search cancel

ESXi upgrade failing with an errror as “Cannot execute upgrade script on host”

book

Article ID: 399519

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

esxupdate.log shows below errors,

 

yyyy-mm-ddThh:mm:02Z esxupdate: 2893513: downloader: INFO: Downloading https://vcenterfqdn:9087/vum/repository/hostupdate/vmw/metadata-247.zip to /tmp/tmpk2dmkpck
yyyy-mm-ddThh:mm:25Z esxupdate: 2893513: downloader: WARNING: Download failed: <urlopen error [Errno -3] Temporary failure in name resolution>, 4 retry left...
yyyy-mm-ddThh:mm:28Z esxupdate: 2893513: downloader: WARNING: Download failed: <urlopen error [Errno -3] Temporary failure in name resolution>, 3 retry left...
yyyy-mm-ddThh:mm:31Z esxupdate: 2893513: downloader: WARNING: Download failed: <urlopen error [Errno -3] Temporary failure in name resolution>, 2 retry left...
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: downloader: WARNING: Download failed: <urlopen error [Errno -3] Temporary failure in name resolution>, 1 retry left...
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR: An esxupdate error exception was caught:
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR: Traceback (most recent call last):
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR:   File "/lib64/python3.8/urllib/request.py", line 1354, in do_open
..
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR: socket.gaierror: [Errno -3] Temporary failure in name resolution
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR:
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR: During handling of the above exception, another exception occurred:
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR:
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR: Traceback (most recent call last):
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR:   File "/lib64/python3.8/site-packages/vmware/esximage/Downloader.py", line 359, in _getfromurl
..
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR:   File "/lib64/python3.8/urllib/request.py", line 502, in _call_chain
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR:   File "/lib64/python3.8/urllib/request.py", line 1397, in https_open
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR:   File "/lib64/python3.8/urllib/request.py", line 1357, in do_open
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR: urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR:
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR: During handling of the above exception, another exception occurred:
..
..
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR: vmware.esximage.Downloader.DownloaderError: ('https://vcenterfqdn:9087/vum/repository/hostupdate/vmw/metadata-247.zip', '/tmp/tmpk2dmkpck', '<urlopen error [Errno -3] Temporary failure in name resolution>')
..
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR:     raise Errors.MetadataDownloadError(metaUrl, None, str(e))
yyyy-mm-ddThh:mm:34Z esxupdate: 2893513: esxupdate: ERROR: vmware.esximage.Errors.MetadataDownloadError: ('https://vcenterfqdn:9087/vum/repository/hostupdate/vmw/metadata-247.zip', None, "('https://vcenterfqdn:9087/vum/repository/hostupdate/vmw/metadata-247.zip', '/tmp/tmpk2dmkpck', '<urlopen error [Errno -3] Temporary failure in name resolution>')")

Environment

vCenter 7.x, 8.x

ESXi 7.x, 8.x

Cause

ESXi unable to resolve vCenter FQDN.

Confirmed using below command,

nslookup vcenterfqdn

Resolution

Confirmed the DNS servers which ESXi is using using below command,

cat /etc/resolv.conf

Confirmed ESXi's connectivity to the DNS server using below command,

nc -z dnsserverip 53

We can also check what DNS servers vCenter or other ESXis in the cluster are using and update the correct DNS server on affected ESXi,

 

To configure DNS settings from the vCenter web client:


From the vCenter, choose the host in the inventory.
Click the Configuration tab.
In Networking -> TCP/IP configuration ,Select Default TCP/IP Stack, select Edit.
In the DNS Configuration, specify the Preferred and Alternate DNS server.
Click OK.