View Single Post
Old 04-04-2021, 07:39 AM   #133
mapozyan
Connoisseur
mapozyan composes epic poetry in binary.mapozyan composes epic poetry in binary.mapozyan composes epic poetry in binary.mapozyan composes epic poetry in binary.mapozyan composes epic poetry in binary.mapozyan composes epic poetry in binary.mapozyan composes epic poetry in binary.mapozyan composes epic poetry in binary.mapozyan composes epic poetry in binary.mapozyan composes epic poetry in binary.mapozyan composes epic poetry in binary.
 
Posts: 77
Karma: 90088
Join Date: Jul 2020
Device: android
Quote:
Originally Posted by noonoo View Post
I have done some research.... Wireshark shows that there is a conversation between power search and elastic search going on.

power search is issuing a query against elastic search but always receives a 404 not found.

query:
{"_source": false, "query": {"simple_query_string": {"query": "3f55fa2b-79ac-4f40-9244-6c0d7cbaa416"}}}


response:
HTTP/1.1 404 Not Found
content-type: application/json; charset=UTF-8
content-length: 371
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"n o such index [library]","resource.type":"index_or_alias","resource.id":" library","index_uuid":"_na_","index":"library"}],"type":"index_not_found_exception","reason":"n o such index [library]","resource.type":"index_or_alias","resource.id":" library","index_uuid":"_na_","index":"library"},"s tatus":404}

I think the issue here is the method you are employing to test for the availability of elastic search. I am not a developer, but it looks like the problem is in get_elasticsearch_client(). Not sure why you are using that specific query for the test... On a new system the index has not been created yet, correct?

Cheers.
All correct, thats an expected behavior.

I just realized that its not always that obvious to detect the moment when ElasticSearch is completely up and running. There is ping method available for that, but even after it succeeds the next search sometimes might fail. So I am doing some fake search to make sure that the service is already responding in expected manner. And 404 error code is OK, i.e. we interpret it as a signal that ElasticSearch is running.

Thanks for your research though. It was very close to the actual issue, so in version 2.0.0 HTTP error code 404 was not ignored in some other cases.

Last edited by mapozyan; 04-04-2021 at 07:43 AM.
mapozyan is offline   Reply With Quote