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: Error: fail to enroll: fail to execute request to Kibana: EOF #25022

Closed
mtojek opened this issue Apr 12, 2021 · 11 comments
Closed
Labels
Team:Elastic-Agent Label for the Agent team

Comments

@mtojek
Copy link
Contributor

mtojek commented Apr 12, 2021

We noticed some flakiness with enrollment:

Attaching to elastic-package-stack_elastic-agent_1
�[36melastic-agent_1              |�[0m The Elastic Agent is currently in BETA and should not be used in production
�[36melastic-agent_1              |�[0m 
�[36melastic-agent_1              |�[0m Error: fail to enroll: fail to execute request to Kibana: EOF
�[36melastic-agent_1              |�[0m Error: enrollment failed: exit status 1

Source: https://beats-ci.elastic.co/job/Ingest-manager/job/integrations/job/master/227/artifact/build/elastic-stack-dump/latest/barracuda/logs/elastic-agent.log

We aren't using the recommended healthcheck due to the other issue: #24956

So far it's https://github.com/elastic/elastic-package/blob/master/internal/install/static_snapshot_yml.go#L105.

Do you have any idea why was there the EOF issue?

@mtojek mtojek added the Team:Elastic-Agent Label for the Agent team label Apr 12, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@mtojek
Copy link
Contributor Author

mtojek commented Apr 13, 2021

@michalpristas
Copy link
Contributor

michalpristas commented Apr 13, 2021

havent seen this so far, any special circumstances?
is this master?

@michalpristas
Copy link
Contributor

looking at the code this is most likely coming from http.Client itself, other errors are decorated with messages.
are we sure kibana is up and running?
other reason may be closing the connection and tring to reuse that one after rate limiting, but for that i would expect some warnings in agent logfile. do we have these available?

@mtojek
Copy link
Contributor Author

mtojek commented Apr 13, 2021

is this master?

7.13.0-SNAPSHOT

but for that i would expect some warnings in agent logfile. do we have these available?

All logs are present here:
https://beats-ci.elastic.co/job/Ingest-manager/job/integrations/job/master/229/artifact/build/elastic-stack-dump/latest/system/logs/

When a similar issue happened in the past I suspected that something restarts in background (fleet-server?).

@michalpristas
Copy link
Contributor

i was hoping for a log file inside /opt/Elastic/Agent

@mtojek
Copy link
Contributor Author

mtojek commented Apr 13, 2021

Unfortunately we don't have it. If there is a way to route the output of that file to stdout/stderr we can grab it with docker logs.

@blakerouse
Copy link
Contributor

@michalpristas 7.13+ docker of Elastic Agent routes the elastic-agent.log now to stdout so that it can be picked up with docker logs. Unless it is ran with the LOGS_PATH environment variable.

@michalpristas
Copy link
Contributor

havent seen this in last 12 builds, will keep an eye but maybe it was fixed as a side effect of other enroll changes.
will keep an eye on builds for next week and if i dont see it, i will close the issue

@mtojek
Copy link
Contributor Author

mtojek commented Apr 20, 2021

We suspected that it may be related to the healthcheck issue, but unfortunately we can't switch to the correct one yet. For reference: elastic/elastic-package#329 (comment)

@ph
Copy link
Contributor

ph commented Feb 28, 2022

I am going to close this, its april 13.

@ph ph closed this as completed Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

No branches or pull requests

5 participants