hashicorp / hashicorp/consul

500 Error on ConfigEntry.ResolveServiceConfig

Open
#11,637 5 comments 2 reactions 0 assignees View on GitHub
theme/connect type/bug
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

#### Overview of the Issue

I'm intermittently getting an error in the consul-k8s connect inject controller when registering sidecar proxies.
I've not managed to trace the error beyond the local agent.
Consul server nodes in the local DC and the primary DC don't log any errors that i can find (even using `consul monitor -log-level trace`)

#### Reproduction Steps

I don't know, it must be related to `service-defaults` config entries somehow but i've tried every combination of setting values, not-setting, present and not-present for the client and server services, but nothing is consistently producing the error.

Kubernetes manifests and example TF for config entries
https://gist.github.com/hamishforbes/39aeecc466a3b314a7d628f07f005948

### Consul info for both Client and Server
1.10.4 on client and server
0.37.0 on consul-k8s

### Log Fragments

consul-consul-connect-injector-webhook-deployment
```
2021-11-24T03:18:12.107Z ERROR controller.endpoints Reconciler error {"reconciler group": "", "reconciler kind": "Endpoints", "name": "client", "namespace": "test", "error": "1 error occurred:\n\t* Unexpected response code: 500 (could not retrieve initial service_defaults config for service \"client-7bc7c4b89d-xfhmz-client-sidecar-proxy\": rpc error making call: reflect: call of reflect.Value.Type on zero Value)\n\n"}
```

consul agent
```
2021-11-24T03:10:35.051Z [ERROR] agent.client: RPC failed to server: method=ConfigEntry.ResolveServiceConfig server=10.20.3.83:8300 error="rpc error making call: reflect: call of reflect.Value.Type on zero Value"
```

service-defaults for client
```
> consul config read -kind service-defaults -name client
{
"Kind": "service-defaults",
"Name": "client",
"TransparentProxy": {},
"MeshGateway": {},
"Expose": {},
"UpstreamConfig": {
"Defaults": {
"Limits": {
"MaxConnections": 2000,
"MaxPendingRequests": null,
"MaxConcurrentRequests": null
},
"MeshGateway": {}
}
},
"CreateIndex": 464141018,
"ModifyIndex": 464149878
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.