# Unable to enroll Elastic Agent to fleet running in the cloud

**URL:** <https://discuss.elastic.co/t/unable-to-enroll-elastic-agent-to-fleet-running-in-the-cloud/351394>\
**Category:** Elastic Security\
**Created:** [January 19, 2024, 4:00am UTC](https://discuss.elastic.co/t/unable-to-enroll-elastic-agent-to-fleet-running-in-the-cloud/351394 "2024-01-19T04:00:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vngcyber](https://avatars.discourse-cdn.com/v4/letter/v/fbc32d/32.png) [@vngcyber](https://discuss.elastic.co/u/vngcyber)\
**Post date:** [January 19, 2024, 4:00am UTC](https://discuss.elastic.co/t/unable-to-enroll-elastic-agent-to-fleet-running-in-the-cloud/351394/1 "2024-01-19T04:00:53Z")

</div>

Getting the below error message when attempting to enroll an Elastic Agent to a Fleet running in Elastic Cloud. Please help!

{"log.level":"info","@timestamp":"2024-01-18T22:51:26.027-0500","log.origin":{"file.name":"cmd/enroll\_cmd.go","file.line":479},"message":"Starting enrollment to URL: [URL of fleet]","ecs.version":"1.6.0"}  
Error: fail to enroll: acquiring metadata failed: failed to create new agent info: could not get agent info from store: failed to load from ioStore: failed to ensure key during encrypted disk store Load: could not get agent key: procdecryptdata: Key not valid for use in specified state.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 16, 2024, 4:01am UTC](https://discuss.elastic.co/t/unable-to-enroll-elastic-agent-to-fleet-running-in-the-cloud/351394/2 "2024-02-16T04:01:52Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
