In the list of cluster nodes the IPs and FQDNs of the individual nodes were entered. The problem is not observed when only IPs are used to specify the cluster nodes.
Multiple DNS servers from different subnets were configured on the Config > Network page. The server in the same subnet as the appliances was not on top of the list. This caused a name lookup to time out which in turn caused the primary node to fail to retrieve the license from the next cluster node, resulting in a license mismatch error.