kubectl vsphere login fails with "internal server error" when vCenter Server services are stopped
search cancel

kubectl vsphere login fails with "internal server error" when vCenter Server services are stopped

book

Article ID: 436403

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

When executing kubectl vsphere login, the following message is displayed:

Error while getting list of workloads: internal server error
level=error msg="internal server error"
Error while getting list of workloads: bad gateway
Please contact your vSphere server administrator for assistance.

One or more essential internal vCenter Server services, such as vpxd or wcp, are stopped:

root@<VCENTER_HOSTNAME> [ ~ ]# service-control --status --all
Running:
 applmgmt lookupsvc lwsmd observability observability-vapi pschealth vc-ws1a-broker vlcm vmafdd vmcad vmdird vmware-analytics vmware-certificateauthority vmware-certificatemanagement vmware-cis-license vmware-content-library vmware-eam vmware-envoy vmware-envoy-hgw vmware-envoy-sidecar vmware-hvc vmware-infraprofile vmware-perfcharts vmware-pod vmware-postgres-archiver vmware-rhttpproxy vmware-sca vmware-sps vmware-stsd vmware-topologysvc vmware-trustmanagement vmware-updatemgr vmware-vapi-endpoint vmware-vdtc vmware-vmon vmware-vpostgres vmware-vpxd vmware-vpxd-svcs vmware-vsan-health vmware-vsm vsphere-ui vstats vtsdb
Stopped:
 vmcam vmonapi vmware-imagebuilder vmware-netdumper vmware-rbd-watchdog vmware-vcha wcp vpxd

Note: The error message above is an example. The actual message may vary depending on your environment.

Environment

vSphere Supervisor

Cause

The kubectl vsphere login command interacts with vCenter Server internal services and Supervisor.
Therefore, these services must be functioning correctly for the command to succeed.

Resolution

If the services were intentionally stopped for maintenance or other activities, restart them by running the following command:

service-control --start --all

If the services stopped unexpectedly, further investigation of the vCenter Server is required.
If you need further assistance, open a support request via the Broadcom Support Portal.

Additional Information

Japanese KB: vCenter Serverのサービスが停止していると、kubectl vsphere login が "internal server error" で失敗する