The Beat agent control protocol client does not drain the client's Errors channel, which can cause the client to block if an error is encountered.
https://github.com/elastic/elastic-agent-client/blob/4477e3ace394ef1abfec55afa5cc5e1f6f87980c/pkg/client/client_v2.go#L86-L89
// Errors returns channel of errors that occurred during communication.
//
// User of this client must read from this channel, or it will block the client.
Errors() <-chan error
Likely this should be happening when we call Start()
|
// Start the config manager. |
|
func (cm *BeatV2Manager) Start() error { |
|
if !cm.Enabled() { |
|
return fmt.Errorf("V2 Manager is disabled") |
|
} |
|
err := cm.client.Start(context.Background()) |
|
if err != nil { |
|
return fmt.Errorf("error starting connection to client") |
|
} |
|
|
|
cm.client.RegisterDiagnosticHook("beat-rendered-config", "the rendered config used by the beat", "beat-rendered-config.yml", "application/yaml", cm.handleDebugYaml) |
|
go cm.unitListen() |
|
cm.isRunning = true |
|
return nil |
|
} |
|
|
The Beat agent control protocol client does not drain the client's Errors channel, which can cause the client to block if an error is encountered.
https://github.com/elastic/elastic-agent-client/blob/4477e3ace394ef1abfec55afa5cc5e1f6f87980c/pkg/client/client_v2.go#L86-L89
Likely this should be happening when we call
Start()beats/x-pack/libbeat/management/managerV2.go
Lines 173 to 188 in c2a9f44