-
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
[Platform] Status endpoint incorrectly returns 200 before Kibana is ready #66326
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
Pinging @elastic/kibana-operations (Team:Operations) |
Sounds like we're not awaiting the new platform plugins being built. |
Are there any suggested workarounds until this is fixed? We are unable to run our Cypress tests suite on CI because of this but maybe someone has a bright idea. |
|
Thanks @restrry !
Can we (easily) do this if we want to run the tests on every push to a PR?
@v1v WDYT about this? Would you be able to look into the manual parse step? |
Sure thing, I can give a go |
4dea197 could be the
But I don't see the above wait to be 100% silver bullet, the E2E fails anyway since even the Kibana is up and running. In other words, we have included two validations for running the E2E tests when kibana is up and running:
The log output looks like the below one:
Probably too verbose, but there are three important timestamps:
In other words, the So the retry/sleep seems to be approach to run to bypass this particular issue in our end. |
@v1v Thanks for looking into this! Edit: Oh, I misread the first part. I got the impression that we can reliably determine when Kibana is ready to service requests. But it sounds like that is still not trivial, even if we parse the logs?
We can go down this road if really necessary but would obviously be much better if we can find a way to programatically determine when Kibana is ready. What about waiting for the string |
Fixed by #159768 for production usages. Not sure about the dev-environment use case given the dev-server is on front of Kibana, but given the operation team tag was removed from the issue, I'll assume we're only talking about production use cases here and close the issue. |
I'm trying to programatically determine when Kibana is ready to serve requests and therefore calling the status api
/api/status
.Expected behaviour
Until Kibana is up and ready to receive requests I would expect
/api/status
to return something other than 200.Actual behaviour
/api/status
initially returns 503At some point the optimization step is complete which will be logged as:
At this point
/api/status
will return 200. However opening Kibana in the browser will still return an error message: "Elastic did not load properly. Check the server output for more information."After about 60 seconds Kibana will output:
Kibana will now be truly ready to serve requests
Reproduce
This only seems to happen in a bare repository without any cached artefacts - at all! The easiest way to get to this state is by wiping all build files
find {x-pack,src} -type d -name "target" | xargs rm -rf
.Cold start Kibana:
Poll the status endpoint while Kibana is starting:
Note: you should be able to remove the credentials if you are connecting to an ES without security enabled
The text was updated successfully, but these errors were encountered: