Connecting to the vCenter from third party application server fails with error "Could not establish a secure connection."
search cancel

Connecting to the vCenter from third party application server fails with error "Could not establish a secure connection."

book

Article ID: 414561

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Upon establishing a secure connection to the vCenter Server from a third-party application server, an error is encountered:

"Curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it.Could not establish a secure connection."

Using the curl command fails with an error - curl -v https://vc_fqdn/sdk/vimservice:

"SSL certificate problem: unable to get local issuer certificate"

Environment

VMware vCenter Server 

Cause

 The issue is encountered when the application server is not able to verify the vCenter's certificate to establish a secure connection, either due to a change in the vCenter certificate or a missing chain in the vCenter certificate.  

Resolution

Import the vCenter Machine SSL certificate to the application server. 

  1. Launch the vSphere Client
    Open a supported web browser and navigate to the vCenter Server URL. Example: https://<vcenter-fqdn>

  2. Access the Security Certificate
    In the browser address bar, click the lock icon next to the URL. This icon represents the secure HTTPS connection to vCenter Server.

  3. View Certificate Details
    Chrome / Edge: Click Connection is secure → Certificate is valid.
    Firefox: Click Connection secure (or Connection not secure for self-signed certificates) → More Information → View Certificate.
    Safari: Click the lock icon → Show Certificate.

  4. Export the Certificate
    Once the certificate details window is open, locate the Export or Download option:
    In Chrome/Edge/Firefox: Save the certificate in Base64 (PEM) format.
    If available, also export the certificate chain to ensure intermediate CA certificates are included.

  5. Save the Certificate File
    Choose a secure location on the local machine to save the .pem file (and chain.pem chain if applicable).  
    For Example:  vCenter_cert.pem  |  vCenter_cert_chain.pem

  6. Copy the certificate to the application server using any file copy tool like WINSCP, etc. 

  7. Run the curl command to connect to the vCenter: curl -v --cacert  /complete_path_to_file/cert_file  https://vc_fqdn/sdk/vimservice