Cloud Director cannot establish a connection to vCenter
search cancel

Cloud Director cannot establish a connection to vCenter

book

Article ID: 325551

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • Cloud Director shows vCenter Server in a disconnected state in the Provider UI under Resources, Infrastructure Resources, vCenter Server Instances.
  • Cloud Director reports errors of the form:
Error caused vCenter Server disconnect
 - org.apache.http.conn.HttpHostConnectException: Connect to vcenter.fqdn:443 [vcenter.fqdn/vcenter.ipddr] failed: Connection timed out (Connection timed out)
 - Connect to vcenter.fqdn:443 [vcenter.fqdn/vcenter.ipddr] failed: Connection timed out (Connection timed out)
 - Connection timed out (Connection timed out)
  • Attempting to Reconnect or Edit vCenter Server through the Cloud Director UI report errors such as:
Error caused vCenter Server disconnect
Failed to connect
  • Restarting the Cloud Director services or the Cloud Director Cells has no effect on the issue.
  • Making a curl request from the Cloud Director Cells to the vCenter Server fails or times out:
curl -k -v https://vcenter.ipddr:443
*   Trying vcenter.ipddr:443...
* connect to vcenter.ipddr port 443 failed: Connection timed out
* Failed to connect to vcenter.ipddr port 443 after 130071 ms: Connection timed out
* Closing connection 0
curl: (28) Failed to connect to vcenter.ipddr port 443 after 130071 ms: Connection timed out
  • Making a curl request from the vCenter Server to the Cloud Director Cells fails or times out:
curl -k -v https://vcd-cell.ipddr
*   Trying vcd-cell.ipddr:443...
* connect to vcd-cell.ipddr port 443 failed: No route to host
* Failed to connect to vcd-cell.ipddr port 443 after 3073 ms: No route to host
* Closing connection 0
curl: (7) Failed to connect to vcd-cell.ipddr port 443 after 3073 ms: No route to host


Environment

VMware Cloud Director 10.x

Cause

This issue can occur if there are incorrect routes configured on the vCenter Server that stop traffic reaching the Cloud Director Cells.

 

Resolution

To resolve the issue, reconfigure the routes on the vCenter Server to ensure traffic can reach the Cloud Director Cell.
To view the routes on the vCenter Server SSH to it as root, enable the shell and run the ip route command.

Once the routing on the vCenter Server is set correctly we can test that the communication is successful:
  1. Confirm that the vCenter Server can reach the Cloud Director Cells using curl:
    1. SSH to the vCenter Server, log in as root, and enable the Shell.
    2. Use curl to connect to the Cloud Director Cell and confirm this is successful, for example:
curl -k https://vcd-cell.ip/api/server_status
Service is up.
  1. Confirm that the Cloud Director Cells can reach vCenter Server using curl:
    1. SSH to the Cloud Director Cell and log in as root.
    2. Use curl to connect to the vCenter Server and confirm this is successful, for example:
curl -k https://vcenter.ip/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
...


Additional Information

Impact/Risks:

Cloud Director will encounter issues such as task execution failures if it cannot connect to vCenter Server.