Migration from Zammad 6.5.2 to Zammad 7: Elasticsearch Index Rebuild not possible

  • Used Zammad version:
    Zammad 7 migrated from Zammad 6.5.2

  • Used Zammad installation type: (source, package, docker-compose, …)
    package

  • Operating system:
    Debian 13

  • Browser + version:
    Firefox, Chrome

Expected behavior:

Reindex with zammad run rake zammad:searchindex:rebuild

Actual behavior:

Error message:
rake aborted!
Unable to process GET request to elasticsearch URL ‘https://localhost:9200’. Check the response and payload for detailed information:

Steps to reproduce the behavior:

Existing Zammad 6.5.2 installation migrated to a new host with a newly installed Zammad 7.

Zammad 7 and Elasticsearch installed according to the documentation.
Backup and restore performed successfully according to the documentation.
Migrated installation starts successfully on the new host.
Login is possible, all functions are successfully usable. However, the search function does not work, and an attempt was made to rebuild the search index using zammad run rake zammad:searchindex:rebuild.

zammad run rake zammad:searchindex:rebuild aborts with the error:
Unable to process GET request to elasticsearch URL 'https://localhost:9200'. Check the response and payload for detailed information:

Elasticsearch is locally accessible.

A query for the indexes using:

curl --user : --insecure -XGET https://localhost:9200/_cat/indices
successfully displays the existing indexes.

However, the following is logged in Zammad production.log:

Response:

#<UserAgent::Result:0x00007f21b66cd160 @success=false, @body=“{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\", charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm=\"security\", charset=\"UTF-8\"","Bearer realm=\"security\"","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", Bearer realm="security", ApiKey”, “content-type” => “application/json”, “content-length” => “461”}>

Payload:

null

The connection between Zammad and Elasticsearch isn’t working.

I’m stuck. Can anyone help?

Thank you!

Hi @tweis. Everything’s included what you need to know. :thinking:

Hi @fliebe92.
Thank you so much for your quick reply.

I’m familiar with the instructions for connecting to Elasticsearch from the documentation and have followed them all completely. Despite this, I kept getting the “missing authentication credentials…” message.
I’ve now simply re-executed all the steps for connecting Elasticsearch to Zammad, and I can definitely perform the index rebuild now.
This is very strange, because I had already repeated all the steps before contacting the community for help.
However, I’ve also added the generated Elastic certificate again now. I hadn’t done that before; perhaps that was the solution :thinking:
I will now perform the entire migration again next weekend and migrate the current, production version 6.5.2 to the newly installed system.

Thanks again!

1 Like