Using Curl to test port connectivity in VMware vCenter Server Appliance
search cancel

Using Curl to test port connectivity in VMware vCenter Server Appliance

book

Article ID: 316607

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When troubleshooting vSphere Replication, it is often necessary to troubleshoot port connectivity as common Windows utilities are not available. Curl is available in the VMware vCenter Server Appliance command line interface. This article provides a simple example of using Curl to simulate a telnet connection with verbose output. This article also provides a way to test Port connectivity if they are not running vCenter Server on windows and running the vCenter Server Appliance instead.

Symptoms:
  • Unable to test port connectivity for connections originating from the VMware vCenter Server Appliance
  • Cannot test port connectivity for connections originating from the VMware vCenter Server Appliance
  • Testing port connectivity for connections originating from the VMware vCenter Server Appliance fails


Resolution

To test port connectivity in VMware vCenter Server Appliance:
  1. Log in as root user through the VMware vCenter Server Appliance console.
  2. Run this command on the vCenter Server Appliance:
curl -v telnet://target ip address:desired port number

When the vCenter Server Appliance connects successfully or fails, there will be outputs similar to:

Example of the successful output:
Note: the session is kept open. 


Example of refused connection or failed output : 



Note: To test port connectivity in VMware vCenter Server Appliance with a Proxy, run:
curl -v -x proxy:port -U "username:password" telnet://target ip address:desired port number

Additional Information

Connectivity in VMware Workspace Portal 2.x can also be checked using curl command with the same steps detailed above.