Hi all.
I created a transform
on ES 7.7.0
from Kibana gui, that uses some group_by
with script to handle any missing fields in the docs:
"pivot": {
"group_by": {
"acquisition.utm_campaign.keyword": {
"terms": {
"script": {
"source": "try {return doc['acquisition.utm_campaign.keyword'].value } catch (Exception e) {return '--';}",
"lang": "painless"
}
}
},
"geoip.country_name.keyword": {
"terms": {
"script": {
"source": "try {return doc['geoip.country_name.keyword'].value } catch (Exception e) {return '--';}",
"lang": "painless"
}
}
},
"geoip.continent_code.keyword": {
"terms": {
"script": {
"source": "try {return doc['geoip.continent_code.keyword'].value } catch (Exception e) {return '--';}",
"lang": "painless"
}
}
},
....
....
The transform is set to run continuous mode
.
After starting the transform, it goes to Indexing
and the to Started
, but after a while it goes to "Failed".
In ES logs we have this error:
{"type": "server", "timestamp": "2020-05-28T15:44:13,120Z", "level": "WARN", "component": "o.e.x.t.t.TransformIndexer", "cluster.name": "XXXXX", "node.name": "elasticsearch", "message": "[sold_products-22] transform encountered an exception: ", "cluster.uuid": "B4prQaEHQi-852irJc1MkA", "node.id": "qQwxRFsESLqzYLVmn6z42Q" ,
"stacktrace": ["java.lang.IllegalArgumentException: field name cannot be null.",
"at org.elasticsearch.index.query.TermsQueryBuilder.<init>(TermsQueryBuilder.java:162) ~[elasticsearch-7.7.0.jar:7.7.0]",
"at org.elasticsearch.xpack.core.transform.transforms.pivot.TermsGroupSource.getIncrementalBucketUpdateFilterQuery(TermsGroupSource.java:63) ~[x-pack-core-7.7.0.jar:7.7.0]",
....
....
and then
{"type": "server", "timestamp": "2020-05-28T15:44:13,124Z", "level": "ERROR", "component": "o.e.x.t.t.TransformTask", "cluster.name": "XXXXX", "node.name": "elasticsearch", "message": "[sold_products-22] transform has failed; experienced: [task encountered irrecoverable failure: field name cannot be null.].", "cluster.uuid": "B4prQaEHQi-852irJc1MkA", "node.id": "qQwxRFsESLqzYLVmn6z42Q" }
On Kibana we can see the following Stats
Stats
pages_processed 25
documents_processed 12521
documents_indexed 9321
trigger_count 41
index_time_in_ms 5151
index_total 19
index_failures 0
search_time_in_ms 28695
search_total 25
search_failures 0
processing_time_in_ms 1163
processing_total 25
exponential_avg_checkpoint_duration_ms 34999
exponential_avg_documents_indexed 9321
exponential_avg_documents_processed 12521
Any hints on how to debug the issue?