Searchindex:rebuild fails on 3.1.0

I’m running Zammad 3.1.0-1574099652.3f54835b.buster and elasticsearch 7.5.0 on Debian 10.

At start, it looks good:

$ sudo zammad run rake searchindex:rebuild --trace
** Invoke searchindex:rebuild (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute searchindex:rebuild
** Execute searchindex:drop
drop indexes...done
** Execute searchindex:drop_pipeline
delete pipeline (pipeline)... done
** Execute searchindex:create
create indexes...done
** Execute searchindex:create_pipeline
create pipeline (pipeline)... done
** Execute searchindex:reload
reload data...
 reload KnowledgeBase::Answer::Translation
  - started at 2019-12-12 19:43:44 UTC
  - took 0 seconds
 reload KnowledgeBase::Category::Translation
  - started at 2019-12-12 19:41:23 UTC
  - took 0 seconds
 reload KnowledgeBase::Translation
  - started at 2019-12-12 19:41:23 UTC
  - took 0 seconds
 reload User
  - started at 2019-12-12 19:41:23 UTC

At that point it takes some minutes, until I get an error:

rake aborted!                                                                                                                         
Unable to send User.find(4321).search_index_update_backend backend: #<RuntimeError: Unable to process POST request to elasticsearch URL 'http://127.0.0.1:9200/zammad_production_user/_doc/4321?pipeline=zammad876543210789'. Check the response and payload for detailed information:

Response:
#<UserAgent::Result:0x0000555fca238eb0 @success=false, @body="{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"field [article] not present as part of path [article]\"}],\"type\":\"illegal_argument_exception\",\"reason\":\"field [article] not present as part of path [article]\"},\"status\":400}", @data=nil, @code="400", @content_type=nil, @error="Client Error: #<Net::HTTPBadRequest 400 Bad Request readbody=true>!">

Payload:
{"id"=>4321, "organization_id"=>nil, "login"=>"foo.bar@example.com", "firstname"=>"Foo", "lastname"=>"Bar", "email"=>"foo.bar@example.com", "web"=>"", "phone"=>"", "fax"=>"", "mobile"=>"", "department"=>"", "vip"=>false, "verified"=>false, "active"=>true, "note"=>"", "last_login"=>nil, "preferences"=>{"tickets_open"=>0, "tickets_closed"=>1}, "updated_by_id"=>8, "created_by_id"=>4321, "created_at"=>Mon, 09 Dec 2019 09:09:09 UTC +00:00, "updated_at"=>Tue, 10 Dec 2019 10:10:10 UTC +00:00, "out_of_office"=>false, "out_of_office_start_at"=>nil, "out_of_office_end_at"=>nil, "out_of_office_replacement_id"=>nil, "permissions"=>["user_preferences.password", "user_preferences.language", "user_preferences.linked_accounts", "user_preferences.avatar", "ticket.customer"], "role_ids"=>[3]}

Payload size: 0M

Any idea, how to solve this?

Elasticsearch 7.5 is not supported by Zammad 3.1.
7.5 introduced changes on some attributes which Zammad handles differently up to Zammad 3.2.

1 Like

Downgrading to 7.4.2 helped, indeed. Many thanks!

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