[BUG] "Request failed to get to the server (status code: 200)" by specific message #6134
Description
Describe the bug
I was debuggin an error which appeared after a service wrote a log message to opensearch what resulted in Request failed to get to the server (status code: 200)
in the search (by query inside the DevTools) and JSON.parse: expected ',' or '}' after property value in object at line 1 column 9444 of the JSON data
on the discover-dashboard.
I have then tried to find out which part of the message makes the failure appear.
It seems, that a value of any field which is equal ,14130001000004100,
results in the failure I can not identify.
In the "Discover" it results in a failure if this document is in the range of the results (like in the screenshot). The application logs don't show anything what could explain this.
Related component
Indexing
To Reproduce
POST message in the Dev Tools
POST <index>/_doc
{"request": ",14130001000004100,"}
Response
{
"_index": "<index>",
"_id": "CHfYN44BjF2d8J26W8hQ",
"_version": 1,
"result": "created",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"_seq_no": 15680046,
"_primary_term": 1
}
Try to find the message in Dev-Tools
GET <index>/_search
{
"query": {
"match": {
"_id": "CHfYN44BjF2d8J26W8hQ"
}
}
}
Response
Request failed to get to the server (status code: 200)
And an error in UI should appear
Expected behavior
Remove any sign of the value. In the following message '0' before the last ',' is removed
POST message in the Dev Tools
POST <index>/_doc
{"request": ",1413000100000410,"}
Response
{
"_index": "<index>",
"_id": "dnfgN44BjF2d8J26ssi0",
"_version": 1,
"result": "created",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"_seq_no": 15680107,
"_primary_term": 1
}
Try to find the message in Dev-Tools
GET <index>/_search
{
"query": {
"match": {
"_id": "dnfgN44BjF2d8J26ssi0"
}
}
}
Response
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 1,
"relation": "eq"
},
"max_score": 1,
"hits": [
{
"_index": "<index>",
"_id": "dnfgN44BjF2d8J26ssi0",
"_score": 1,
"_source": {
"request": ",1413000100000410,"
}
}
]
}
}
Additional Details
Addition informations
Opensearch version: v.2.12.0
Browser: Firefox 123.0.1
- instance installed in the docker environment
- accessed through reverse proxy with self-signed SSL-Certificate
- message is collected by Filebeat and send to logstash
- original format is json so no transformations inside logstash pipeline except the addition of tags