Cannot Connect to ESXi Server (code 1909)

Situation

A VMware backup plan terminates with the following error: Cannot connect to ESXi server. Connection refused

Cause

Typically, this error occurs on ESXi server side, so actions should be taken there as well.

Solution

Basic solutions for this issue are:

  • ESXi host reboot
  • Disconnect ESXi host on vCenter and try to reconnect using IP address instead of FQDN
  • Make sure if enough memory on ESXi host is available.
  • Confirm that the backup agent can connect to port 902 on the target host

Reboot ESXi

Warning: Although these methods will gracefully shut down or reboot an ESXi/ESX host, they will not safely stop running virtual machines on the host. You should always ensure that virtual machines are migrated off the host and that the host is in maintenance mode before attempting to reboot or shut down a host using any method.

For ESX 4.x

Once you are logged in the ESX console, run the following command: reboot to reboot the system.

You can shut down the host as well, using the poweroff. Once you shut the host down, you can reboot it by starting it up again

For ESXi 4.x/5.x/6.x

In the Direct Console User Interface, press F11. This command reboots the ESXi host.

Disconnect an ESXi Host on vCenter

Proceed as follows:

  1. Right-click Host in the VMware Host Client inventory, the select Disconnect from vCenter Server.
  2. Run Add Host wizard.
  3. In the Connection Settings, type the new ESXi host IP address and the root credentials for the host, then click Next.
  4. In the Security Alert dialog box, click Yes.
  5. Click Yes in the Duplicate Management warning message for the HA cluster.
  6. On the Host Summary and Virtual Machine pages, click Next.
  7. On the Ready to Complete step, click Finish.

Make Sure If Enough Memory on ESXi Host Is Available

If the virtual machine memory is greater than the host memory size, swapping occurs, which can have a severe effect on virtual machine performance. The maximum for best performance represents the threshold above which the host’s physical memory is insufficient to run the virtual machine at full speed. This value fluctuates as conditions on the host change, for example, as virtual machines are powered on or off.

The memory size must be a multiple of 4 MB.

The ESXi host version indicates when support began for the increased memory size. For example, the memory size of a virtual machine with ESX/ESXi 3.5 and later compatibility running on ESXi 5.0 is restricted to 65532 MB.

In this case, you need to free up the memory on your ESXi host by reconfiguring memory setting of the virtuals machines located on it.

Before changing the memory configuration, make sure that you have the Virtual machine.Configuration.Change Memory privilege on the virtual machine

  1. Right-click a virtual machine in the inventory, then select Edit Settings.
  2. On the Virtual Hardware tab, expand Memory and change the memory configuration.
  3. In the Memory text box, enter the amount of RAM to assign to the virtual machine.
  4. Select whether the memory is specified in MB, GB or TB.
  5. Click OK.

Confirm That the Backup Agent Can Connect To Port 902 on the Target Host

Port 902 on the ESXi host must be open and reachable to run backups. Confirm that it's accessible from the machine that runs the backup by doing the following:

  1. Install Telnet on the machine that performs the backup
  2. Connect to each host included in the backup plan by running telnet [<host> [<port>]]

If the connection stalls or times out the backup cannot be performed until the connection issue is resolved.

https://git.cloudberrylab.com/egor.m/doc-help-kb.git