org.elasticsearch.index.mapper.MapperParsingException: failed to parse [priority]

JIRA | Boy van Duuren | 3 years ago
  1. 0

    I started using the 1.2.2-dev version (flatjar made from Github master branch), which apparently causes some issues with the log4j input going to elasticsearch (v0.90.3). Elasticsearch gets a NumberFormatException on the [priority] field in the JSON passed to it. Log4j priorities are defined as INFO, DEBUG, etc, but apparently elasticsearch is expecting a number there. A test setup at home didn't show this error, everything worked without issues there. My test setup at work did show this error. The difference between my home and work setup is that at work elasticsearch is already populated with 1 million+ syslog entries. Not sure is that's related to the problem. {code} [2013-10-21 13:54:30,675][DEBUG][action.bulk ] [Kid Nova] [logstash-2013.10.21][1] failed to execute bulk item (index) index {[logstash-2013.10.21][logs][hCIutJkhQQ63vn4RXjw7zA], source[{"message":"Hello, this is a debug message","@timestamp":"2013-10-21T11:54:30.558Z","@version":"1","type":"log4j_test","tags":["test"],"host":"<ip removed>:35275","path":"com.company.Main","priority":"DEBUG","logger_name":"com.company.Main","thread":"main","class":"?","file":"?:?","method":"?"}]} org.elasticsearch.index.mapper.MapperParsingException: failed to parse [priority] at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:396) at org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:599) at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:467) at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:507) at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:451) at org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:308) at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:401) at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:155) at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:521) at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.NumberFormatException: For input string: "DEBUG" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:441) at java.lang.Long.parseLong(Long.java:483) at org.elasticsearch.common.xcontent.support.AbstractXContentParser.longValue(AbstractXContentParser.java:73) at org.elasticsearch.index.mapper.core.LongFieldMapper.innerParseCreateField(LongFieldMapper.java:307) at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167) at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385) ... 12 more [2013-10-21 13:54:30,838][DEBUG][action.bulk ] [Kid Nova] [logstash-2013.10.21][1] failed to execute bulk item (index) index {[logstash-2013.10.21][logs][70pbSBX5TcuRR-Rqsi-uqA], source[{"message":"Hello, this is an info message","@timestamp":"2013-10-21T11:54:30.574Z","@version":"1","type":"log4j_test","tags":["test"],"host":"<ip removed>:35275","path":"com.company.Main","priority":"INFO","logger_name":"com.company.Main","thread":"main","class":"?","file":"?:?","method":"?"}]} org.elasticsearch.index.mapper.MapperParsingException: failed to parse [priority] at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:396) at org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:599) at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:467) at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:507) at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:451) at org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:308) at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:401) at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:155) at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:521) at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.NumberFormatException: For input string: "INFO" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:441) at java.lang.Long.parseLong(Long.java:483) at org.elasticsearch.common.xcontent.support.AbstractXContentParser.longValue(AbstractXContentParser.java:73) at org.elasticsearch.index.mapper.core.LongFieldMapper.innerParseCreateField(LongFieldMapper.java:307) at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167) at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385) ... 12 more {code}

    JIRA | 3 years ago | Boy van Duuren
    org.elasticsearch.index.mapper.MapperParsingException: failed to parse [priority]
  2. 0

    I started using the 1.2.2-dev version (flatjar made from Github master branch), which apparently causes some issues with the log4j input going to elasticsearch (v0.90.3). Elasticsearch gets a NumberFormatException on the [priority] field in the JSON passed to it. Log4j priorities are defined as INFO, DEBUG, etc, but apparently elasticsearch is expecting a number there. A test setup at home didn't show this error, everything worked without issues there. My test setup at work did show this error. The difference between my home and work setup is that at work elasticsearch is already populated with 1 million+ syslog entries. Not sure is that's related to the problem. {code} [2013-10-21 13:54:30,675][DEBUG][action.bulk ] [Kid Nova] [logstash-2013.10.21][1] failed to execute bulk item (index) index {[logstash-2013.10.21][logs][hCIutJkhQQ63vn4RXjw7zA], source[{"message":"Hello, this is a debug message","@timestamp":"2013-10-21T11:54:30.558Z","@version":"1","type":"log4j_test","tags":["test"],"host":"<ip removed>:35275","path":"com.company.Main","priority":"DEBUG","logger_name":"com.company.Main","thread":"main","class":"?","file":"?:?","method":"?"}]} org.elasticsearch.index.mapper.MapperParsingException: failed to parse [priority] at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:396) at org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:599) at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:467) at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:507) at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:451) at org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:308) at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:401) at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:155) at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:521) at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.NumberFormatException: For input string: "DEBUG" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:441) at java.lang.Long.parseLong(Long.java:483) at org.elasticsearch.common.xcontent.support.AbstractXContentParser.longValue(AbstractXContentParser.java:73) at org.elasticsearch.index.mapper.core.LongFieldMapper.innerParseCreateField(LongFieldMapper.java:307) at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167) at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385) ... 12 more [2013-10-21 13:54:30,838][DEBUG][action.bulk ] [Kid Nova] [logstash-2013.10.21][1] failed to execute bulk item (index) index {[logstash-2013.10.21][logs][70pbSBX5TcuRR-Rqsi-uqA], source[{"message":"Hello, this is an info message","@timestamp":"2013-10-21T11:54:30.574Z","@version":"1","type":"log4j_test","tags":["test"],"host":"<ip removed>:35275","path":"com.company.Main","priority":"INFO","logger_name":"com.company.Main","thread":"main","class":"?","file":"?:?","method":"?"}]} org.elasticsearch.index.mapper.MapperParsingException: failed to parse [priority] at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:396) at org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:599) at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:467) at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:507) at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:451) at org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:308) at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:401) at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:155) at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:521) at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.NumberFormatException: For input string: "INFO" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:441) at java.lang.Long.parseLong(Long.java:483) at org.elasticsearch.common.xcontent.support.AbstractXContentParser.longValue(AbstractXContentParser.java:73) at org.elasticsearch.index.mapper.core.LongFieldMapper.innerParseCreateField(LongFieldMapper.java:307) at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167) at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385) ... 12 more {code}

    JIRA | 3 years ago | Boy van Duuren
    org.elasticsearch.index.mapper.MapperParsingException: failed to parse [priority]
  3. 0

    Attribute type automaticaly detected by ES?

    GitHub | 2 years ago | razvanphp
    org.elasticsearch.index.mapper.MapperParsingException: failed to parse [ctxt_label]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Failed to parse

    GitHub | 2 years ago | ArnaudValensi
    org.elasticsearch.index.mapper.MapperParsingException: failed to parse [argument.msg]
  6. 0

    error: elasticsearch java : java.lang.NumberFormatException: For input string: "value"

    GitHub | 2 years ago | elastic10
    org.elasticsearch.index.mapper.MapperParsingException: failed to parse [documents.document.body.lead.p.TC]

  1. treefolk 1 times, last 2 weeks ago
  2. MoYapro 5 times, last 3 weeks ago
  3. Handemelindo 2 times, last 1 month ago
  4. marcbouvierdav 1 times, last 2 months ago
  5. tyson925 4 times, last 2 months ago
13 more registered users
17 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NumberFormatException

    For input string: "DEBUG"

    at java.lang.NumberFormatException.forInputString()
  2. Java RT
    Long.parseLong
    1. java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    2. java.lang.Long.parseLong(Long.java:441)
    3. java.lang.Long.parseLong(Long.java:483)
    3 frames
  3. ElasticSearch
    TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run
    1. org.elasticsearch.common.xcontent.support.AbstractXContentParser.longValue(AbstractXContentParser.java:73)
    2. org.elasticsearch.index.mapper.core.LongFieldMapper.innerParseCreateField(LongFieldMapper.java:307)
    3. org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167)
    4. org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385)
    5. org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:599)
    6. org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:467)
    7. org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:507)
    8. org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:451)
    9. org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:308)
    10. org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:401)
    11. org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:155)
    12. org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:521)
    13. org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419)
    13 frames
  4. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    3. java.lang.Thread.run(Thread.java:724)
    3 frames