"Check Updates" in VAMI fails when the proxy account credentials contain special characters
search cancel

"Check Updates" in VAMI fails when the proxy account credentials contain special characters

book

Article ID: 380518

calendar_today

Updated On:

Products

VMware vCenter Server 7.0 VMware vCenter Server 8.0

Issue/Introduction

Accessing "Update" tab in VAMI and attempting to check for updates results in failure, displaying the error message: "Check the URL and try again."

The /var/log/vmware/applmgmt/applmgmt.log shows entries similar to:

[YYYY-MM-DDThh:mm:ss] DEBUG:vmware.appliance.update.update_functions:Running /usr/bin/wget --server-response --tries 3 --waitretry 1 --connect-timeout 10 -P /storage/core/software-update/tmp/latest https://vapp-updates.vmware.com/vai-catalog/valm/vmw/8d167796-34d5-4899-be0a-6daade4005a3/7.0.3.00800.latest/manifest/manifest-latest.xml -e use_proxy=yes -e https_proxy=https://<PROXY_USERNAME>:P@ssw0rd@<PROXY_SERVER_ADDRESS>:<PROXY_SERVER_PORT>
[YYYY-MM-DDThh:mm:ss] DEBUG:vmware.appliance.update.update_functions:runCommandAndCheckResult failed: '--YYYY-MM-DD hh:mm:ss--  https://vapp-updates.vmware.com/vai-catalog/valm/vmw/8d167796-34d5-4899-be0a-6daade4005a3/7.0.3.00800.latest/manifest/manifest-latest.xml\nResolving ssw0rd@<PROXY_SERVER_ADDRESS>... failed: Name or service not known.\nwget: unable to resolve host address ‘ssw0rd@<PROXY_SERVER_ADDRESS>’\n'

Environment

vCenter Server 7.x
vCenter Server 8.x

Cause

This issue occurs when the proxy account credentials contain certain special character such as "@".
vCenter Server parses the proxy configuration incorrectly due to these special characters.

Resolution

This issue is resolved in vCenter Server 7.0 U3o and 8.0 U2.

Workaround:

  • Log in to vCenter Server with SSH.
  • Backup /usr/lib/applmgmt/update/py/vmware/appliance/update/update_functions.py file
    • cp /usr/lib/applmgmt/update/py/vmware/appliance/update/update_functions.py /usr/lib/applmgmt/update/py/vmware/appliance/update/update_functions.py.bak
  • Edit /usr/lib/applmgmt/update/py/vmware/appliance/update/update_functions.py
    • add quote() to 3 places in extend_proxy_info_wget function:
      [Before]
              user_details = info.username
              if proxy_details is None:
                 logger.error("Proxy details unavailable, trying with only username")
              else:
                 user_details = info.username + ':' + proxy_details['password']
      [After]
              user_details = quote(info.username)
              if proxy_details is None:
                 logger.error("Proxy details unavailable, trying with only username")
              else:
                 user_details = quote(info.username) + ':' + quote(proxy_details['password'])
    • add "from urllib.parse import quote"

[Before]

from vmware.vherd.base.proxy_utils import ProxyUtils

[After]

from vmware.vherd.base.proxy_utils import ProxyUtils
from urllib.parse import quote

  • Restart applmgmt service.
    • service-control --restart applmgmt