Upgrade elasticsearch to 8: Rebuild not possible (wrong version)

Infos:

  • Used Zammad version: 5.4.0-1680612797.66e35235.focal
  • Used Zammad installation type: package
  • Operating system: Ubuntu 20.04
  • Browser + version: MS Edge, Chrome

Expected behavior:

  • Upgrade from elasticsearch 7.17.2 to 8.13.4 should work without error

Actual behavior:

  • After upgrading elasticsearch from version 7.17.2 to 8.13.4 its not possible anymore to rebuild the index. After trying to rebuild the index zammad run rake zammad:searchindex:rebuild I got the following error message:
rake aborted!
Unable to process GET request to elasticsearch URL 'https://localhost:9200'. Check the response and payload for detailed information:

Response:
#<UserAgent::Result:0x00007f0eb2e46d18 @success=false, @body=nil, @data=nil, @code=0, @content_type=nil, @error="#<OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 peeraddr=127.0.0.1:9200 state=error: wrong version number>", @header=nil>

Payload:
null

Payload size: 0M
/opt/zammad/lib/search_index_backend.rb:36:in `info'
/opt/zammad/lib/tasks/zammad/search_index_es.rake:76:in `block (3 levels) in <main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/zammad/bin/bundle:121:in `load'
/opt/zammad/bin/bundle:121:in `<main>'
Tasks: TOP => zammad:searchindex:rebuild => zammad:searchindex:version_supported
(See full trace by running task with --trace)

I also tried to run the following command:

zammad run rake zammad:searchindex:version_supported

with the following result:

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

Response:
#<UserAgent::Result:0x00007fc0ead3dc10 @success=false, @body=nil, @data=nil, @code=0, @content_type=nil, @error="#<OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 peeraddr=127.0.0.1:9200 state=error: wrong version number>", @header=nil>

Payload:
null

Payload size: 0M
/opt/zammad/lib/search_index_backend.rb:36:in `info'
/opt/zammad/lib/tasks/zammad/search_index_es.rake:76:in `block (3 levels) in <main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/zammad/bin/bundle:121:in `load'
/opt/zammad/bin/bundle:121:in `<main>'
Tasks: TOP => zammad:searchindex:version_supported
(See full trace by running task with --trace)

Steps to reproduce the behavior:

1 Like

In my experience the upgrade path from 7 to 8 is a pain i the butt and is everything but working. At least the 3 times I have tried. Nuking and re-creating was the easier and faster way for me.

Upgraded elasticsearch 8 installations by default do everything but talk https. So you cannot connect https to a http port. That’s what the error message is about.

1 Like