Symptoms:
List operation failed, please try again
.Internal error occurs during execution of update process
."
vsphere_ui:ComponentDiscovery ERROR transport Command ['rpm', '-q', 'vsphere-ui'] exit-code=1, stdout=package vsphere-ui is not installed, stderr=
vsphere_ui:ComponentDiscovery ERROR vmware_b2b.patching.executor.hook_executor Patch hook 'vsphere_ui:ComponentDiscovery' failed.
Traceback (most recent call last):
File "/storage/core/software-update/updates/8.0.3.00300/scripts/patches/py/vmware_b2b/patching/executor/hook_executor.py", line 74, in executeHook
executionResult = systemExtension(args)
File "/storage/core/software-update/updates/8.0.3.00300/scripts/patches/libs/sdk/extensions.py", line 106, in __call__
result = self.extension(*args)
File "/storage/core/software-update/updates/8.0.3.00300/scripts/patches/libs/sdk/extensions.py", line 123, in _func
return func(*args)
File "/storage/core/software-update/updates/8.0.3.00300/scripts/patches/payload/components-script/vsphere_ui/__init__.py", line 91, in discover
source_client_version, source_client_cln = get_client_version_from_rpm()
File "/storage/core/software-update/updates/8.0.3.00300/scripts/patches/payload/components-script/vsphere_ui/version_util.py", line 41, in get_client_version_from_rpm
cmd_out = getCommandOutput(localOpsManager, command)
File "/storage/core/software-update/updates/8.0.3.00300/scripts/patches/libs/sdk/transport/__init__.py", line 215, in getCommandOutput
raise ExecutionException('Command failed with exit-code "%s"' % result.exitCode)
transport.ExecutionException: ('Command failed with exit-code "1"', 999)
2024-10-12T00:54:45.512Z ERROR vmware_b2b.patching.phases.discoverer Could not execute discovery hook in file: /storage/core/software-update/updates/8.0.3.00300/scripts/patches/payload/components-script/vsphere_ui
vCenter Server 7.x
vCenter Server 8.x
Possible corruption in RPM DB.
Note: There are multiple factors to be considered while rebuilding RPM DB. vCenter 7.x runs on Photon 3.0 and 8.0 U2 onwards on Photon 4.0 and the steps to recreate the RPM DB will vary depending on the Photon OS Version.
Step - 1
SSH to vCenter Server
Check the version of underlying Photon OS version by doing "cat /etc/os-release"
cat /etc/os-release
Perform any of below steps depending on the underlying Photon Version:
Create backup of RPM DB:
mkdir -p /root/rpmDbBackupcp -a /var/lib/rpm /root/rpmDbBackup
Remove the following files to avoid stale locks
rm -f /var/lib/rpm/__db*
Rebuild the RPM DBrpm --rebuilddb
rpm --verifydb && echo "DB verification success"
List the packages, this should show the full list of packages installed in the system
rpm -qa
mkdir -p /root/rpmDbBackup
cp -a /var/lib/rpm /root/rpmDbBackup
rpm --rebuilddb
rpm --verifydb && echo "DB verification success"
rpm -qa