Cannot connect to proxy error while configuring Proxy via VAMI page.
search cancel

Cannot connect to proxy error while configuring Proxy via VAMI page.

book

Article ID: 398691

calendar_today

Updated On: 06-04-2025

Products

VMware vCenter Server

Issue/Introduction

  • Configuring proxy via Command line does not cause any error, however, configuring proxy via VAMI fails with the following error :

  • Verify with the following curl command by running it on vCenter server :

curl -v -x https://<proxy_IP>:<proxy_port> https://<vc_IP>

We see output as : "Proxy CONNECT aborted"

  • We see the following log entries in /var/log/vmware/applmgmt/applmgmt.log :

YYYY-MM-DDTHH:MM  [2545822]DEBUG:vmware.appliance.networking.proxy.proxy_impl:method=test, host={'v4': '<VC_IP>', 'v6': None}, config=Config(server='http://<Proxy_server_IP>', port=<Proxy_server_Port>, username='', password='', enabled=True)
YYYY-MM-DDTHH:MM  [2545822]DEBUG:vmware.appliance.networking.proxy.proxy_impl:config: Config(server='http://<Proxy_server_IP>', port=<Proxy_server_Port>, username='', password='', enabled=True)
YYYY-MM-DDTHH:MM  [2545822]INFO:vmware.appliance.networking.proxy.proxy_impl:Test hosts to test proxy on ['https://<VC_IP>']
YYYY-MM-DDTHH:MM  [2545822]INFO:vmware.vherd.base.proxy_utils:Testing connection to https://<VC_IP> through proxy
YYYY-MM-DDTHH:MM  [2545822]DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): <VC_IP>:443
YYYY-MM-DDTHH:MM  [2545822]ERROR:vmware.vherd.base.proxy_utils:Connection to proxy failed with error HTTPSConnectionPool(host='<VC_IP>', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))
YYYY-MM-DDTHH:MM  [2545822]INFO:vmware.appliance.networking.proxy.proxy_impl:Test Host used = None
YYYY-MM-DDTHH:MM  [2545822]DEBUG:vmware.appliance.networking.proxy.proxy_impl:ProxyPingStatus: server = http://<Proxy_server_IP>
 status = SERVER_UNREACHABLE
message = {'id': 'com.vmware.appliance.proxy.connect_failure', 'default_message': 'Cannot connect to proxy server.', 'args': []} 

 

Environment

vCenter server 7.x and 8.x

Cause

  • In previous versions vCenter Server, while configuring the proxy via VAMI an authentication test was performed by the proxy server reaching out to vmware.com
  • In the latest version of vCenter Server, vCenter tries to connect to itself via the proxy and if this connection is not allowed, the configuration fails. 

Resolution

  •  Allow VC IP to connect to VC via proxy.
  • As a workaround, configure proxy via CLI. Refer to option 2 in How to configure Proxy Settings for vCenter Server 
  • In rare cases, the /etc/sysconfig/proxy file may contain extra characters or lines that render the proxy configuration invalid. To ensure proper functionality, verify the contents of the proxy file against the reference settings provided below, and ensure that no additional or unexpected lines are present.

# 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"

  • Reboot the vCenter Server Appliance to commit the changes.