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

Server Fault | Alex | 1 year ago
  1. 0

    elasticsearch - Sending log4j logs to ELK using SocketAppender - Server Fault

    serverfault.com | 1 year ago
    org.elasticsearch.index.mapper.MapperParsingException: failed to parse [priority]
  2. 0

    Sending log4j logs to ELK using SocketAppender

    Server Fault | 1 year ago | Alex
    org.elasticsearch.index.mapper.MapperParsingException: failed to parse [priority]
  3. 0

    GitHub comment 108#166923778

    GitHub | 12 months ago | 123dev
    org.elasticsearch.index.mapper.MapperParsingException: failed to parse [event_type]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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]
  6. 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]

  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:589)
    3. java.lang.Long.parseLong(Long.java:631)
    3 frames
  3. ElasticSearch
    AbstractRunnable.run
    1. org.elasticsearch.common.xcontent.support.AbstractXContentParser.longValue(AbstractXContentParser.java:145)
    2. org.elasticsearch.index.mapper.core.LongFieldMapper.innerParseCreateField(LongFieldMapper.java:288)
    3. org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:239)
    4. org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:401)
    5. org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:706)
    6. org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:497)
    7. org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:544)
    8. org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:493)
    9. org.elasticsearch.index.shard.IndexShard.prepareCreate(IndexShard.java:466)
    10. org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:418)
    11. org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:148)
    12. org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$PrimaryPhase.performOnPrimary(TransportShardReplicationOperationAction.java:574)
    13. org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$PrimaryPhase$1.doRun(TransportShardReplicationOperationAction.java:440)
    14. org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:36)
    14 frames
  4. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    3. java.lang.Thread.run(Thread.java:745)
    3 frames