Publish Library Item to Subscribed Library fails with error "Cannot connect to host"
search cancel

Publish Library Item to Subscribed Library fails with error "Cannot connect to host"

book

Article ID: 408097

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • Publishing library item to the subscribed library fails with below error message:

    A general system error occurred: Failed to publish item "<Template Name>" (ID: ##########-####-####-####-############) to subscribed library "<Library Name>" (ID: ##########-####-####-####-############) on vCenter Server. Reason: The operation failed due to Cannot connect to host.

  • In Recent Tasks on vCenter "Publish Library Item to Subscription task" shows the error "Cannot connect to host"



  • VPXD logs on vCenter shows similar to below error message:

    /var/log/vmware/vpxd/vpxd.log

    YYYY-MM-DDTHH:MM:SS.000Z error vpxd[PID] [Originator@6876 sub=VmProv opID=<OPID>] Cross Host Datastore Full Clone failed at vpx.vmprov.CopyVmFiles for poweredOff VM '<Template Name>' (vm-<moID>,ds:///vmfs/volumes/<DatastoreID>/<Template Folder>/<Template>.vmtx) to new name <Destination Template Name> on host-<moID> (###.###.###.###) in pool resgroup-<moID> with ds ds:///vmfs/volumes/<DatastoreID>/ to host-<MoID> (###.###.###.###) in pool resgroup-<moID> with ds ds:///vmfs/volumes/<DatastoreID>/ with fault vim.fault.HostConnectFault:

    YYYY-MM-DDTHH:MM:SS.000Z error vpxd[PID] [Originator@6876 sub=vpxLro opID-<OPID>] [VpxLRO] Unexpected Exception: N3Vim5Fault16HostConnectFault9ExceptionE(Fault cause:vim.fault.HostConnectFault)

    YYYY-MM-DDTHH:MM:SS.000Z error vpxd[PID] [Originator@6876 sub=Default opID=<OPID>] [VpxLRO] -- ERROR lro-17702029 -- ##########-####-####-####-############(##########-####-####-####-############) -- vm-#### -- vim.VirtualMachine.cloneFromLibraryItem: vim.fault.HostConnectFault
    -- > Result:
    -- > (vim.fault.HostConnectFault) {
    msg - "Cannot connect to host."

Cause

  • This issue occurs if TCP port 902 is not open between the source and destination ESXi hosts to transfer the Library Item.

  • To test the connectivity between ESXi hosts over port 902, use the below command from a ssh session to the source ESXi host. The source and destination host IP Addresses will be available in the VPXD logs on vCenter Server as shown in the symptoms mentioned above.

    nc -z <Destination ESXi-IP> 902

    Output of a successful connection:
    [root@<hostname>:~] nc -z ###.###.###.### 902
    Connection to ###.###.###.### 902 port [tcp/authd] succeeded!

Resolution

Content library requires TCP port 902 to be open bidirectional between the ESXi hosts.

To resolve this issue, disable any firewall rules which may be blocking traffic between ESXi hosts over TCP port 902.

Additional Information