When you enable a proxy for VCD cells the web consoles for the virtual machines stops working
search cancel

When you enable a proxy for VCD cells the web consoles for the virtual machines stops working

book

Article ID: 388123

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When you configure a proxy on your VCD ()VMware Cloud Director) cells so they can access the internet through your proxy when you launch a VM consoles from the VCD UI they don't connect.
  • You followed this article to configure the VCD cells proxy VMware Cloud Director Cells Behind Internet Proxy
  • In /opt/vmware/vcloud-director/console-proxy.log on the VCD cells you can see entries similar to:

        <time_stamp> | ERROR    | pool-jetty-36             | ServerWebSocket                | Error: org.eclipse.jetty.websocket.core.exception.WebSocketException: ServerWebSocket OPEN method error: null [server: [L=/#.#.#.#:443 R=/#.#.#.#:51398]] [client: not-connected] | 
        <time_stamp> | DEBUG    | pool-jetty-36             | ServerWebSocket                | onClose: status=1,011, reason=org.eclipse.jetty.websocket.core.exception.WebSocketException: ServerWebSocket OPEN method error: null [server: [L=/#.#.#.#:443 R=/#.#.#.#:51398]] [client: not-connected] | 

Environment

VMware Cloud Director 10.x

Cause

The cause of this issue is that VCD needs to acquire a ticket from vCenter to then connect to the VM console but it needs direct connection to it and the proxy disables that peer to peer connection.

Resolution

Starting with VMware Cloud Director 10.5, you can use the VMware Cloud Director API to manage proxy routing for specific destinations in your environment.
It is recommended to proxy specific VCD traffic through a proxy server instead of configuring the OS level proxy via the /etc/sysconfig/proxy file on the Cells.

Details are available in the documentation, Configure Proxy Routing in VMware Cloud Director.

 Alternatively if the proxy must be set via the /etc/sysconfig/proxy file on the Cells, then use the following process to add the vCenter Server to the NO_PROXY list:

  1. SSH to the VCD Cell as root.
  2. Open the Cell's OS level proxy settings:

     vi /etc/sysconfig/proxy

  3. Add the vCenter FQDN to the NO_PROXY list:

    NO_PROXY="localhost, 127.0.0.1, vcenter.example.com"

  4. Stop and start the VCD services on the Cell for the change to take effect:

    Stop VCD
    /opt/vmware/vcloud-director/bin/cell-management-tool cell -i $(service vmware-vcd pid cell) -s

    Start VCD:
    systemctl start vmware-vcd