【问题标题】:failed to parse field [duration] of type [long] in document无法解析文档中 [long] 类型的字段 [duration]
【发布时间】:2022-11-14 11:18:46
【问题描述】:

在 kuberenetes 集群中,当将 jaeger-tracing 的数据推送到 elasticsearch 时,我在 jaeger-tracing-collector 中收到以下错误,我之间没有任何过滤器,例如 logstash/filebeat。 jaeger 数据直接推送到 elasticsearch 中。我对弹性搜索和相关事物非常陌生,任何帮助将不胜感激..

提前致谢...

错误 :

{
  "level": "error",
  "ts": 1656982524.1294773,
  "caller": "config/config.go:137",
  "msg": "Elasticsearch part of bulk request failed",
  "map-key": "index",
  "response": {
    "_index": "jaeger-span-2022-07-05",
    "_type": "_doc",
    "_id": "9EHay4EBv4T2qdA80Ei7",
    "status": 400,
    "error": {
      "type": "mapper_parsing_exception",
      "reason": "failed to parse field [duration] of type [long] in document with id '9EHay4EBv4T2qdA80Ei7'. Preview of field's value: '18446744073709550616'",
      "caused_by": {
        "reason": "Numeric value (18446744073709550616) out of range of long (-9223372036854775808 - 9223372036854775807)n at [Source: (ByteArrayInputStream); line: 1, column: 199]",
        "type": "i_o_exception"
      }
    }
  },
  "stacktrace": "github.com/jaegertracing/jaeger/pkg/es/config.(*Configuration).NewClient.func2\\n\\tgithub.com/jaegertracing/jaeger/pkg/es/config/config.go:137\\ngithub.com/olivere/elastic.(*bulkWorker).commit\\n\\tgithub.com/olivere/elastic@v6.2.27+incompatible/bulk_processor.go:588\\ngithub.com/olivere/elastic.(*bulkWorker).work\\ntgithub.com/olivere/elastic@v6.2.27+incompatible/bulk_processor.go:501"
}

杰格版本:1.21.0 弹性搜索版本:7.17.5

【问题讨论】:

  • 您可以添加调用GET jaeger-span-2022-07-05 得到的结果吗?

标签: elasticsearch kubernetes elastic-stack elk jaeger


【解决方案1】:

特长;

根据错误消息,您似乎越界了

“原因”:“数值 (18446744073709550616) 超出长范围 (-9223372036854775808 - 9223372036854775807)n 在 [Source: (ByteArrayInputStream); line: 1, column: 199]”

解决方案

正如评论中提到的@Val,拥有你的映射会有所帮助。

首先要存储值18446744073709550616,您需要选择from this list

  • 浮动
  • unsigned_long

然后在创建索引时,设置字段的类型:

PUT 74388060/
{
  "mappings": {
    "properties": {
      "big_number": {
        "type": "float"
      }
    }
  }
}

接着

POST /74388060/_doc/
{
  "big_number": "18446744073709550616"
}

你应该走出困境。

【讨论】:

  • 对@paulo 但我如何更改数据类型?
猜你喜欢
  • 1970-01-01
  • 2020-12-17
  • 2019-06-11
  • 2017-05-09
  • 1970-01-01
  • 2013-07-07
  • 1970-01-01
  • 2021-01-01
  • 1970-01-01
相关资源
最近更新 更多