"Unable to successfully execute post-install.sh" error while patching vCenter Server Appliance 6.5
search cancel

"Unable to successfully execute post-install.sh" error while patching vCenter Server Appliance 6.5

book

Article ID: 338229

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • Patching vCenter Server Appliance 6.5 fails during stage 2 while executing post installation scripts.
  • In the /var/log/vmware/applmgmt/software-package.log file, you see entries similar to

2019-04-10T04:26:34.100 [56914]DEBUG:vmware.vherd.base.extensibility.script_executor:Script hook 'update_script:PatchHook' failed. Exception
Traceback (most recent call last):
File "/usr/lib/applmgmt/base/py/vmware/vherd/base/extensibility/script_executor.py", line 61, in executeHook
executionResult = scriptExtension(args)
File "/usr/lib/applmgmt/base/py/vmware/update/extensions.py", line 103, in __call__
result = self.extension(*args)\
File "/usr/lib/applmgmt/base/py/vmware/update/extensions.py", line 120, in _func
return func(*args)
File "/storage/core/software-packages/scripts/update_script_day0_patching.py", line 245, in patch
raise InternalError("Unable to successfully execute
post-install.sh")
InternalError: Unable to successfully execute
post-install.sh
2019-04-10T04:26:34.100 [52259]DEBUG:vmware.vherd.base.software_update:Failed to execute /storage/core/software-packages/scripts/update_script.py:PatchHook. Exception: Traceback (most recent call last):
File "/usr/lib/applmgmt/base/py/vmware/vherd/base/software_update.py", line 1091, in _runScriptHook
result = scriptExecutor.executeHook(updateScript, hook, specs)
File "/usr/lib/applmgmt/base/py/vmware/vherd/base/extensibility/script_executor_processor.py", line 71, in executeHook
raise ex
InternalError: Unable to successfully execute post-install.sh

  • In messages logs, you see entries similar to:

2019-04-10T04:25:23.653028+00:00 photon-machine sendmail[57082]: My unqualified host name (photon-machine) unknown; sleeping for retry
2019-04-10T03:45:41.913246+00:00 photon-machine sendmail[41255]: unable to qualify my own domain name (photon-machine) -- using short name
2019-04-10T04:26:33.701483+00:00 photon-machine systemd[1]: sendmail.service: Start operation timed out. Terminating.
2019-04-10T04:26:33.713601+00:00 photon-machine systemd[1]: Failed to start Sendmail Mail Transport Agent.
2019-04-10T04:26:33.713834+00:00 photon-machine systemd[1]: sendmail.service: Unit entered failed state.
2019-04-10T04:26:33.714040+00:00 photon-machine systemd[1]: sendmail.service: Failed with result 'timeout'.


Environment

VMware vCenter Server Appliance 6.5.x

Cause

This issue occurs when:
  • Post Install script during patching triggers the below function:
update sendmail.cf post patch
if [ $deploymentType == 'embedded' -o $deploymentType == 'management' ]
then
/usr/lib/vmware-vpx/config_sendmail.sh
fi
 
  • Sendmail is dependent on other binaries which is provided by same package and one of them (newaliases) requires FQDN configured hostname to succeed.
  • FQDN is missing in the /etc/hosts file.

Resolution

To resolve this issue, verify DNS and reboot the appliance to regenerate the /etc/hosts file.

Workaround:
To work around this issue, configure/update the FQDN manually by editing the /etc/hosts file and update the patch again.

Attachments

Failure Snippet.jpg get_app
Failure Snippet get_app