Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Agent/Docker] FLEET_ENROLL in Docker agent enrollment is broken #24146

Closed
axw opened this issue Feb 21, 2021 · 1 comment · Fixed by #24155
Closed

[Agent/Docker] FLEET_ENROLL in Docker agent enrollment is broken #24146

axw opened this issue Feb 21, 2021 · 1 comment · Fixed by #24155
Assignees

Comments

@axw
Copy link
Member

axw commented Feb 21, 2021

Version: the latest 7.12-SNAPSHOT image (and I think 7.13-SNAPSHOT and 8.0.0-SNAPSHOT)

Reproducer:


docker run --rm --env FLEET_ENROLL=1 --env FLEET_ENROLL_INSECURE=1 --env KIBANA_HOST=http://kibana:5601 --env FLEET_ENROLLMENT_TOKEN=abc123 -t docker.elastic.co/beats/elastic-agent:7.12.0-SNAPSHOT

abc123
The Elastic Agent is currently in BETA and should not be used in production

Error: fail to enroll: fail to execute request to Kibana: 1 error occurred:
        * missing enrollment api key

I'm pretty sure this is due to the breaking changes in #23865. Formatting the token and host as flags works:

docker run --rm --env FLEET_ENROLL=1 --env FLEET_ENROLL_INSECURE=1 --env KIBANA_HOST="--kibana-url=http://kibana:5601" --env FLEET_ENROLLMENT_TOKEN="--enrollment-token=abc123" -t docker.elastic.co/beats/elastic-agent:7.12.0-SNAPSHOT

--enrollment-token=abc123
The Elastic Agent is currently in BETA and should not be used in production

Error: fail to enroll: fail to execute request to Kibana: Status code: 401, Kibana returned an error: Unauthorized, message: security_exception
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants