# Unexpected error handling request. java.lang.RuntimeException: Fielddata is disabled on text fields by default. Set fielddata=true on \[traceId\] in order to load fielddata in memory by uninverting the inverted index

**URL:** <https://discuss.elastic.co/t/unexpected-error-handling-request-java-lang-runtimeexception-fielddata-is-disabled-on-text-fields-by-default-set-fielddata-true-on-traceid-in-order-to-load-fielddata-in-memory-by-uninverting-the-inverted-index/303776>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [May 2, 2022, 8:53pm UTC](https://discuss.elastic.co/t/unexpected-error-handling-request-java-lang-runtimeexception-fielddata-is-disabled-on-text-fields-by-default-set-fielddata-true-on-traceid-in-order-to-load-fielddata-in-memory-by-uninverting-the-inverted-index/303776 "2022-05-02T20:53:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akhil\_Manepalli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akhil_manepalli/32/105142_2.png) [@Akhil\_Manepalli](https://discuss.elastic.co/u/Akhil_Manepalli)\
**Post date:** [May 2, 2022, 8:53pm UTC](https://discuss.elastic.co/t/unexpected-error-handling-request-java-lang-runtimeexception-fielddata-is-disabled-on-text-fields-by-default-set-fielddata-true-on-traceid-in-order-to-load-fielddata-in-memory-by-uninverting-the-inverted-index/303776/1 "2022-05-02T20:53:46Z")

</div>

My elastic deployments consist of es-data, ingest & master. These are deployed as deployments in Kubernetes. I have Zipkin which uses elastic and Zipkin log shows the above error:

: Unexpected error handling request.  
java.lang.RuntimeException: Fielddata is disabled on text fields by default. Set fielddata=true on [traceId] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.

also saw this warning in the elastic master pod log:  
[2022-05-02T17:40:04,721][WARN][o.e.d.r.a.a.i.RestPutIndexTemplateAction] [JzKVn5L] [types removal] The parameter include\_type\_name should be explicitly specified in put template requests to prepare for 7.0. In 7.0 include\_type\_name will default to 'false', and requests are expected to omit the type name in mapping definitions.

My es-master deployment YAML file is:  
apiVersion: apps/v1  
kind: Deployment  
metadata:  
name: es-master  
labels:  
component: Elasticsearch  
role: master  
spec:  
replicas: 3  
selector:  
matchLabels:  
component: Elasticsearch  
role: master  
template:  
metadata:  
labels:  
component: Elasticsearch  
role: master  
spec:  
initContainers:  
- name: init-sysctl  
image: [docker.io/busybox:1.27.2](http://docker.io/busybox:1.27.2)  
command:  
- sysctl  
- -w  
- vm.max\_map\_count=262144  
securityContext:  
privileged: true  
containers:  
- name: es-master  
image: [docker.elastic.co/elasticsearch/elasticsearch:6.4.0](http://docker.elastic.co/elasticsearch/elasticsearch:6.4.0)  
env:  
- name: NAMESPACE  
valueFrom:  
fieldRef:  
fieldPath: metadata.namespace  
- name: NODE\_NAME  
valueFrom:  
fieldRef:  
fieldPath: metadata.name  
- name: ES\_JAVA\_OPTS  
value: -Xms3g -Xmx3g  
- name: PROCESSORS  
valueFrom:  
resourceFieldRef:  
resource: limits.cpu  
resources:  
requests:  
cpu: 1  
memory: 4Gi  
limits:  
cpu: 1  
memory: 4Gi  
ports:  
- containerPort: 9300  
name: transport  
volumeMounts:  
- name: Elasticsearch-config  
mountPath: /usr/share/Elasticsearch/config/Elasticsearch.yml  
subPath: Elasticsearch.yml  
- name: storage  
mountPath: /data/$HOSTNAME  
volumes:  
- name: Elasticsearch-config  
configMap:  
name: es-config-master  
items:  
- key: Elasticsearch.yml  
path: Elasticsearch.yml  
- name: storage  
persistentVolumeClaim:  
claimName: task-pv-claim

es-data deployment:  
apiVersion: apps/v1  
kind: Deployment  
metadata:  
name: es-data  
labels:  
component: Elasticsearch  
role: data  
spec:  
replicas: 5  
selector:  
matchLabels:  
component: Elasticsearch  
role: data  
template:  
metadata:  
labels:  
component: Elasticsearch  
role: data  
spec:  
initContainers:  
- name: init-sysctl  
image: [docker.io/busybox:1.27.2](http://docker.io/busybox:1.27.2)  
command:  
- sysctl  
- -w  
- vm.max\_map\_count=262144  
securityContext:  
privileged: true  
containers:  
- name: es-data  
image: [docker.elastic.co/elasticsearch/elasticsearch:6.4.0](http://docker.elastic.co/elasticsearch/elasticsearch:6.4.0)  
env:  
- name: NAMESPACE  
valueFrom:  
fieldRef:  
fieldPath: metadata.namespace  
- name: NODE\_NAME  
valueFrom:  
fieldRef:  
fieldPath: metadata.name  
- name: ES\_JAVA\_OPTS  
value: -Xms3g -Xmx3g  
- name: PROCESSORS  
valueFrom:  
resourceFieldRef:  
resource: limits.cpu  
resources:  
requests:  
cpu: 1  
memory: 4Gi  
limits:  
cpu: 1  
memory: 4Gi  
ports:  
- containerPort: 9200  
name: http  
- containerPort: 9300  
name: transport  
volumeMounts:  
- name: storage  
mountPath: /data/$HOSTNAME  
- name: Elasticsearch-config  
mountPath: /usr/share/Elasticsearch/config/Elasticsearch.yml  
subPath: Elasticsearch.yml  
volumes:  
- name: Elasticsearch-config  
configMap:  
name: es-config-data  
items:  
- key: Elasticsearch.yml  
path: Elasticsearch.yml  
- name: storage  
persistentVolumeClaim:  
claimName: task-pv-claim

es-ingest deployment file is:  
apiVersion: apps/v1  
kind: Deployment  
metadata:  
name: es-ingest  
labels:  
component: Elasticsearch  
role: ingest  
spec:  
replicas: 2  
selector:  
matchLabels:  
component: Elasticsearch  
role: ingest  
template:  
metadata:  
labels:  
component: Elasticsearch  
role: ingest  
spec:  
initContainers:  
- name: init-sysctl  
image: [docker.io/busybox:1.27.2](http://docker.io/busybox:1.27.2)  
command:  
- sysctl  
- -w  
- vm.max\_map\_count=262144  
securityContext:  
privileged: true  
containers:  
- name: es-ingest  
image: [docker.elastic.co/elasticsearch/elasticsearch:6.4.0](http://docker.elastic.co/elasticsearch/elasticsearch:6.4.0)  
env:  
- name: NAMESPACE  
valueFrom:  
fieldRef:  
fieldPath: metadata.namespace  
- name: NODE\_NAME  
valueFrom:  
fieldRef:  
fieldPath: metadata.name  
- name: ES\_JAVA\_OPTS  
value: -Xms3g -Xmx3g  
- name: NETWORK\_HOST  
value: _site_,_lo_  
- name: PROCESSORS  
valueFrom:  
resourceFieldRef:  
resource: limits.cpu  
resources:  
requests:  
cpu: 1  
memory: 4Gi  
limits:  
cpu: 1  
memory: 4Gi  
ports:  
- containerPort: 9200  
name: http  
- containerPort: 9300  
name: transport  
volumeMounts:  
- name: Elasticsearch-config  
mountPath: /usr/share/Elasticsearch/config/Elasticsearch.yml  
subPath: Elasticsearch.yml  
- name: storage  
mountPath: /data/$HOSTNAME  
volumes:  
- name: Elasticsearch-config  
configMap:  
name: es-config-ingest  
items:  
- key: Elasticsearch.yml  
path: Elasticsearch.yml  
- name: storage  
persistentVolumeClaim:  
claimName: task-pv-claim

Please help me out with this issue

---

<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:** [May 3, 2022, 12:46am UTC](https://discuss.elastic.co/t/unexpected-error-handling-request-java-lang-runtimeexception-fielddata-is-disabled-on-text-fields-by-default-set-fielddata-true-on-traceid-in-order-to-load-fielddata-in-memory-by-uninverting-the-inverted-index/303776/2 "2022-05-03T00:46:05Z")

</div>

Welcome to our community! 😃  
Please format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you.

> [@Akhil\_Manepalli](#):
>
> [2022-05-02T17:40:04,721][WARN][o.e.d.r.a.a.i.RestPutIndexTemplateAction] [JzKVn5L] [types removal] The parameter include\_type\_name should be explicitly specified in put template requests to prepare for 7.0. In 7.0 include\_type\_name will default to 'false', and requests are expected to omit the type name in mapping definitions.

Take a look at [Removal of mapping types | Elasticsearch Guide [8.1] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.1/removal-of-types.html). You will need to figure out what indices are impacted, and then what's indexing into them.

> [@Akhil\_Manepalli](#):
>
> : Unexpected error handling request.  
> java.lang.RuntimeException: Fielddata is disabled on text fields by default. Set fielddata=true on [traceId] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.

Where is this coming from?

---

<div class="post-metadata">

**Author:** ![Akhil\_Manepalli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akhil_manepalli/32/105142_2.png) [@Akhil\_Manepalli](https://discuss.elastic.co/u/Akhil_Manepalli)\
**Post date:** [May 3, 2022, 2:31am UTC](https://discuss.elastic.co/t/unexpected-error-handling-request-java-lang-runtimeexception-fielddata-is-disabled-on-text-fields-by-default-set-fielddata-true-on-traceid-in-order-to-load-fielddata-in-memory-by-uninverting-the-inverted-index/303776/3 "2022-05-03T02:31:27Z")

</div>

> [@Akhil\_Manepalli](#):
>
> java.lang.RuntimeException: Fielddata is disabled on text fields by default. Set fielddata=true on [traceId] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.

This is coming from Zipkin logs

---

<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:** [May 31, 2022, 2:31am UTC](https://discuss.elastic.co/t/unexpected-error-handling-request-java-lang-runtimeexception-fielddata-is-disabled-on-text-fields-by-default-set-fielddata-true-on-traceid-in-order-to-load-fielddata-in-memory-by-uninverting-the-inverted-index/303776/4 "2022-05-31T02:31:48Z")

</div>

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