Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actionable error message when attempting to inspect an unprivileged Agent as a privileged user #4888

Open
1 task
kaanyalti opened this issue Jun 8, 2024 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@kaanyalti
Copy link
Contributor

kaanyalti commented Jun 8, 2024

Version: 8.14.0
Operating System: macos sonoma v14.5
Platform: arm64

While working on this issue comparing root and unprivileged elastic agents, I encountered an error with the inspect command when using unprivileged agent.

Steps to Reproduce:

  1. Deploy ESS v8.14.0
  2. Create agent policy with system integration
  3. Install fleet managed agent with the unprivileged flag sudo ./elastic-agent install --unprivileged --url=<fleet url> --enrollment-token=<token>
  4. Run sudo elastic-agent inspect. You should see an error similar to what's shown below
Error: error loading agent config: error loading raw config: fail to read configuration /Library/Elastic/Agent/fleet.enc for the elastic-agent: fail to decode bytes: cipher: message authentication failed
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 #4889 comments:

@kaanyalti kaanyalti added the bug Something isn't working label Jun 8, 2024
@kaanyalti kaanyalti changed the title Error runningsudo elastic-agent inspect while using unprivileged agent Error runninginspect while using unprivileged agent Jun 8, 2024
@kaanyalti kaanyalti changed the title Error runninginspect while using unprivileged agent Error running inspect while using unprivileged agent Jun 8, 2024
@kaanyalti
Copy link
Contributor Author

cc: @ycombinator @cmacknz

@kaanyalti kaanyalti changed the title Error running inspect while using unprivileged agent Error running inspect while using unprivileged agent [mac] Jun 8, 2024
@blakerouse
Copy link
Contributor

Again do not use sudo the Elastic Agent is not root.

@ycombinator ycombinator changed the title Error running inspect while using unprivileged agent [mac] Actionable error message when attempting to inspect an unprivileged Agent as a privileged user Jun 10, 2024
@ycombinator
Copy link
Contributor

I updated the title of this issue and added a Definition of Done to make this issue about improving the error message, based on a related discussion in #4889. As for documentation, I've brought that to @kilfoyle's attention via elastic/ingest-docs#1087 (comment).

@ycombinator ycombinator added enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team and removed bug Something isn't working labels Jun 11, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@ycombinator ycombinator added the good first issue Good for newcomers label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

4 participants