Infos:
- Used Zammad version: 6.3.1-1722598830.dafad938.noble
- Used Zammad installation type: package
- Operating system: Ubuntu Server 24.04
- Browser + version: Chrome 127.0.6533.89
Expected behavior:
zammad run rake zammad:searchindex:rebuild
runs without error after migrating from Zammad SaaS.
Actual behavior:
After successfully restored Zammad from zammad.com (SaaS) with the provided db.psql.gz and files.tar.gz on my new server and following the documentation, I get the following error after running zammad run rake zammad:searchindex:rebuild:
Dropping indexes… done.
Deleting pipeline… done.
Creating indexes… rake aborted!
Unable to process put request to elasticsearch URL ‘http://localhost:9200/_production_chat_session’. Check the response and payload for detailed information:
Response:
#<UserAgent::Result:0x00007335ab99cf88 @success=false, @body=“{"error":{"root_cause":[{"type":"invalid_index_name_exception","reason":"Invalid index name [production_chat_session], must not start with '‘, ‘-’, or ‘+’","index_uuid":"na","index":"_production_chat_session"}],"type":"invalid_index_name_exception","reason":"Invalid index name [production_chat_session], must not start with '’, ‘-’, or ‘+’","index_uuid":"na","index":"_production_chat_session"},"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.23-61d76462eecaf09ada684d1b5d319b5ff6865a83 "Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See Set up minimal security for Elasticsearch | Elasticsearch Guide [7.17] | Elastic to enable security."”, “content-type”=>“application/json; charset=UTF-8”, “content-length”=>“417”}>
Payload:
{“mappings”:{“properties”:{“id”:{“type”:“integer”},“chat_id”:{“type”:“integer”},“name”:{“type”:“text”,“fields”:{“keyword”:{“type”:“keyword”,“ignore_above”:5012}}},“state”:{“type”:“text”,“fields”:{“keyword”:{“type”:“keyword”,“ignore_above”:5012}}},“user_id”:{“type”:“integer”},“updated_by_id”:{“type”:“integer”},“created_by_id”:{“type”:“integer”},“created_at”:{“type”:“date”},“updated_at”:{“type”:“date”}}},“settings”:{“index.mapping.total_fields.limit”:2000}}
Payload size: 0M
/opt/zammad/lib/search_index_backend.rb:773:in `make_request_and_validate’
/opt/zammad/lib/search_index_backend.rb:135:in `index’
/opt/zammad/lib/search_index_backend.rb:916:in `block in create_index’
/opt/zammad/lib/search_index_backend.rb:915:in `each’
/opt/zammad/lib/search_index_backend.rb:915:in `create_index’
/opt/zammad/lib/tasks/zammad/search_index_es.rake:17:in `block (3 levels) in ’
/opt/zammad/lib/tasks/zammad/search_index_es.rake:59:in `block (3 levels) in ’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/exe/rake:27:in `<top (required)>’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/lib/bundler/cli/exec.rb:58:in `load’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/lib/bundler/cli/exec.rb:58:in `kernel_load’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/lib/bundler/cli/exec.rb:23:in `run’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/lib/bundler/cli.rb:492:in `exec’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/lib/bundler/cli.rb:34:in `dispatch’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/lib/bundler/cli.rb:28:in `start’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/exe/bundle:37:in `block in <top (required)>’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors’
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/bundler-2.4.22/exe/bundle:29:in `<top (required)>’
/opt/zammad/bin/bundle:121:in `load’
/opt/zammad/bin/bundle:121:in `’
Tasks: TOP => zammad:searchindex:rebuild
(See full trace by running task with --trace)
Steps to reproduce the behavior:
Restoring SaaS Backup on a freshly installed Zammad Ubuntu server by documentation, before configuring the new installed zammad instance over webinterface. After zammad run rails r “Rails.cache.clear” it fails at zammad run rake zammad:searchindex:rebuild.