Elasticsearch 6.1.3 - indexing error, user not found

Infos:

Expected behavior:

  • Search for users and companies possible!

Actual behavior:

  • After installing Elasticsearch in the latest version, I wanted to create the index. Here I get an error.

    salter@TICKET:~$ sudo zammad run rake searchindex:rebuild
    [sudo] Passwort für salter:
    drop indexes…done
    delete pipeline (pipeline)… done
    create indexes…done
    create pipeline (pipeline)… done
    reload data…
    reload Ticket
    - started at 2018-01-31 18:57:16 UTC
    - took 0 seconds
    reload Organization
    - started at 2018-01-31 18:57:16 UTC
    - took 0 seconds
    reload User
    - started at 2018-01-31 18:57:16 UTC
    rake aborted!
    Unable to send User.find(122).search_index_update_backend backend: #<RuntimeError: Unable to process POST at http://localhost:9200/zammad_production/User/122?pipeline=zammad670370484791 (size: 0M)
    #<UserAgent::Result:0x0000560ea16221f8 @success=false, @body=nil, @data=nil, @code=“400”, @content_type=nil, @error=“Client Error: #<Net::HTTPBadRequest 400 Bad Request readbody=true>!”>>
    /opt/zammad/app/models/concerns/has_search_index_backend.rb:138:in rescue in block in search_index_reload' /opt/zammad/app/models/concerns/has_search_index_backend.rb:133:inblock in search_index_reload’
    /opt/zammad/app/models/concerns/has_search_index_backend.rb:130:in each' /opt/zammad/app/models/concerns/has_search_index_backend.rb:130:insearch_index_reload’
    /opt/zammad/lib/tasks/search_index_es.rake:156:in block (3 levels) in <top (required)>' /opt/zammad/lib/tasks/search_index_es.rake:152:ineach’
    /opt/zammad/lib/tasks/search_index_es.rake:152:in block (2 levels) in <top (required)>' /opt/zammad/lib/tasks/search_index_es.rake:167:inblock (2 levels) in <top (required)>’
    /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/exe/rake:27:in <top (required)>' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:74:inload’
    /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:74:in kernel_load' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:27:inrun’
    /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli.rb:360:in exec' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:inrun’
    /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in invoke_command' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor.rb:369:indispatch’
    /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli.rb:20:in dispatch' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/base.rb:444:instart’
    /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli.rb:10:in start' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/exe/bundle:35:inblock in <top (required)>’
    /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/friendly_errors.rb:121:in with_friendly_errors' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/exe/bundle:27:in<top (required)>’
    /opt/zammad/bin/bundle:3:in load' /opt/zammad/bin/bundle:3:in

In Zammad I can easily search for tickets. But I don’t get a result with users. The user from the error message with the ID 122, exists!

esarch

The only assumption I have, I have deleted some users using the REST API command Delete. These are also no longer visible! A query using GET does not produce a result either. Could it be because of this thing?

Steps to reproduce the behavior:

  • I have already described.

I am happy about support, hints and tips!
Many thanks, and many greetings from Germany to the world!

The solution is: Use Elasticsearch 5.6.X as 6.x is currentely not supported. :slight_smile:

You can uninstall elasticsearch with breaking dependencies (to not uninstall zammad) and then simply install the correct version. The steps needed to integrate elasticsearch have to be repeated afterwards

Thank you for your tip, with the command:“sudo dpkg -r --force-depends elasticsearch” I have uninstalled elasticsearch 6.3.1- and Install 5.5.3 und the plugin (sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment) - now I have the following errors:

salter@TICKET:~$ sudo zammad run rake searchindex:rebuild
drop indexes…done
create indexes…rake aborted!
Unable to process PUT at http://localhost:9200/zammad_production
#<UserAgent::Result:0x00005555cdbb19f8 @success=false, @body=nil, @data=nil, @code=“400”, @content_type=nil, @error=“Client Error: #<Net::HTTPBadRequest 400 Bad Request readbody=true>!”>
/opt/zammad/lib/search_index_backend.rb:159:in index' /opt/zammad/lib/tasks/search_index_es.rake:29:inblock (2 levels) in <top (required)>’
/opt/zammad/lib/tasks/search_index_es.rake:166:in block (2 levels) in <top (required)>' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.0/exe/rake:27:in<top (required)>’
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:74:in load' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:74:inkernel_load’
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli/exec.rb:27:in run' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli.rb:360:inexec’
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:ininvoke_command’
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor.rb:369:in dispatch' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli.rb:20:indispatch’
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/vendor/thor/lib/thor/base.rb:444:in start' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/cli.rb:10:instart’
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/exe/bundle:35:in block in <top (required)>' /opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/lib/bundler/friendly_errors.rb:121:inwith_friendly_errors’
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.1/exe/bundle:27:in <top (required)>' /opt/zammad/bin/bundle:3:inload’
/opt/zammad/bin/bundle:3:in `’
Tasks: TOP => searchindex:rebuild
(See full trace by running task with --trace)

aaa

What else can it be?

Hey,

since you are using 5.5.3 of elasticsearch, you’ll need a different plugin:

/usr/share/elasticsearch/bin/elasticsearch-plugin install mapper-attachments
Please make sure you’re following the steps for 5.0-5.5: https://docs.zammad.org/en/latest/install-elasticsearch.html

You’ll need to rerun zammad run rake searchindex:rebuild
Maybe twice - it should work without errors afterwards.

2 Likes

perfect Thanks for supporting

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