WCP service is crashing with error "panic: runtime error: invalid memory address or nil pointer dereference" in VCF9.1.1
search cancel

WCP service is crashing with error "panic: runtime error: invalid memory address or nil pointer dereference" in VCF9.1.1

book

Article ID: 461155

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

WCP service in vCenter 9.1.1.0 might crash with error:

#/var/log/vmware/wcp/wcpsvc.log in the vCenter
YYYY-MM-DDThh:mm:ss.sssZ ERROR wcp #### [vc@4413] [handlers/panic.go:27] panic: runtime error: invalid memory address or nil pointer dereference
...
goroutine <ID> [running]:
server/pkg/http/handlers.(*ExitOnPanicHandler).ServeHTTP.func1()
    .../server/pkg/http/handlers/panic.go:<LINE> +<OFFSET>
panic(...)
  .../src/runtime/panic.go:<LINE> +<OFFSET>
server/dataprovider.(*workloadVpcNetworkModelInMemResourceType).GetAllResources(...)
    .../server/dataprovider/workload_vpcnetworkmodel_resource.go:<LINE> +<OFFSET>
server/dataprovider.getInMemoryResources(...)
.../server/dataprovider/inmem_queryhandler.go:<LINE> +<OFFSET>
server/dataprovider.queryInMemoryResourceModel(...) 

When the WCP process is down, the Supervisor is no longer displayed in Supervisor Management in the vSphere UI.  

Environment

vCenter 9.1.1.0

Cause

The wcp service crashes because the vpcNetworkInfo has an invalid value. This can happen during data provider model queries e.g. when viewing the Namespaces details in VC UI. 

Conditions

This issue occurs under the following conditions:

  • vCenter Server running VCF 9.1.1.x
  • On supervisor enabled with NSX without VPC
  • A Supervisor enabled with NSX with VPC and the "supervisor management proxy" Supervisor Service installed

Trigger

In the environments listed above, clicking into Supervisor Management --> Namespace --> Configure --> General for any vSphere Namespace in the vSphere UI will trigger the crash.

Resolution

This issue is fixed in VCF 9.1.2.

As a workaround, if the WCP process crashes, manually start it from vCenter.   

service-control --start wcp