GET request to elasticsearch

  • Used Zammad version: Zammad version 6.1.0-1699735608.4747590e.jammy
  • Used Zammad installation type: docker
  • Operating system: Ubuntu 22.04

Expected behavior: Reporting to work within the ticket system

Actual behavior:

Unable to process GET request to elasticsearch URL ‘http://localhost:9200/zammad_production_ticket/_search’. Check the response and payload for detailed information:

Response:
#<UserAgent::Result:0x00007f1d28ed5a48 @success=false, @body=“{"error":{"root_cause":[{"type":"security_exception","reason":"unable to authenticate user [] for REST request [/zammad_production_ticket/_search]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","ApiKey"]}}],"type":"security_exception","reason":"unable to authenticate user [] for REST request [/zammad_production_ticket/_search]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","ApiKey"]}},"status":401}”, @data=nil, @code=“401”, @content_type=nil, @error=“Client Error: #<Net::HTTPUnauthorized 401 Unauthorized readbody=true>!”, @header={“www-authenticate”=>“Basic realm="security" charset="UTF-8", ApiKey”, “content-type”=>“application/json”, “content-length”=>“479”}>

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

Hi @Alfredo. Your configuration of Elasticsearch within Zammad is not correct/not matching your Elasticsearch configuration. Please check it.