Skip to content

[Elastic Agent] ensureServiceToken should not always be called for the container #29799

@blakerouse

Description

@blakerouse

With the latest change from #29651 the Elastic Agent container is now always trying to create a service token. When just running the Elastic Agent container in standalone mode this should not happen.

For confirmed bugs, please report:

  • Version: 8.1.0-SNAPSHOT
  • Operating System: Docker
  • Steps to Reproduce:

Just start the container and see that it fails to contact Kibana. It should only do that if its going to bootstrap a Fleet Server:

docker run -it docker.elastic.co/beats/elastic-agent:8.1.0-SNAPSHOT

Logs the following error:

Requesting service_token from Kibana.
Error: request to get security token from Kibana failed: fail to execute the HTTP POST request: Post "http://kibana:5601/api/fleet/service-tokens": dial tcp 127.0.0.1:5601: connect: connection refused
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.1/fleet-troubleshooting.html
```

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