ggree1
March 26, 2024, 8:49am
1
Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
openserach and dashbaord 2.5
When I click a template in Index management - Templates,
just bad request pop-up displays and no futher view comes.
dashboard logs below…
Index Management - CommonService - apiCaller StatusCodeError: Bad Request
at respond (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/transport.js:349:15)
at checkRespForFailure (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/transport.js:306:7)
at HttpConnector.<anonymous> (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
at IncomingMessage.wrapper (/usr/share/opensearch-dashboards/node_modules/lodash/lodash.js:4991:19)
at IncomingMessage.emit (events.js:412:35)
at IncomingMessage.emit (domain.js:475:12)
at endReadableNT (internal/streams/readable.js:1333:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
status: 400,
displayName: 'BadRequest',
path: '_index_template/test-template',
query: undefined,
body: '<html>\r\n' +
'<head><title>400 Bad Request</title></head>\r\n' +
'<body>\r\n' +
'<center><h1>400 Bad Request</h1></center>\r\n' +
'<hr><center>nginx</center>\r\n' +
'</body>\r\n' +
'</html>\r\n',
statusCode: 400,
response: '<html>\r\n' +
'<head><title>400 Bad Request</title></head>\r\n' +
'<body>\r\n' +
'<center><h1>400 Bad Request</h1></center>\r\n' +
'<hr><center>nginx</center>\r\n' +
'</body>\r\n' +
'</html>\r\n',
toString: [Function (anonymous)],
toJSON: [Function (anonymous)]
}
Configuration :
Relevant Logs or Screenshots :
Seems the OpenSearch cluster is proxied by nginx, could you check the nginx logs to see more about the 400 error?
ggree1
March 27, 2024, 4:08am
3
Thanks for the reply.
As you said, opensearch cluster is behind ingress nginx on k8s.
I checked the nginx ingress controller log, but only below I can see, nothing special…
127.0.0.1 - - [27/Mar/2024:04:02:18 +0000] “GET _index_template/logs-template?flat_settings=true HTTP/1.1” 400 150 “-” “-” 0 0.000 - - - - 024eeb7e62878c6e71636a34bf00ba9e
Now could you call the get index template API against your OpenSearch cluster directly to see what happens?
ggree1
March 27, 2024, 9:04am
5
It is working via rest api call in dev tools.
pablo
March 27, 2024, 5:21pm
6
@ggree1 Could you share the definition of your test template?
Does it happen for any template? Do you have more than one template in the list?
ggree1
March 28, 2024, 4:04am
7
I have 5 templates in the list.
All template are not accessiable with Bad Request popup.
GET _index_template/ingress-nginx-log-template?flat_settings=true
"index_templates": [
{
"name": "ingress-nginx-log-template",
"index_template": {
"index_patterns": [
"ingress-nginx-log*"
],
"template": {
"settings": {
"index": {
"refresh_interval": "5s",
"analysis": {
"normalizer": {
"case_normalizer": {
"filter": [
"lowercase",
"asciifolding"
],
"type": "custom"
}
},
"analyzer": {
"case_analyzer": {
"filter": [
"lowercase",
"asciifolding"
],
"type": "custom",
"tokenizer": "keyword"
}
}
},
"number_of_shards": "2",
"number_of_replicas": "2"
}
},
"mappings": {
"properties": {
"referer": {
"type": "text"
},
"agent": {
"type": "text"
},
"status_code": {
"type": "text",
"fields": {
"keyword": {
"ignore_above": 30,
"type": "keyword"
}
}
},
..... something like this.
pablo
March 29, 2024, 12:06am
8
@ggree1 Could you share your opensearch_dashboards.yml file?
How many nodes do you have in the cluster? Do you use specific node roles?
I’ve tested 2.5.0 and it works with no issues out of the box. Did you have any down time recently? Any issues with the cluster?