[doc][xxxxx], source[n/a, actual length: [5.1kb], max length: 2kb]}]

Hello Everyone, I have a trouble.
This is my logs

[2018-05-03T16:47:04,105][DEBUG][o.e.a.b.TransportShardBulkAction] [sc_cms_api-2018.05.03][4] failed to execute bulk item (index) BulkShardRequest [[sc_cms_api-2018.05.03][4]] containing [index {[sc_cms_api-2018.05.03][doc][NXYuJWMBc68fiDfs88Wm], source[n/a, actual length: [5.1kb], max length: 2kb]}] org.elasticsearch.index.mapper.MapperParsingException: failed to parse [data.star] at org.elasticsearch.index.mapper.FieldMapper.parse(FieldMapper.java:302) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:485) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:500) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseNonDynamicArray(DocumentParser.java:584) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseArray(DocumentParser.java:542) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:396) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:384) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:482) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:500) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:394) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:384) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.internalParseDocument(DocumentParser.java:93) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:67) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:261) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:714) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.shard.IndexShard.applyIndexOperation(IndexShard.java:692) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.shard.IndexShard.applyIndexOperationOnPrimary(IndexShard.java:673) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.executeIndexRequestOnPrimary(TransportShardBulkAction.java:548) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.executeIndexRequest(TransportShardBulkAction.java:140) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.executeBulkItemRequest(TransportShardBulkAction.java:236) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.performOnPrimary(TransportShardBulkAction.java:123) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:110) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:72) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryShardReference.perform(TransportReplicationAction.java:1034) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryShardReference.perform(TransportReplicationAction.java:1012) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.support.replication.ReplicationOperation.execute(ReplicationOperation.java:103) ~[elasticsearch-6.2.3.jar:6.2.3] ... Caused by: java.lang.IllegalStateException: Can't get text on a START_OBJECT at 1:4018 at org.elasticsearch.common.xcontent.json.JsonXContentParser.text(JsonXContentParser.java:85) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.common.xcontent.support.AbstractXContentParser.textOrNull(AbstractXContentParser.java:237) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.TextFieldMapper.parseCreateField(TextFieldMapper.java:345) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.FieldMapper.parse(FieldMapper.java:297) ~[elasticsearch-6.2.3.jar:6.2.3] ... 63 more

Some of the data I have found are of type errors. Some say there is a length limit. From the log, it is too long. Is there any restriction on elasticsearch?
help! thanks.

Hm, I think it's some kind of parsing issue with the document. Do you have a copy of a doc that causes this problem? This exception:

Can't get text on a START_OBJECT

Makes me think there is something malformed about the JSON. The exception about length is a red herring; when an IndexRequest is turned into a string for logging purposes, there's a limit on how large that string can be:

That's just a safety feature, to prevent 100mb documents/bulk requests from blowing out the log with gigabytes of text as it serializes the entire document. It also saves a bunch of heap memory.

So you can ignore that exception, I think the real issue is that "Can't get text" exception.

Thank you for your reply. I have found the problem. I did not specify mapping. The default text of the field is longer than the length.

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