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

[Elastic Agent] Debug fleet-server connectivity #115

Open
Tracked by #26930
ruflin opened this issue Apr 26, 2021 · 6 comments
Open
Tracked by #26930

[Elastic Agent] Debug fleet-server connectivity #115

ruflin opened this issue Apr 26, 2021 · 6 comments
Labels
debugging enhancement New feature or request Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@ruflin
Copy link
Contributor

ruflin commented Apr 26, 2021

The Elastic Agent must connect to the fleet-server for enrollement. There are several issues that can happen around the connectivity to fleet-server. If the enrollment doesn't work, it would be nice to have a command line tool to investigate on what the actual issue is. Things like: certificate issue, port not open, host not reachable, wrong token etc.

This idea was triggered by issues like this one: elastic/fleet-server#235 (comment)

@ruflin ruflin added enhancement New feature or request Team:Elastic-Agent Label for the Agent team labels Apr 26, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/agent (Team:Agent)

@jlind23
Copy link
Contributor

jlind23 commented Dec 9, 2021

Can we close this one in favour of elastic/beats#27764?

@jlind23 jlind23 added debugging Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Dec 9, 2021
@elasticmachine
Copy link
Contributor

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

@ruflin
Copy link
Contributor Author

ruflin commented Dec 9, 2021

This is not necessarily the same thing. One is around having better errors, the other one is around having a command to test the connection. I think we need both. We have done something similar for LS in Beats and it worked out really well.

@michel-laterman
Copy link
Contributor

If this is provided as a command we can also include it in diagnostics output/bundles

@jlind23 jlind23 transferred this issue from elastic/beats Mar 7, 2022
@ph
Copy link
Contributor

ph commented Mar 22, 2022

I was looking at the user issue and precisely investigating a connection problem, As a normal user I was able to start Elastic-Agent run and the agent was able to successfully connect to fleet-server. When the Elastic Agent was run under systemd the agent was unable to connect to the remote server. When discussing with the user, we was unaware that he had a http(s)_proxy configured on this system. By default systemd start the process with a clean environment and doesn't inherit the globally set proxy variables.

When we ask a user for a diagnostic the elastic-agent diagnostic command is run in the current user environment and connect to the other elastic agent. We could add bootstraps checks and return the result to the user.

The first I see is:

Is there an HTTP(S)_PROXY set in the user env?
Is there an HTTP(S)_PROXY set in the elastic-agent environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugging enhancement New feature or request Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

5 participants