# Trouble enrolling Elastic Agent on Windows 2019

**URL:** <https://discuss.elastic.co/t/trouble-enrolling-elastic-agent-on-windows-2019/360990>\
**Category:** Elastic Agent\
**Created:** [June 6, 2024, 4:26pm UTC](https://discuss.elastic.co/t/trouble-enrolling-elastic-agent-on-windows-2019/360990 "2024-06-06T16:26:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hcherry](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hcherry](https://discuss.elastic.co/u/hcherry)\
**Post date:** [June 6, 2024, 4:26pm UTC](https://discuss.elastic.co/t/trouble-enrolling-elastic-agent-on-windows-2019/360990/1 "2024-06-06T16:26:56Z")

</div>

Hello - While trying to install and enroll Elastic Agent on a Windows 2019 server, I am getting the following errors. Has anyone seen this before? I am finding no information about a cause or a solution. Thanks in advance!

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:** ![hcherry](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hcherry](https://discuss.elastic.co/u/hcherry)\
**Post date:** [June 7, 2024, 5:14pm UTC](https://discuss.elastic.co/t/trouble-enrolling-elastic-agent-on-windows-2019/360990/2 "2024-06-07T17:14:21Z")

</div>

I also get the following when i run elastic-agent.exe status...  
Error: failed to communicate with Elastic Agent daemon: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: open \\.\pipe\elastic-agent-system: The system cannot find the file specified."

Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![hcherry](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hcherry](https://discuss.elastic.co/u/hcherry)\
**Post date:** [June 7, 2024, 5:18pm UTC](https://discuss.elastic.co/t/trouble-enrolling-elastic-agent-on-windows-2019/360990/3 "2024-06-07T17:18:34Z")

</div>

When I do a fresh install, I am seeing the following errors too....

[==] Service Started [15s] Elastic Agent successfully installed, starting enrollment.  
[=] Waiting For Enroll... [15s] {"log.level":"warn","@timestamp":"2024-06-07T10:17:21.764-0700","log.logger":"tls","log.origin":{"file.name":"tlscommon/tls\_config.go","file.line":107},"message":"SSL/TLS verifications disabled.","ecs.version":"1.6.0"}  
[==] Waiting For Enroll... [15s] {"log.level":"info","@timestamp":"2024-06-07T10:17:22.434-0700","log.origin":{"file.name":"cmd/enroll\_cmd.go","file.line":519},"message":"Starting enrollment to URL: [https://prodxcontainer2:8220/","ecs.version":"1.6.0](https://prodxcontainer2:8220/%22,%22ecs.version%22:%221.6.0)"}  
[] Waiting For Enroll... [16s] {"log.level":"info","@timestamp":"2024-06-07T10:17:22.639-0700","log.origin":{"file.name":"cmd/enroll\_cmd.go","file.line":528},"message":"1st enrollment attempt failed, retrying for 10m0s, every 1m0s enrolling to URL: [https://prodxcontainer2:8220/","ecs.version":"1.6.0](https://prodxcontainer2:8220/%22,%22ecs.version%22:%221.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.  
For help, please see our troubleshooting guide at [Troubleshoot common problems | Fleet and Elastic Agent Guide [8.13] | Elastic](https://www.elastic.co/guide/en/fleet/8.13/fleet-troubleshooting.html)  
[===] Failed to Uninstall [16s] Error uninstalling. Printing logs  
{debug 2024-06-07 10:17:22.9188201 -0700 PDT m=+19.842826401 processes Error fetching PID info for 0, skipping: GetInfoForPid: could not get all information for PID 0: error fetching name: OpenProcess failed for pid=0: The parameter is incorrect.  
error fetching status: OpenProcess failed for pid=0: The parameter is incorrect. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:173](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:173) }  
{debug 2024-06-07 10:17:22.9188201 -0700 PDT m=+19.842826401 processes Error fetching PID info for 4, skipping: GetInfoForPid: could not get all information for PID 4: error fetching name: GetProcessImageFileName failed for pid=4: GetProcessImageFileName failed: invalid argument [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:173](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:173) }  
{debug 2024-06-07 10:17:22.9193554 -0700 PDT m=+19.843361601 processes Non fatal error fetching PID some info for 104, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
{debug 2024-06-07 10:17:22.9193554 -0700 PDT m=+19.843361601 processes Non fatal error fetching PID some info for 548, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
{debug 2024-06-07 10:17:22.9193554 -0700 PDT m=+19.843361601 processes Non fatal error fetching PID some info for 740, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
{debug 2024-06-07 10:17:22.9193554 -0700 PDT m=+19.843361601 processes Non fatal error fetching PID some info for 844, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
{debug 2024-06-07 10:17:22.9198808 -0700 PDT m=+19.843887001 processes Non fatal error fetching PID some info for 852, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
{debug 2024-06-07 10:17:22.9209428 -0700 PDT m=+19.844949001 processes Non fatal error fetching PID some info for 988, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
{debug 2024-06-07 10:17:22.9650166 -0700 PDT m=+19.889022001 processes Non fatal error fetching PID some info for 3708, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
{debug 2024-06-07 10:17:22.9820094 -0700 PDT m=+19.906014501 processes Non fatal error fetching PID some info for 6468, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
{debug 2024-06-07 10:17:22.9855341 -0700 PDT m=+19.909539101 processes Non fatal error fetching PID some info for 6968, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
{debug 2024-06-07 10:17:22.9855341 -0700 PDT m=+19.909539101 processes Non fatal error fetching PID some info for 6992, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
{debug 2024-06-07 10:17:22.9855341 -0700 PDT m=+19.909539101 processes Non fatal error fetching PID some info for 468, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
{debug 2024-06-07 10:17:23.0330196 -0700 PDT m=+19.957023801 processes Non fatal error fetching PID some info for 4764, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied. [github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176](http://github.com/elastic/elastic-agent-system-metrics@v0.9.2/metric/system/process/process.go:176) }  
Error: enroll command failed for unknown reason: exit status 1

---

<div class="post-metadata">

**Author:** ![peek03](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@peek03](https://discuss.elastic.co/u/peek03)\
**Post date:** [July 8, 2024, 3:11pm UTC](https://discuss.elastic.co/t/trouble-enrolling-elastic-agent-on-windows-2019/360990/4 "2024-07-08T15:11:07Z")

</div>

I have the same problems - I Run also into this problems

elastic-agent.exe run failed: could not load 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. Agent version is 8.14.2

Did you find anything ?
