PKS NSX-T errand fails with error govc: expected element type <Envelope> but have <html>
search cancel

PKS NSX-T errand fails with error govc: expected element type <Envelope> but have <html>

book

Article ID: 298571

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction

Symptoms:


While installing or upgrading PKS in an NSX-T environment, NSX-T validation error fails with the below error as seen from Apply Changes log

 

Stderr ERROR: Failed to find datacenter Datacenter due to: govc: expected element type <Envelope> but have <html>
ERROR: NSX-T Precheck failed due to Unable to check if esxi hosts are onboarded since hosts are empty

Environment


Cause

The vcenter host under Kubernetes Provider for PKS tile contains a URL (ex - https://vcenter1.domain.com/), Operations (Ops) Manager field validation passes but NSX-T validation error fails with below error:

 

Stderr ERROR: Failed to find datacenter Datacenter due to: govc: expected element type <Envelope> but have <html>
ERROR: NSX-T Precheck failed due to Unable to check if esxi hosts are onboarded since hosts are empty

 

While running NSX-T validation errand govc utility is used. govc tries to get datacenter info using the vcenter host provided in the Ops Manager tile. Due to " / " present at the end of the URL govc returns a http response code 400 as an html object which is not the expected return format.

Resolution

The vcenter host under Kubernetes Provider for PKS tile change value to vCenter FQDN, in this case vcenter1.domain.com.