Unable to process GET request to elasticsearch - 5.2.x

Infos:

  • Used Zammad version: 5.2.x
  • Used Zammad installation type: (package)
  • Operating system: Ubuntu 20.04 LTS

I receive the following Error when try to switch between custom reports. Have installed Elasicsearch and elasticsearch-plugin install ingest-attachment

Also bind the Zammad and Elasticsearch. Tried to rebuild it again. update the elasticsearch-plugn, restart, also disable the security elasticsearch authentication trust but the error is still there.
When I curl 'http://localhost:9200/gtr-m-zammad_zammad_production_ticket/_search the server give a response.
Also the localhost:9200 works when try to open telnet session.

Unable to process GET request to elasticsearch URL 'http://localhost:9200/gtr-m-zammad_zammad_production_ticket/_search'. Check the response and payload for detailed information:

Response:
#<UserAgent::Result:0x00007f7d44326bd0 @success=false, @body="{\"error\":{\"root_cause\":[{\"type\":\"x_content_parse_exception\",\"reason\":\"[1:51] [bool] failed to parse field [must]\"}],\"type\":\"x_content_parse_exception\",\"reason\":\"[1:51] [bool] failed to parse field [must]\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"field name is null or empty\"}},\"status\":400}", @data=nil, @code="400", @content_type=nil, @error="Client Error: #<Net::HTTPBadRequest 400 Bad Request readbody=true>!", @header={"x-elastic-product"=>"Elasticsearch", "warning"=>"299 Elasticsearch-7.17.6-f65e9d338dc1d07b642e14a27f338990148ee5b6 \"Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-minimal-setup.html to enable security.\"", "content-type"=>"application/json; charset=UTF-8", "content-length"=>"182"}>

Payload:
{"query":{"bool":{"must":[{"term":{"state_id":null}},{"range":{"created_at":{"from":"2021-12-31T22:00:00Z","to":"2022-12-31T21:59:59Z"}}}],"must_not":[{"term":{"state.name.keyword":"merged"}}]}},"size":0,"aggs":{"time_buckets":{"date_histogram":{"field":"created_at","calendar_interval":"month","time_zone":"Europe/Sofia"}}},"sort":[{"updated_at":{"order":"desc"}},"_score"]}

Payload size: 0M

Steps to reproduce the behavior:

  • When create custom report the following Status Code: 500 appear