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"}
[ ] 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"}
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
[=== ] 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 }
{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 }
{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 }
{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 }
{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 }
{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 }
{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 }
{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 }
{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 }
{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 }
{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 }
{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 }
{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 }
{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 }
Error: enroll command failed for unknown reason: exit status 1