# ElasticSearch WARN after installing kibana

**URL:** <https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [March 26, 2021, 2:27am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428 "2021-03-26T02:27:12Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![kylesu](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kylesu](https://discuss.elastic.co/u/kylesu)\
**Post date:** [March 26, 2021, 2:27am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/1 "2021-03-26T02:27:13Z")

</div>

After installing kibana,when i operate(GET/POST/DELETE and so on) Elastic Search with High Level Rest Clinet comes up this warning:

> [@](#):
>
> [SimpleAsyncTaskExecutor-1] [1204] WARN org.elasticsearch.client.RestClient - request [POST {$url}] returned 1 warnings: [299 Elasticsearch-7.10.1-1c34507e66d7db1211f66f3513706fdf548736aa "this request accesses system indices: [.kibana\_1, .kibana\_task\_manager\_1], but in a future major version, direct access to system indices will be prevented by default"]

Each request comes up with one warning,i have 500 millions documents to process every months,this problem would flush my logs and i can't locate the new problem.

i wonder what causes this problem and how to fix it.Thanks.

Version:  
-Elastic Search/kibana: 7.10.1

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 26, 2021, 3:00am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/2 "2021-03-26T03:00:45Z")

</div>

Welcome to our community! 😃

What URL does it mention?

If this is Kibana, then it won't be displayed every single time a new document is ingested.

---

<div class="post-metadata">

**Author:** ![kylesu](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kylesu](https://discuss.elastic.co/u/kylesu)\
**Post date:** [March 26, 2021, 3:08am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/3 "2021-03-26T03:08:38Z")

</div>

Thanks for your reply  
Urls:

- POST https://{hostname}:9200/\_bulk?timeout=1m (would post this request like million times)
- GET https://{hostname}:9200/\_cat/indices?index=user\_data-\*
- DELETE https://{hostname}:9200/user\_data-20210325160624?master\_timeout=30s&ignore\_unavailable=false&expand\_wildcards=open%2Cclosed&allow\_no\_indices=true&ignore\_throttled=false&timeout=30s

Thanks again.

---

<div class="post-metadata">

**Author:** ![kylesu](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kylesu](https://discuss.elastic.co/u/kylesu)\
**Post date:** [March 31, 2021, 3:15am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/4 "2021-03-31T03:15:07Z")

</div>

Does anybody have the same question and resolve?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 31, 2021, 6:30am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/5 "2021-03-31T06:30:30Z")

</div>

I'm surprised that those queries generate a log which is not related.

> High Level Rest Clinet

What is the exact Java code you run when this log is printed?

---

<div class="post-metadata">

**Author:** ![kylesu](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kylesu](https://discuss.elastic.co/u/kylesu)\
**Post date:** [April 1, 2021, 1:42am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/6 "2021-04-01T01:42:35Z")

</div>

Thanks for your reply!  
Here is the java code:

```auto
        Assert.notNull(indexName, "es bulk index with null index name!");
        Assert.notNull(userDatas, "es bulk index with null requests entity!");
        if(CollectionUtils.isEmpty(userDatas)){
            return;
        }

        BulkRequest bulkRequest = new BulkRequest();
        for(UserData userData : userDatas){
            Assert.notNull(userData, "userData is null!");
            log.debug(userData.toString());

            RedisUserLabelData labelData;
            try {
                labelData = RedisUserLabelData.buildFromMysqlUserData(userData);
            } catch (Exception e){
                log.error("RedisUserLabelData build from mysql entity UserData failed!", e);
                continue;
            }

            Map<String, Object> dataMap;
            try {
                dataMap = PropertyUtils.describe(labelData);

                / **去掉class字段** /
                dataMap.remove("class");
            } catch (Exception e){
                throw new RuntimeException("beanUtil, bean to map transform failed!", e);
            }

            Assert.notNull(dataMap, "beanUtil, bean to map result null map");
            Assert.notEmpty(dataMap, "beanUtil, bean to map result empty map");

            IndexRequest indexRequest = new IndexRequest("posts").source(dataMap).index(indexName);
            bulkRequest.add(indexRequest);

        }

        if(bulkRequest.numberOfActions() != userDatas.size()){
            throw new RuntimeException("bulk request has requests number not equal to the parameter collection size!");
        }

        if(bulkRequest.numberOfActions() > 0) {
            BulkResponse bulkResponse = null;
            try {
                bulkResponse = restHighLevelClient.bulk(bulkRequest, RequestOptions.DEFAULT);
            } catch (IOException e) {
                throw new RuntimeException("Error connect to Es", e);
            }

            if(bulkResponse.hasFailures()){
                BulkItemResponse[] bulkItemResponseArr = bulkResponse.getItems();
                for(BulkItemResponse bulkItemResponse : bulkItemResponseArr){
                    if(bulkItemResponse.isFailed()){
                        log.error("error while indexing : " + bulkItemResponse.getFailureMessage(), bulkItemResponse.getFailure().getCause());
                    }
                }
            }
        }

```

I find no way to highlight the exact code where the log is printed, so i quote here:

> bulkResponse = restHighLevelClient.bulk(bulkRequest, RequestOptions.DEFAULT);

Everytime I send request(get/post/delete etc) to Elasticsearch,the log is printed.In order not to delay your time, i do not show the other code.  
Thanks again!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 1, 2021, 2:55am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/7 "2021-04-01T02:55:04Z")

</div>

```
IndexRequest indexRequest = new IndexRequest("posts").source(dataMap).index(indexName);

```

Why did you add `.index(indexName)`?  
And what is the value of `indexName`?

---

<div class="post-metadata">

**Author:** ![kylesu](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kylesu](https://discuss.elastic.co/u/kylesu)\
**Post date:** [April 1, 2021, 3:16am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/8 "2021-04-01T03:16:16Z")

</div>

how does it know which index I want to update if not add `.index(indexName)` ?  
The `indexName` is  
`"UserData" + "-" + new SimpleDateFormat("yyyyMMddHHmmss").format(Calendar.getInstance().getTime()`  
After the update finishing, the index would be `alias` as "UserData"

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 2, 2021, 8:03am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/9 "2021-04-02T08:03:04Z")

</div>

> [@kylesu](#):
>
> ow does it know which index I want to update if not add `.index(indexName)` ?

But you set the index name with:

```auto
new IndexRequest("posts")

```

So I'd write instead:

```auto
IndexRequest indexRequest = new IndexRequest(indexName).source(dataMap);

```

And BTW, I think you are missing the JSON content type.

I think it should be:

```auto
IndexRequest indexRequest = new IndexRequest(indexName).source(dataMap, XContentType.JSON));

```

(But unsure as I never use maps to send data to Elasticsearch).

> [@kylesu](#):
>
> The `indexName` is  
> `"UserData" + "-" + new SimpleDateFormat("yyyyMMddHHmmss").format(Calendar.getInstance().getTime()`

I can't see the correlation with the log message...

> ```
> this request accesses system indices: [.kibana_1, .kibana_task_manager_1]
> 
> ```

I'm wondering if we are really looking at the exact code which is generating this log.  
I'd have expect a `_search` request TBH.

Are you sure you are not running a Search after the bulk or at the same time?

---

<div class="post-metadata">

**Author:** ![kylesu](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kylesu](https://discuss.elastic.co/u/kylesu)\
**Post date:** [April 2, 2021, 8:30am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/10 "2021-04-02T08:30:57Z")

</div>

> [@dadoonet](#):
>
> So I'd write instead:
> 
> ```auto
> IndexRequest indexRequest = new IndexRequest(indexName).source(dataMap);
> 
> ```

Yes, you're right.Thanks for your correction.

I'm convinced that there no Search running at the same tiem.

Search also would print the log as follow:  
`2021-04-02 15:59:10 [20210402155858991] [http-nio-8233-exec-1] WARN org.elasticsearch.client.RestClient - request [PUT https://hostname:9200/sync_ads_order_persist-in/_doc/37944?timeout=1m] returned 1 warnings: [299 Elasticsearch-7.10.1-1c34507e66d7db1211f66f3513706fdf548736aa "this request accesses system indices: [.kibana_1, .kibana_task_manager_1], but in a future major version, direct access to system indices will be prevented by default"]`

BTW, I am wondering if Search Guard leads to this problem, because I installed Search Guard and Kibana at the same time.

Thank for your help and your patience.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 2, 2021, 9:07am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/11 "2021-04-02T09:07:47Z")

</div>

> [@kylesu](#):
>
> BTW, I am wondering if Search Guard leads to this problem, because I installed Search Guard and Kibana at the same time.

Ha! That's probably it.

We don't support this 3rd party plugin here. We have security available in our default free distribution.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 30, 2021, 9:07am UTC](https://discuss.elastic.co/t/elasticsearch-warn-after-installing-kibana/268428/12 "2021-04-30T09:07:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
