Updates are not available after configuring a secure proxy in the vCenter Server Appliance VAMI
search cancel

Updates are not available after configuring a secure proxy in the vCenter Server Appliance VAMI

book

Article ID: 316490

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

After configuring a secure proxy in the vCenter Appliance VAMI, checking for online updates may no longer be possible. The following issue might appear in the applmgmt.log:
 

YYYY:MM:DDtHH:MM:SS[16931]DEBUG:vmware.appliance.update.update_functions:Running /usr/bin/wget --no-check-certificate --connect-timeout 10 -P /storage/core/software-update/updates/index https://vapp-updates.vmware.com/vai-catalog/valm/vmw/8d167796-34d5-4899-be0a-6daade4005a3/upgrade_info.xml -e use_proxy=yes -e http_proxy=https://https://<proxy URL>:3128
YYYY:MM:DDtHH:MM:SS [16931]DEBUG:vmware.appliance.update.update_functions:Running /usr/bin/wget --no-check-certificate --connect-timeout 10 -P /storage/core/software-update/tmp/latest https://vapp-updates.vmware.com/vai-catalog/valm/vmw/8d167796-34d5-4899-be0a-6daade4005a3/6.7.0.20000.latest/manifest/manifest-latest.xml -e use_proxy=yes -e http_proxy=https://https://<proxy URL>:3128
YYYY:MM:DDtHH:MM:SS [16931]DEBUG:vmware.appliance.update.update_functions:Running /usr/bin/wget --no-check-certificate --connect-timeout 10 -P /storage/core/software-update/updates/index https://vapp-updates.vmware.com/vai-catalog/valm/vmw/8d167796-34d5-4899-be0a-6daade4005a3/upgrade_info.xml -e use_proxy=yes -e http_proxy=https://https://<proxy URL>:3128
YYYY:MM:DDtHH:MM:SS [16931]DEBUG:vmware.appliance.update.update_functions:Running /usr/bin/wget --no-check-certificate --connect-timeout 10 -P /storage/core/software-update/tmp/latest https://vapp-updates.vmware.com/vai-catalog/valm/vmw/8d167796-34d5-4899-be0a-6daade4005a3/6.7.0.20000.latest/manifest/manifest-latest.xml -e use_proxy=yes -e http_proxy=https://https://<proxy URL>:3128



Environment

VMware vCenter Server Appliance 6.7.x

Cause

The issue is seen due to pre-coded value of 'https://' in the VAMI update script, causing a doubling of the https:// value as seen in the logs above.

http_proxy=https://https://<proxy URL>:3128

Resolution

Currently there is no resolution.

Workaround:
Modify this file  './usr/lib/applmgmt/update/py/vmware/appliance/update/update_functions.py' after configuring the proxy in the VAMI interface. Please ensure there is a snapshot of the vCenter Server Appliance and have created a backup of the file before proceeding. 

  1. SSH to the appliance
  2. Backup the file
cp ./usr/lib/applmgmt/update/py/vmware/appliance/update/update_functions.py /tmp/update_functions.py
  1. Edit the file ./usr/lib/applmgmt/update/py/vmware/appliance/update/update_functions.py
[BEFORE]

473 def extend_proxy_info_wget(command, info):
474     logger.debug("Using proxy Environment.")
475     if(info.username is not None):
476         command.extend(['-e', 'use_proxy=yes',
477                         '-e', 'http_proxy=https://'+info.username+':'+
478                         info.password+'@'+
479                         info.server+':'+str(info.port)])
480     else:
481         command.extend(['-e', 'use_proxy=yes',
482                         '-e', 'http_proxy=https://'+
483                         info.server+':'+str(info.port)])
484     return command

[AFTER]

473 def extend_proxy_info_wget(command, info):
474     logger.debug("Using proxy Environment.")
475     if(info.username is not None):
476         command.extend(['-e', 'use_proxy=yes',
477                         '-e', 'http_proxy='+info.username+':'+
478                         info.password+'@'+
479                         info.server+':'+str(info.port)])
480     else:
481         command.extend(['-e', 'use_proxy=yes',
482                         '-e', 'http_proxy='+
483                         info.server+':'+str(info.port)])
484     return command
  1. Restart the applmgmt service
service-control --restart applmgmt
  1. Check for Updates within the VAMI