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

Agent cannot connect to ES once it has been upgraded #2692

Closed
honzakral opened this issue May 13, 2023 · 3 comments · Fixed by elastic/beats#36884
Closed

Agent cannot connect to ES once it has been upgraded #2692

honzakral opened this issue May 13, 2023 · 3 comments · Fixed by elastic/beats#36884
Assignees
Labels
bug Something isn't working Team:Elastic-Agent Label for the Agent team

Comments

@honzakral
Copy link

For confirmed bugs, please report:

  • Version: 8.7.0
  • Operating System: k8s
  • Steps to Reproduce: Create 8.6.0 deployment on elastic cloud, see agent fail to connect, upgrade the deployment on cloud and the agent still cannot connect with the same error:

Failed to connect to backoff(elasticsearch(https://NOT_TELLING.REGION.gcp.elastic-cloud.com:443)): Connection marked as failed because the onConnect callback failed: Elasticsearch is too old. Please upgrade the instance. If you would like to connect to older instances set output.elasticsearch.allow_older_versions to true. ES=8.6.1, Beat=8.7.0

Once the pod has been restarted it can connect fine

@honzakral honzakral added the bug Something isn't working label May 13, 2023
@clwo
Copy link

clwo commented May 16, 2023

I noticed the same issue on our cluster as well. This bug is still present for version 8.7.1.

{"log.level":"error","@timestamp":"2023-05-16T09:22:49.305Z","message":"Failed to connect to backoff(elasticsearch(<REDACTED>)): Connection marked as failed because the onConnect callback failed: Elasticsearch is too old. Please upgrade the instance. If you would like to connect to older instances set output.elasticsearch.allow_older_versions to true. ES=8.6.2, Beat=8.7.1","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"filestream-monitoring","type":"filestream"},"log":{"source":"filestream-monitoring"},"log.logger":"publisher_pipeline_output","log.origin":{"file.line":150,"file.name":"pipeline/client_worker.go"},"service.name":"filebeat","ecs.version":"1.6.0","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-05-16T09:22:49.305Z","message":"Attempting to reconnect to backoff(elasticsearch(<REDACTED>)) with 1655 reconnect attempt(s)","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"filestream-monitoring","type":"filestream"},"log":{"source":"filestream-monitoring"},"log.logger":"publisher_pipeline_output","log.origin":{"file.line":141,"file.name":"pipeline/client_worker.go"},"service.name":"filebeat","ecs.version":"1.6.0","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-05-16T09:22:49.306Z","message":"Attempting to connect to Elasticsearch version 8.7.1","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"filestream-monitoring","type":"filestream"},"log":{"source":"filestream-monitoring"},"service.name":"filebeat","ecs.version":"1.6.0","log.logger":"esclientleg","log.origin":{"file.line":291,"file.name":"eslegclient/connection.go"},"ecs.version":"1.6.0"}

@cmacknz cmacknz added the Team:Elastic-Agent Label for the Agent team label May 16, 2023
@cmacknz
Copy link
Member

cmacknz commented May 16, 2023

Setting allow_older_versions: true in the output settings should work around this.

This should just work though, likely we are caching the version number from the first connection.

@pierrehilbert
Copy link
Contributor

Should be solved by elastic/beats#36884

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants