此logStash错误的原因是什么:异常=>#< &quot“ logstash” :: json :: parsererror:value_string中的意外输入

发布于 2025-02-14 01:55:26 字数 342 浏览 1 评论 0原文

我有以下日志行

{"code":200,"message":"ok","responseBody":{"token":"asdadqwrqwkjrqwejr"},"time":"4545425244"}

,并使用Logstash JSON插件来解析此日志,但是LogStash显示了Logstash-plain.log中的以下错误:

exception=>#< "LogStash" ::Json::ParserError: Unexpected end-of-input in VALUE_STRING

有什么问题? thanx

I have the following log line

{"code":200,"message":"ok","responseBody":{"token":"asdadqwrqwkjrqwejr"},"time":"4545425244"}

and using logstash json plugin to parse this log but logstash show following error in logstash-plain.log :

exception=>#< "LogStash" ::Json::ParserError: Unexpected end-of-input in VALUE_STRING

what is the problem ?
thanx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜雨飘雪 2025-02-21 01:55:26

Unexpected end-of-input in VALUE_STRING

当解析器到达文本的末尾时,在试图读取值的同时将 抛出。例如,以下将产生该错误,因为它缺少闭合双引号。

input { generator { count => 1 lines => [ '{"message":"ok}' ] } }
filter {  json { source => "message" remove_field => [ "message" ] } }
output { stdout { codec => rubydebug { metadata => false } } }

如果它在读取字段名称时用完了文本,则异常将是字段名称中的意外输入(这将发生在{“ Message>”) 。

The exception

Unexpected end-of-input in VALUE_STRING

is thrown when the the parser reaches the end of the text to be parsed whilst trying to read a value. For example, the following will produce that error because it is missing a closing double quote.

input { generator { count => 1 lines => [ '{"message":"ok}' ] } }
filter {  json { source => "message" remove_field => [ "message" ] } }
output { stdout { codec => rubydebug { metadata => false } } }

If it runs out of text whilst reading the name of a field the exception will be Unexpected end-of-input in field name (that would happen for {"message}).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文