Not able to proced "searchindex:rebuild"

Infos:

  • Used Zammad version: 5.2.x
  • Used Zammad installation type: package
  • Operating system: Ubuntu 20.04
  • Browser + version: any

Expected behavior:

After Migration Tickets from OTRS run “zammad run rake zammad:searchindex:rebuild” - succes

Actual behavior:

**
“Execute zammad:searchindex:create
Creating indexes… rake aborted!
Unable to process put request to elasticsearch URL ‘http://localhost:9200/zammad_production_ticket’. Check the response and payload for detailed information:”
*
rake aborted shortly after start.

Elasticsearch is working (active running), Version 7.17.5
Ingest-attachment is installed, version 7.17.5
I’ve got a normal answer after “curl -X GET ‘http://localhost:9200’”

sudo zammad run rake zammad:searchindex:rebuild  --trace
** Invoke zammad:searchindex:rebuild (first_time)
** Invoke zammad:searchindex:version_supported (first_time)
** Invoke zammad:searchindex:configured (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute zammad:searchindex:configured
** Execute zammad:searchindex:version_supported
** Execute zammad:searchindex:rebuild
** Execute zammad:searchindex:drop
Dropping indexes... done.
** Execute zammad:searchindex:drop_pipeline
Deleting pipeline... done.
** Execute zammad:searchindex:create
Creating indexes... rake aborted!
Unable to process put request to elasticsearch URL 'http://localhost:9200/zammad_production_ticket'. Check the response and payload for detailed information:

Response:
#<UserAgent::Result:0x0000559e0295e160 @success=false, @body="{\"error\":{\"root_cause\":[{\"type\":\"resource_already_exists_exception\",\"reason\":\"index [zammad_production_ticket/6jd3Bz76TP2VOgqj4iIu7Q] already exists\",\"index_uuid\":\"6jd3Bz76TP2VOgqj4iIu7Q\",\"index\":\"zammad_production_ticket\"}],\"type\":\"resource_already_exists_exception\",\"reason\":\"index [zammad_production_ticket/6jd3Bz76TP2VOgqj4iIu7Q] already exists\",\"index_uuid\":\"6jd3Bz76TP2VOgqj4iIu7Q\",\"index\":\"zammad_production_ticket\"},\"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.5-8d61b4f7ddf931f219e3745f295ed2bbc50c8e84 \"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"=>"189"}>

Payload:
{"mappings":{"properties":{"id":{"type":"integer"},"group_id":{"type":"integer"},"priority_id":{"type":"integer"},"state_id":{"type":"integer"},"organization_id":{"type":"integer"},"number":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":5012}}},"title":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":5012}}},"owner_id":{"type":"integer"},"customer_id":{"type":"integer"},"note":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":5012}}},"first_response_at":{"type":"date"},"first_response_escalation_at":{"type":"date"},"first_response_in_min":{"type":"integer"},"first_response_diff_in_min":{"type":"integer"},"close_at":{"type":"date"},"close_escalation_at":{"type":"date"},"close_in_min":{"type":"integer"},"close_diff_in_min":{"type":"integer"},"update_escalation_at":{"type":"date"},"update_in_min":{"type":"integer"},"update_diff_in_min":{"type":"integer"},"last_contact_at":{"type":"date"},"last_contact_agent_at":{"type":"date"},"last_contact_customer_at":{"type":"date"},"last_owner_update_at":{"type":"date"},"create_article_type_id":{"type":"integer"},"create_article_sender_id":{"type":"integer"},"article_count":{"type":"integer"},"escalation_at":{"type":"date"},"pending_time":{"type":"date"},"type":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":5012}}},"time_unit":{"type":"float"},"updated_by_id":{"type":"integer"},"created_by_id":{"type":"integer"},"created_at":{"type":"date"},"updated_at":{"type":"date"},"article":{"type":"nested","include_in_parent":true}},"_source":{"excludes":["article.attachment"]}},"settings":{"index.mapping.total_fields.limit":2000}}

Payload size: 0M
/opt/zammad/lib/search_index_backend.rb:966:in `make_request_and_validate'
/opt/zammad/lib/search_index_backend.rb:133:in `index'
/opt/zammad/lib/search_index_backend.rb:1083:in `block in create_index'
/opt/zammad/lib/search_index_backend.rb:1082:in `each'
/opt/zammad/lib/search_index_backend.rb:1082:in `create_index'
/opt/zammad/lib/tasks/zammad/search_index_es.rake:29:in `block (3 levels) in <main>'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/opt/zammad/lib/tasks/zammad/search_index_es.rake:70:in `block (3 levels) in <main>'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/zammad/vendor/bundle/ruby/3.0.0/bin/rake:25:in `load'
/opt/zammad/vendor/bundle/ruby/3.0.0/bin/rake:25:in `<top (required)>'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:58:in `load'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:58:in `kernel_load'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:23:in `run'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/cli.rb:483:in `exec'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/cli.rb:31:in `dispatch'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/cli.rb:25:in `start'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/exe/bundle:48:in `block in <top (required)>'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/bundler-2.3.10/exe/bundle:36:in `<top (required)>'
/opt/zammad/bin/bundle:121:in `load'
/opt/zammad/bin/bundle:121:in `<main>'
Tasks: TOP => zammad:searchindex:rebuild

I have no idea where I should look /search for errors :frowning:

It worked fine with elasticsearch 7.17.4 but I am not able to downgrade from 7.17.5 - it throws error: Don’t able to downgrade …".

I need help, please.

Steps to reproduce the behavior:

Upgrade!

It is not working with elasticsearch 7.17.4. BUT!!!

I’ve downgraded zammad to 5.1.1-1655802449.f7f1068b.focal and what a surprise - it is working now. Release problem?

Hi There

Please use the following link to update Zammad:
https://docs.zammad.org/en/latest/install/update.html

Do not forget to update Elasticsearch and reinstall the elastic search plugin. If you still encounter any technical issue, you can arrange a consulting to help you with the update.

"reason\":\"index [zammad_production_ticket/6jd3Bz76TP2VOgqj4iIu7Q] already exists\"

This is your problem.
The index wasn’t dropped before for whatever reason and thus the rake process cannot create it.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.