Hi,
I deployed a elasticsearch on Azure using Elasticsearch (Self-Managed)
I am using NEST nuget package to communicate to elasticsearch api in a .net application.
This my application works fine with elastic search hosted on aws. In case of Azure deployment I am getting below exception from elastic search when trying to refresh index.
The nuget package is creating below request
response = await client.Indices.RefreshAsync(indexName).ConfigureAwait(false);
The above call creates below request. I captured it using WireShark
POST /azureelasticindex_uact7de0dd994d174895bbdd8cff0a3a0123/_refresh HTTP/1.1
Accept: application/json
Content-Type: application/json
User-Agent: elasticsearch-net/7.4.1 (Microsoft Windows 10.0.19043; .NET Framework 4.8.4341.0; Nest)
Authorization: Basic ********
Host: lb-***********.cloudapp.azure.com:9200
Content-Length: 2
{}
In response of above request I am getting
HTTP/1.1 400 Bad Request
content-type: application/json; charset=UTF-8
content-length: 357
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [POST /myindexname/_refresh] does not support having a body"}],"type":"illegal_argument_exception","reason":"request [POST /myindexname/_refresh] does not support having a body"},"status":400}
also if create same request using kibana-console I am getting same error on Azure but on AWS everything works fine
Azure
AWS
What is the problem here?