Version: 8.14.0
Operating System: Ubuntu 24.04 LTS
Platform: arm64
While working on this issue comparing root and unprivileged elastic agents, I encountered an error with the enroll command when using unprivileged agent.
Steps to Reproduce:
- Deploy ESS v8.14.0
- Create agent policy with system integration
- Install fleet managed agent with the unprivileged flag
sudo ./elastic-agent install --unprivileged --url=<fleet url> --enrollment-token=<token>
- Unenroll the agent
- Enroll the agent
sudo elastic-agent enroll --url=<fleet url> --enrollment-token=<token>
- Agent enrollment gets confirmed, but incoming data does not get confirmed
- Agent status in fleet ui is stuck in
updating
- Running
sudo elastic-agent status we get the following error
Error: failed to communicate with Elastic Agent daemon: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /opt/Elastic/Agent/elastic-agent.sock: connect: connection refused"
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.14/fleet-troubleshooting.html
Definition of Done
Based on discussion in the comments:
Version: 8.14.0
Operating System: Ubuntu 24.04 LTS
Platform: arm64
While working on this issue comparing root and unprivileged elastic agents, I encountered an error with the
enrollcommand when using unprivileged agent.Steps to Reproduce:
sudo ./elastic-agent install --unprivileged --url=<fleet url> --enrollment-token=<token>sudo elastic-agent enroll --url=<fleet url> --enrollment-token=<token>updatingsudo elastic-agent statuswe get the following errorDefinition of Done
Based on discussion in the comments:
installs an Agent using--unprivileged, then tries toenrollthis Agent with a privileged user, an error message with the suggestions in Actionable error message when attempting toenrollan unprivileged Agent as a privileged user #4889 (comment) is shown to the user.