Elasticsearch indexing wrong name

Infos:

  • Used Zammad version: 4.1.x
  • Used Zammad installation type: source
  • Operating system: Debian 9
  • Browser + version: Firefox 89

Expected behavior:

rake searchindex:rebuild is indexing zammad_production_*

Actual behavior:

rake searchindex:rebuild is indexing zammad_development_*

Steps to reproduce the behavior:

I moved my Zammad from one server to another. (same systems, but with elasticsearch V 7.13.1. instead of 7.10.2). Everything works fine, but my elasticsearch is always indexing the wrong name. I installed V 7.13.1.

Im running rake searchindex:rebuild. Everything went fine due the indexing. But it uses the developement database name. For exampe: zammad_development_user

But it should be zammad_production_user.

I tried to set it with this command: rails r “Setting.set(‘es_index’, ‘zammad_production’)”

But it only changes the first part part to zammad_production_development_user.

Where can i set it correct? To use the production name.

I restarted elasticsearch, after changes. I removed and installed the ingest-attachment plugin for elasticsearch. Using postgresql DBs.

For someone else.

I had to export RAILS_ENV=production again.

And than the rebuild was correct.

Correct, you have to repeat specific installation steps like e.g. the ENV stuff.
I guess our documentation did not reflect that well enough did it?

https://docs.zammad.org/en/latest/appendix/backup-and-restore.html#what-to-do-after-restoration-has-been-completed

Yes, it would be better, if there are all the steps in the documentation ^^. Because like you said “you have to repeat”.

Alrighty.
I’ve noted that down here:

No ETA through I’m afraid

1 Like