-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
.apm-agent-configuration is not created if Kibana is started while ES is not ready #59420
Comments
Pinging @elastic/apm-ui (Team:apm) |
Thanks for letting us aware of this @barkbay. I recently shipped a quick fix for this but it doesn't sound like it's sufficient. I will look into this and make sure that creating the index will be retried for a sufficient amount of time. |
Hi @barkbay, unfortunately, I couldn't reproduce the problem. These were the steps I followed to reproduce.
If you can give more details on how to reproduce it I'll be happy to help. |
Thanks for investigating this one. Here are the full logs. In my case Elasticsearch is created at the same time than Kibana, I think that's the reason why we see only one connection failure. Also I'm not sure what is
|
I think I got the same issue while the Elasticsearch credentials were not yet propagated.
Here are the indices the first time Kibana is started:
I have to delete and restart the Kibana Pod to get the
Maybe that this scenario is easier to reproduce. Thanks ! |
Thanks a lot for your information @barkbay, I'll try to reproduce it and let you know. |
Same issue with 7.6.1 :
When ES is finally available:
|
@cauemarcondes You might need to run kibana in production mode (I think in dev mode it restarts when connecting to ES which seemingly solves the problem). You can run kibana in production mode like:
and then after a while start elasticsearch via apm-it:
I think the solution is to use something like p-retry to retry the index creation operation. This should be done in https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/helpers/create_or_update_index.ts. Either wrap This should go into 7.7 as a bug fix. |
@barkbay I've just backported the fix to 7.7 if you want to try it out. |
Thanks a lot ! I will give it a try. |
It will keep trying to create the index for 10 times, otherwise, it gives up and logs an error. |
I am getting this issue with version: 7.6.2;
|
Hi @alwaysastudent, Please upgrade to 7.7 to find this fixed. |
Kibana version: 7.6.0
Elasticsearch version: 7.60
Original install method: ECK (in dev feature, not yet released)
Describe the bug:
While configuring the Kibana endpoint in the APMServer I had an issue that leads me to discover that if the
.apm-agent-configuration
index can't be created during startup then Kibana do no retries:It is a little bit confusing from a user point of view:
.kibana_task_manager_n
,.kibana_n
)While the root issue is in Kibana
In ECK, when a user creates an Elasticsearch cluster with a Kibana instance, the Kibana pod can be ready before the Elasticsearch cluster.
When it happens a workaround is to restart the Kibana Pod (when ES is ready) but I'm not sure we can easily detect this situation in ECK.
Related to the integration of APM Agent Config Management in ECK
Also kind of related to #57931
Expected behavior:
Retry or postpone the creation of the
.apm-agent-configuration
indexAny additional context:
Issue detected in the context of elastic/cloud-on-k8s#1264
The text was updated successfully, but these errors were encountered: