# Request timeout during index validation

**URL:** <https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509>\
**Category:** Hibernate Search\
**Created:** [July 21, 2022, 2:58pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509 "2022-07-21T14:58:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![fraf](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/fraf/32/1614_2.png) [@fraf](https://discourse.hibernate.org/u/fraf)\
**Post date:** [July 21, 2022, 2:58pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/1 "2022-07-21T14:58:35Z")

</div>

I have the same time out error. I just changed the schema management strategy from CREATE to CREATE\_OR\_VALIDATE (default). And now, I have timeout :

```auto
Failure:
org.hibernate.search.util.common.SearchException: HSEARCH400034: Unable to retrieve index metadata from Elasticsearch: HSEARCH400590: Request execution exceeded the timeout of 100s, 0ms and 0ns. Request was GET /acteparticipation-write,acteparticipation-read with parameters {ignore_unavailable=true, allow_no_indices=true}
	at org.hibernate.search.backend.elasticsearch.schema.management.impl.ElasticsearchSchemaAccessor.lambda$getCurrentIndexMetadata$0(ElasticsearchSchemaAccessor.java:93)
	at org.hibernate.search.util.common.impl.Futures.lambda$handler$1(Futures.java:63)
	at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:986)
	at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:970)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
	at org.hibernate.search.backend.elasticsearch.client.impl.ElasticsearchClientImpl.lambda$send$2(ElasticsearchClientImpl.java:156)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.hibernate.search.util.common.SearchTimeoutException: HSEARCH400590: Request execution exceeded the timeout of 100s, 0ms and 0ns. Request was GET /acteparticipation-write,acteparticipation-read with parameters {ignore_unavailable=true, allow_no_indices=true}
	at org.hibernate.search.backend.elasticsearch.client.impl.ElasticsearchClientImpl.lambda$send$2(ElasticsearchClientImpl.java:153)
	... 6 common frames omitted
2022-07-21 16:53:12,967 o.h.s.e.r.spi.RootFailureCollector [E] HSEARCH000521: Hibernate Search encountered a failure during bootstrap; continuing for now to list all problems, but the process will ultimately be aborted.
Context: Hibernate ORM mapping, type 'com.allegoria.notariat.business.Banque'
Failure:
org.hibernate.search.util.common.SearchException: HSEARCH400034: Unable to retrieve index metadata from Elasticsearch: HSEARCH400590: Request execution exceeded the timeout of 100s, 0ms and 0ns. Request was GET /banque-write,banque-read with parameters {ignore_unavailable=true, allow_no_indices=true}
	at org.hibernate.search.backend.elasticsearch.schema.management.impl.ElasticsearchSchemaAccessor.lambda$getCurrentIndexMetadata$0(ElasticsearchSchemaAccessor.java:93)
	at org.hibernate.search.util.common.impl.Futures.lambda$handler$1(Futures.java:63)
	at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:986)
	at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:970)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
	at org.hibernate.search.backend.elasticsearch.client.impl.ElasticsearchClientImpl.lambda$send$2(ElasticsearchClientImpl.java:156)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.hibernate.search.util.common.SearchTimeoutException: HSEARCH400590: Request execution exceeded the timeout of 100s, 0ms and 0ns. Request was GET /banque-write,banque-read with parameters {ignore_unavailable=true, allow_no_indices=true}
	at org.hibernate.search.backend.elasticsearch.client.impl.ElasticsearchClientImpl.lambda$send$2(ElasticsearchClientImpl.java:153)
	... 6 common frames omitted
2022-07-21 16:53:12,992 o.h.s.e.r.spi.RootFailureCollector [E] HSEARCH000521: Hibernate Search encountered a failure during bootstrap; continuing for now to list all problems, but the process will ultimately be aborted.
Context: Hibernate ORM mapping, type 'com.allegoria.notariat.business.Huissier'

```

My ES server is well startup and reachable with a REST client. I am all in local (Client + ES server)

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [July 21, 2022, 3:05pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/2 "2022-07-21T15:05:04Z")

</div>

Please don’t ressucitate old threads 🙂

I moved your message from [The operation failed due to the failure of the call to the bulk REST API - #9 by Ansuman\_Pattanayak](https://discourse.hibernate.org/t/the-operation-failed-due-to-the-failure-of-the-call-to-the-bulk-rest-api/4373/9) to a new thread.

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [July 21, 2022, 3:11pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/3 "2022-07-21T15:11:16Z")

</div>

So, from what I can see, simply getting the index metadata is taking more than 100s… A bit weird, wouldn’t you say?

Are you sure there isn’t a network problem somewhere? What happens when you perform a GET request manually, with the same host used in Hibernate Search and targeting path `/banque-write,banque-read`? Does that time out as well?

Alternatively, if your application has many indexes, it’s possible Hibernate Search tries to execute too many request at once and the last ones end up waiting in the queue for a while, eventually reaching the 100s limit. But damn, 100s to start your application is a lot… You’d need lots of very heavy indexes, or a very slow network/server, to reach that timeout.

---

<div class="post-metadata">

**Author:** ![fraf](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/fraf/32/1614_2.png) [@fraf](https://discourse.hibernate.org/u/fraf)\
**Post date:** [July 21, 2022, 3:45pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/4 "2022-07-21T15:45:47Z")

</div>

Can’t be network, I am all in local.  
With CREATE schema strategy, I don’t get the time out :  
GET request call are done in time :

```auto
2022-07-21 17:24:47,193 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,193 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_nodes/http?timeout=1000ms] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,384 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/actedocument-write,actedocument-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,395 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/agenceimmobiliere-write,agenceimmobiliere-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,396 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/acteprive-write,acteprive-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,408 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/appel-write,appel-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,424 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/acteparticipation-write,acteparticipation-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,434 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/assurance-write,assurance-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,437 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/associationsyndicale-write,associationsyndicale-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,437 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/acteprive-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,438 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/agenceimmobiliere-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,441 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/appel-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,444 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/avocat-write,avocat-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,445 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/autretiers-write,autretiers-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
...
2022-07-21 17:24:47,541 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/expertimmobilier-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,541 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/dossier-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,546 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/genealogiste-write,genealogiste-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,552 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/geometre-write,geometre-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,556 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/gestionnairevoirie-write,gestionnairevoirie-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,558 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/genealogiste-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,563 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/geometre-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,566 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/greffetribunal-write,greffetribunal-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,567 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/gestionnairevoirie-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,573 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/huissier-write,huissier-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,574 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/greffetribunal-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,584 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/huissier-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,586 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/intermediaire-write,intermediaire-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,587 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/mairie-write,mairie-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,594 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/mandataireliquidateur-write,mandataireliquidateur-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,597 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/intermediaire-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,605 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/mairie-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,607 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/mentionmicen-write,mentionmicen-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,611 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/mandataireliquidateur-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,627 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/naturebien-write,naturebien-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,631 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/mentionmicen-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,635 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/naturebien-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,642 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/recetteimpots-write,recetteimpots-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,658 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/sousproduit-write,sousproduit-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,659 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/recetteimpots-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,667 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/sousproduit-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,671 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/representant-write,representant-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,678 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/syndic-write,syndic-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,692 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/representant-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,695 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/syndic-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,696 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/ventesousproduit-write,ventesousproduit-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,698 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/tresorerieprincipale-write,tresorerieprincipale-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,706 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/tiers-write,tiers-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,707 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/ventesousproduit-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,711 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/tresorerieprincipale-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,721 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/tiers-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:24:47,724 o.h.s.e.c.s.ConfigurationPropertyChecker [W] HSEARCH000568: Invalid configuration passed to Hibernate Search: some properties in the given configuration are not used. There might be misspelled property keys in your configuration. Unused properties: [hibernate.search.backend.indexes.signature.schema_management.minimal_required_status, hibernate.search.backend.indices.memory.index_buffer_size, hibernate.search.backend]. To disable this warning, set the property 'hibernate.search.configuration_property_checking.strategy' to 'ignore'.
2022-07-21 17:24:51,676 c.a.n.s.a.v.KeyValidationService [I] [SDK] Initialisation de la clé privée...
2022-07-21 17:24:51,677 c.a.n.s.a.v.KeyValidationService [W] Une erreur s'est produite lors de la création de la clé privée mais cela peut être ignoré en environnement hors cible : C:\Temp\sdk-privatekey.der
2022-07-21 17:24:57,215 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_nodes/http?timeout=1000ms] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:25:07,220 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_nodes/http?timeout=1000ms] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:25:17,226 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_nodes/http?timeout=1000ms] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:25:25,826 c.f.s.e.s.b.IndexationMappingAnalyzer [I] Scan terminée, 0 trouvées
2022-07-21 17:25:27,231 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_nodes/http?timeout=1000ms] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:25:37,237 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_nodes/http?timeout=1000ms] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:25:41,633 c.f.signature.listeners.SrcEventListener [I] SrcEventListener constructed
2022-07-21 17:25:47,242 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_nodes/http?timeout=1000ms] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-21 17:25:53,442 pertySourcedRequestMappingHandlerMapping [I] Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]
2022-07-21 17:25:53,714 d.s.w.p.DocumentationPluginsBootstrapper [I] Context refreshed
2022-07-21 17:25:53,799 d.s.w.p.DocumentationPluginsBootstrapper [I] Found 2 custom documentation plugin(s)
2022-07-21 17:25:54,259 s.d.s.w.s.ApiListingReferenceScanner [I] Scanning for api listing references
2022-07-21 17:25:54,729 .d.s.w.r.o.CachingOperationNameGenerator [I] Generating unique operation named: createUsingPOST_1
2022-07-21 17:25:54,731 .d.s.w.r.o.CachingOperationNameGenerator [I] Generating unique operation named: deleteUsingDELETE_1
2022-07-21 17:25:54,735 .d.s.w.r.o.CachingOperationNameGenerator [I] Generating unique operation named: getUsingGET_1
2022-07-21 17:25:54,74

```

The args :

```auto
massIndexer
				.idFetchSize(idFetchSize) //1 (mysql)
				.batchSizeToLoadObjects(batchSize) //50
				.dropAndCreateSchemaOnStart(true)
				.threadsToLoadObjects(numberOfThreads) //16
				.purgeAllOnStart(false)
				.startAndWait();

```

I tried to lower batch values but nothing better. Timeout Occurs.

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [July 21, 2022, 3:48pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/5 "2022-07-21T15:48:10Z")

</div>

I don’t get it, is the timeout happening when starting the application or when mass indexing?

The CREATE/CREATE\_OR\_VALIDATE strategies impact only what happens on application startup, not what happens on mass indexing.

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [July 21, 2022, 3:50pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/6 "2022-07-21T15:50:24Z")

</div>

> [@fraf](#):
>
> ` .idFetchSize(idFetchSize) //1 (mysql)`

Unrelated to your problem, but this really should be `Integer.MIN_VALUE`, not `1`. See [Hibernate Search 7.0.0.Final: Reference Documentation](https://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#mapper-orm-indexing-massindexer-basics) :

> A note to MySQL users: the `MassIndexer` uses forward only scrollable results to iterate on the primary keys to be loaded, but MySQL’s JDBC driver will preload all values in memory.
> 
> To avoid this “optimization” set the [`idFetchSize` parameter](https://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#mapper-orm-indexing-massindexer-parameters-idfetchsize) to `Integer.MIN_VALUE`.

---

<div class="post-metadata">

**Author:** ![fraf](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/fraf/32/1614_2.png) [@fraf](https://discourse.hibernate.org/u/fraf)\
**Post date:** [July 21, 2022, 4:00pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/7 "2022-07-21T16:00:21Z")

</div>

Yes, sorry I was confusing, it happens only when starting application. The mass indexer is working well.

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [July 21, 2022, 4:10pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/8 "2022-07-21T16:10:13Z")

</div>

So what are the logs of the rest client when your application starts with the `CREATE_OR_VALIDATE` strategy?

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [July 21, 2022, 4:11pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/9 "2022-07-21T16:11:01Z")

</div>

By the way, you should address this warning:

```auto
2022-07-21 17:24:47,724 o.h.s.e.c.s.ConfigurationPropertyChecker [W] HSEARCH000568: Invalid configuration passed to Hibernate Search: some properties in the given configuration are not used. There might be misspelled property keys in your configuration. Unused properties: [hibernate.search.backend.indexes.signature.schema_management.minimal_required_status, hibernate.search.backend.indices.memory.index_buffer_size, hibernate.search.backend]. To disable this warning, set the property 'hibernate.search.configuration_property_checking.strategy' to 'ignore'.

```

---

<div class="post-metadata">

**Author:** ![fraf](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/fraf/32/1614_2.png) [@fraf](https://discourse.hibernate.org/u/fraf)\
**Post date:** [July 22, 2022, 7:31am UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/10 "2022-07-22T07:31:46Z")

</div>

So here the stacktrace when SearchTimeOutException is thrown :

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/hibernate/original/2X/6/6ea0bc1bec29f6d98b1aa4af67bdba0b46cd8776.png)

and the message :

HSEARCH400590: Request execution exceeded the timeout of 1000s, 0ms and 0ns. Request was GET /expertimmobilier-write,expertimmobilier-read with parameters {ignore\_unavailable=true, allow\_no\_indices=true}

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [July 22, 2022, 7:33am UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/11 "2022-07-22T07:33:49Z")

</div>

I’m sorry but this is not useful; as you can see there is little information here.

Again, what are the startup logs, in particular those of the Rest client?

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [July 22, 2022, 8:33am UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/12 "2022-07-22T08:33:59Z")

</div>

You can log every request going through the REST client by setting the log level of categories `org.hibernate.search` and `org.elasticsearch.client` to TRACE.

More info in the case of Hibernate Search: [Hibernate Search 6.1.5.Final: Reference Documentation](https://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#troubleshooting-logging-elasticsearch-request)

---

<div class="post-metadata">

**Author:** ![fraf](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/fraf/32/1614_2.png) [@fraf](https://discourse.hibernate.org/u/fraf)\
**Post date:** [July 22, 2022, 9:00am UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/13 "2022-07-22T09:00:09Z")

</div>

Yes I found it, but I have a lot more problem I fear. Elastic abandonned the  
[Java High Level REST Client](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high.html)  
We migrated to ES Server 7.16.3 (for other reasons) so I should migrate the to the new [Elasticsearch Java API Client [7.16]](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/7.16/index.html)

> **[Installation | Elasticsearch Java API Client \[7.16\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/7.16/installation.html)**

It could be long as we used the Java High Level REST Client API in the application, some rewrite needed.

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [July 22, 2022, 9:02am UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/14 "2022-07-22T09:02:32Z")

</div>

Yes, your assessment is correct. The High Level REST Client has been discontinued and replaced with the Java API Client.

Hibernate Search doesn’t use any of those clients, though. It relies on a lower-level client which is still very much alive and kicking.

Anyway, I’ll let you come back with more info about the Hibernate Search problem once you’ve dealt with this 🙂

---

<div class="post-metadata">

**Author:** ![fraf](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/fraf/32/1614_2.png) [@fraf](https://discourse.hibernate.org/u/fraf)\
**Post date:** [July 22, 2022, 2:32pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/15 "2022-07-22T14:32:01Z")

</div>

> [@yrodiere](#):
>
> Hibernate Search doesn’t use any of those clients, though. It relies on a lower-level client which is still very much alive and kicking.

Indeed, hsearch relies on low level rest client. I see it in maven dependency graph :

```auto
[INFO] | | +- org.hibernate.search:hibernate-search-backend-elasticsearch:jar:6.1.1.Final:compile
[INFO] | | | +- (org.hibernate.search:hibernate-search-engine:jar:6.1.1.Final:compile - omitted for duplicate)
[INFO] | | | +- org.elasticsearch.client:elasticsearch-rest-client:jar:7.16.3:compile
[INFO] | | | | +- (org.apache.httpcomponents:httpclient:jar:4.5.5:compile - version managed from 4.5.10; omitted for duplicate)
[INFO] | | | | +- (org.apache.httpcomponents:httpcore:jar:4.4.12:compile - omitted for conflict with 4.4.9)
[INFO] | | | | +- org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile
[INFO] | | | | +- org.apache.httpcomponents:httpcore-nio:jar:4.4.12:compile
[INFO] | | | | +- (commons-codec:commons-codec:jar:1.10:compile - version managed from 1.11; omitted for duplicate)
[INFO] | | | | \- (commons-logging:commons-logging:jar:1.1.3:compile - omitted for conflict with 1.0.4)
[INFO] | | | +- org.elasticsearch.client:elasticsearch-rest-client-sniffer:jar:7.16.3:compile
[INFO] | | | | +- (org.elasticsearch.client:elasticsearch-rest-client:jar:7.16.3:compile - omitted for duplicate)
[INFO] | | | | +- (org.apache.httpcomponents:httpclient:jar:4.5.5:compile - version managed from 4.5.10; omitted for duplicate)
[INFO] | | | | +- (org.apache.httpcomponents:httpcore:jar:4.4.12:compile - omitted for conflict with 4.4.9)
[INFO] | | | | +- (commons-codec:commons-codec:jar:1.10:compile - version managed from 1.11; omitted for duplicate)
[INFO] | | | | +- (commons-logging:commons-logging:jar:1.1.3:compile - omitted for conflict with 1.0.4)
[INFO] | | | | \- (com.fasterxml.jackson.core:jackson-core:jar:2.11.4:compile - version managed from 2.10.4; omitted for duplicate)
[INFO] | | | +- (org.jboss.logging:jboss-logging:jar:3.4.3.Final:compile - omitted for duplicate)
[INFO] | | | \- (com.google.code.gson:gson:jar:2.8.7:compile - version managed from 2.8.9; omitted for duplicate)

```

This is version 7.16.3 which is used. So I need to debug it. No matter if my application is using the High Level Client.  
I understood the difference between both here : [[java - elasticsearch-rest-high-level-client vs elasticsearch-rest-client - Stack Overflow](https://stackoverflow.com/questions/62340904/elasticsearch-rest-high-level-client-vs-elasticsearch-rest-client)]

---

<div class="post-metadata">

**Author:** ![fraf](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/fraf/32/1614_2.png) [@fraf](https://discourse.hibernate.org/u/fraf)\
**Post date:** [July 25, 2022, 11:14am UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/16 "2022-07-25T11:14:12Z")

</div>

Hi,

So I simplify my schema/indexes. I only test with one index creation. And the VALIDATION works.  
Here the log :

```auto
2022-07-25 13:02:40,709 org.elasticsearch.client.RestClient [D] request [GET http://127.0.0.1:9200/] returned [HTTP/1.1 200 OK]
2022-07-25 13:02:40,710 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-25 13:02:40,892 org.elasticsearch.client.RestClient [D] request [GET http://127.0.0.1:9200/acteparticipation-write,acteparticipation-read?ignore_unavailable=true&allow_no_indices=true] returned [HTTP/1.1 200 OK]
2022-07-25 13:02:40,893 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/acteparticipation-write,acteparticipation-read?ignore_unavailable=true&allow_no_indices=true] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-25 13:02:40,927 org.elasticsearch.client.RestClient [D] request [GET http://127.0.0.1:9200/_cluster/health/acteparticipation-write?timeout=100000ms&wait_for_status=yellow] returned [HTTP/1.1 200 OK]
2022-07-25 13:02:40,927 org.elasticsearch.client.RestClient [W] request [GET http://127.0.0.1:9200/_cluster/health/acteparticipation-write?timeout=100000ms&wait_for_status=yellow] returned 1 warnings: [299 Elasticsearch-7.16.3-4e6e4eab2297e949ec994e688dad46290d018022 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/security-minimal-setup.html to enable security."]
2022-07-25 13:02:40,930 o.h.s.e.c.s.ConfigurationPropertyChecker [W] HSEARCH000568: Invalid configuration passed to Hibernate Search: some properties in the given configuration are not used. There might be misspelled property keys in your configuration. Unused properties: [hibernate.search.backend.indexes.signature.schema_management.minimal_required_status, hibernate.search.backend.indices.memory.index_buffer_size, hibernate.search.backend]. To disable this warning, set the property 'hibernate.search.configuration_property_checking.strategy' to 'ignore'.
2022-07-25 13:02:44,790 c.a.n.s.a.v.KeyValidationService [I] [SDK] Initialisation de la clé privée...
2022-07-25 13:02:44,791 c.a.n.s.a.v.KeyValidationService [W] Une erreur s'est produite lors de la création de la clé privée mais cela peut être ignoré en environnement hors cible : C:\Temp\sdk-privatekey.der
2022-07-25 13:03:17,881 c.f.s.e.s.b.IndexationMappingAnalyzer [I] Scan terminée, 0 trouvées
202

```

But in my case, I have about 350 fields indexed (fields), and 42 indexes. When validating all of these, I have a searchTimeout Exception. I tried to increase to 1000s (yes 1000 seconds), and still having a timeout when validating. Config used (100s) :

```auto
hp.put("hibernate.search.backend.request_timeout", "100000");
			hp.put("hibernate.search.backend.connection_timeout", "100000");
			hp.put("hibernate.search.backend.read_timeout", "100000");

```

Below, a capture of the debug showing the request that causes the timeout to happen. It is during a health check request.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/hibernate/original/2X/0/024f1e2374e288416d52b170242b7677c666b7a2.jpeg)

I don’t know what to do more. The timeout seems to be normal (not a bug), but something put the request in idle or waiting mode (the server may not serve the request).  
By the way, I will open another post where I see that validation failed just after a mass indexing process that successfully applied. Not normal I suppose.

Thanks.

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [July 25, 2022, 1:25pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/17 "2022-07-25T13:25:44Z")

</div>

Your logs don’t include Hibernate Search traces. Please set the log level of `org.hibernate.search` to `TRACE` (or whatever equivalent your logger uses for very detailed logging).

Also, obviously, I’ll need the logs of a run where you actually get a timeout.

I tried to reproduce your problem on my end, no luck. With 42 indexes, it’s quite slow (4 seconds), but nowhere near what you’re experiencing. It will be easier if you can you provide a small reproducer project, perhaps based on [hibernate-test-case-templates/search/hibernate-search-6/orm-elasticsearch at main · hibernate/hibernate-test-case-templates · GitHub](https://github.com/hibernate/hibernate-test-case-templates/tree/main/search/hibernate-search-6/orm-elasticsearch) .

---

<div class="post-metadata">

**Author:** ![fraf](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/fraf/32/1614_2.png) [@fraf](https://discourse.hibernate.org/u/fraf)\
**Post date:** [July 25, 2022, 2:33pm UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/18 "2022-07-25T14:33:37Z")

</div>

Well I found the cause. Maybe your are going to be surprised, but that’s the fresh ticket you created :  
[[HSEARCH-4652] - Hibernate JIRA](https://hibernate.atlassian.net/browse/HSEARCH-4652)  
When I correct this bug, by commenting the searchAnalyser, the validation pass and then application starts. You should be able to reproduce this timeOut exception ?

This side effect of shema validation was hard to debug, SearchTimeoutException meaning nothing and all at the same time.

Thanks for your effort.

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [July 26, 2022, 6:32am UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/19 "2022-07-26T06:32:55Z")

</div>

> [@fraf](#):
>
> Well I found the cause. Maybe your are going to be surprised, but that’s the fresh ticket you created :  
> [[HSEARCH-4652] - Hibernate JIRA](https://hibernate.atlassian.net/browse/HSEARCH-4652)

I’m surprised indeed. I doubt that’s the whole of it.

> [@fraf](#):
>
> You should be able to reproduce this timeOut exception ?

Unfortunately no, even with 42 indexes failing validation, I can’t reproduce your problem.

But if you won’t provide a reproducer and won’t even give me the logs, I think I’ll stop there. I’m glad you worked around the problem.

---

<div class="post-metadata">

**Author:** ![fraf](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/fraf/32/1614_2.png) [@fraf](https://discourse.hibernate.org/u/fraf)\
**Post date:** [July 26, 2022, 9:42am UTC](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509/20 "2022-07-26T09:42:40Z")

</div>

Here the logs with trace :

[SearchTimeoutException](https://easyupload.io/s5y7lj)

You create the Exception with the property mapping :

```auto
public static void fullTextFieldSTANDARD(PropertyMappingStep propertyMappingStep, String fieldName) {
        propertyMappingStep
                .fullTextField(fieldName)
                .analyzer(STANDARD_MIN_3)
                .searchAnalyzer(STANDARD_MIN_3)
                .searchable(Searchable.YES)
                .projectable(Projectable.YES);
    }

```

You resolve the bug by commenting the line :

```auto
public static void fullTextFieldSTANDARD(PropertyMappingStep propertyMappingStep, String fieldName) {
        propertyMappingStep
                .fullTextField(fieldName)
                .analyzer(STANDARD_MIN_3)
                //.searchAnalyzer(STANDARD_MIN_3)
                .searchable(Searchable.YES)
                .projectable(Projectable.YES);
    }

```

And so, the validation process does work (we see other validation errors if any) and application starts.

[Next page](https://discourse.hibernate.org/t/request-timeout-during-index-validation/6509.md?page=2)
