vCenter proxy settings configuration is failing with "HTTPS cannot connect to the proxy"
search cancel

vCenter proxy settings configuration is failing with "HTTPS cannot connect to the proxy"

book

Article ID: 400293

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Recently or in the past the vCenter proxy configured was disabled from the VAMI interface.
  • When there is no proxy configured by default the proxy file should look like the example provided below :
root@example-vCenter[ / ]# cat /etc/sysconfig/proxy

# Enable a generation of the proxy settings to the profile.
# This setting allows to turn the proxy on and off while
# preserving the particular proxy setup.
#
PROXY_ENABLED="no"

# Some programs (e.g. wget) support proxies, if set in
# the environment.
# Example: HTTP_PROXY="http://proxy.provider.de:3128/"
HTTP_PROXY=""

# Example: HTTPS_PROXY="https://proxy.provider.de:3128/"
HTTPS_PROXY=""

# Example: FTP_PROXY="http://proxy.provider.de:3128/"
FTP_PROXY=""

# Example: GOPHER_PROXY="http://proxy.provider.de:3128/"
GOPHER_PROXY=""

# Example: SOCKS_PROXY="socks://proxy.example.com:8080"
SOCKS_PROXY=""

# Example: SOCKS5_SERVER="office-proxy.example.com:8881"
SOCKS5_SERVER=""

# Example: NO_PROXY="www.me.de, do.main, localhost"
NO_PROXY="localhost, 127.0.0.1"

Environment

  • VMware vCenter Server 7.x
  • VMware vCenter Server 8.x

Cause

  • Whenever the proxy is being removed from the vCenter, it adds a comma before the localhost in the last line of the /etc/sysconfig/proxy file.
  • A comma-separated list provides the right set of domain names, IP addresses or FQDNs which need to be bypassed.

Resolution

  •    Remove the extra comma ( , ) and spacing before localhost from the last line of the proxy file right after the NO_PROXY=" pattern manually using vi editor
    • SSH into the vCenter appliance as the root user.
    • vi /etc/sysconfig/proxy
    • Press to insert.
    • Navigate to the last line before localhost and remove the comma and spacing ( Once you are done the last line should look like this as seen below ) :
      • example : NO_PROXY="localhost, 127.0.0.1"
    • Press ecs key.
    • wq! and press enter.

OR 

    • SSH into the vCenter appliance as the root user.
    • sed -i 's/^NO_PROXY=", *\(.*\)/NO_PROXY="\1/' /etc/sysconfig/proxy

Note : Above command will remove any accidental leading comma with or without space right after the NO_PROXY=" pattern.

  • Restart the vCenter applmgmt service :
    • service-control --restart applmgmt
  • Try to Configure the proxy again from the VAMI interface.