I set up a Fleet environment and tested multiple integrations of Elastic Agent on Linux and Windows machines without any problem, but there is a specific Windows machine where it does not work, and I couldn't find the reason.
I downloaded and extracted Elastic Agent 7.10.1 zip for Windows and executed this Fleet enrollment command from PowerShell, finishing without errors, and the host appears as enrolling in Kibana.
.\elastic-agent.exe install -f --kibana-url=XXX --enrollment-token=XXX --insecure
So far, so good. But when I go to services.msc, Elastic Agent service appears stopped, and forcing start results in "Error 1067: The process terminated unexpectedly.". In Kibana, this particular host shows as enrolling forever.
There are no logs in Elastic Agent's install folder, so I can't find what is causing this error. Starting service from PowerShell doesn't throw any error either, but the 'Get-Service' command shows it as stopped.
If I run Elastic Agent with
.\elastic-agent.exe run, it works perfectly fine, but not as a service, so I have to manually launch it every time.
Why could this be happening?
Thank you in advance.