Skip to content

When using Elastic Agent container command, setting FLEET_CA doesn't work if FLEET_SERVER_ENABLE is set #26462

@david-kow

Description

@david-kow

When using ./elastic-agent container, FLEET_CA setting doesn't work if also FLEET_SERVER_ENABLE is set (tested on 7.13.0):

2021-06-17T15:09:27.327Z INFO [api] api/server.go:66 Stats endpoint (/usr/share/elastic-agent/state/data/tmp/elastic-agent.sock) finished: accept unix /usr/share/elastic-agent/state/data/tmp/elastic-agent.sock: use of closed network connection Error: fail to enroll: fail to execute request to fleet-server: x509: certificate signed by unknown authority

I think it's because FLEET_CA is only taken into account when Fleet Server is disabled:

if cfg.FleetServer.Enable {

The workaround I've used to overcome that was to copy CA to /etc/pki/ca-trust/source/anchors/ and run update-ca-trust, but I feel this shouldn't be necessary.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions