1.Unexpected end-of-input
Unexpected end-of-input: expected close marker for Object
(start marker
at
[Source:org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@5dae9215; line: 1, column: 1])
at
[Source:org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@5dae9215; line: 11, column: 3007]
【解决】:请求头与请求体的内容都不能换行,两者之间必须换行,数组对象的[和{之间要换行。
【例如】:
PUT /blog/msg/1
{
"title": "Invest Money",
"body": "Please start investing money as soon...",
"tags": ["money", "invest"],
"published_on": "18 Oct 2017",
"comments": [
{
"name": "William",
"age": 34,
"rating": 8,
"comment": "Nice article..",
"commented_on": "30 Nov 2017"
},
{
"name": "John",
"age": 38,
"rating": 9,
"comment": "I started investing after reading this.",
"commented_on": "25 Nov 2017"
},
{
"name": "Smith",
"age": 33,
"rating": 7,
"comment": "Very good post",
"commented_on": "20 Nov 2017"
}
]
}
2.错误信息
{
"statusCode": 400,
"error": "Bad Request",
"message": "child \"method\" fails because [\"method\" must be one of [HEAD, GET, POST, PUT, DELETE]]. child \"path\" fails because [\"path\" is not allowed to be empty]",
"validation": {
"source": "query",
"keys": [
"method",
"path"
]
}
}
【解决】:大概是我要存的数据太长导致的,在kibana中,我存的超长的数组前半截是蓝色,后半截是黑色,在连接处回车,再PUT 就可以成功存储了。
【例如】:
PUT /indexname/typename/4
{
"value":[
[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],
[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12],[12,14,12,12]
]
}