Changelog 75 - "Index not multiplexed!"

On one of my monolith servers, I'm having trouble applying changelog 75. I've deployed Commcare HQ 5dae505f853a46f62962f7de212e4b02f4e0ab02 (11 Jan 2024) and want to ensure indices are reindexed before applying changelog 76.

Following changelog 75: 75. Reindex All Indices For Elasticsearch Upgrade — CommCareHQ Deployment documentation it's failing right out of the gate:

(monolith) cchq@monolith:~$ cd /home/cchq/www/monolith/current
(monolith) cchq@monolith:~/www/monolith/current$ source python_env/bin/activate
(python_env-3.9) (monolith) cchq@monolith:~/www/monolith/current$ INDEX_CNAME='apps'
(python_env-3.9) (monolith) cchq@monolith:~/www/monolith/current$ ./manage.py elastic_sync_multiplexed start ${INDEX_CNAME}
Traceback (most recent call last):
  File "/home/cchq/www/monolith/releases/2024-01-19_09.49/./manage.py", line 190, in <module>
    main()
  File "/home/cchq/www/monolith/releases/2024-01-19_09.49/./manage.py", line 48, in main
    execute_from_command_line(sys.argv)
  File "/home/cchq/www/monolith/releases/2024-01-19_09.49/python_env/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/cchq/www/monolith/releases/2024-01-19_09.49/python_env/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/cchq/www/monolith/releases/2024-01-19_09.49/python_env/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/cchq/www/monolith/releases/2024-01-19_09.49/python_env/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/home/cchq/www/monolith/releases/2024-01-19_09.49/corehq/apps/es/management/commands/elastic_sync_multiplexed.py", line 537, in handle
    cmd_func(
  File "/home/cchq/www/monolith/releases/2024-01-19_09.49/corehq/apps/es/management/commands/elastic_sync_multiplexed.py", line 50, in start_reindex
    raise IndexNotMultiplexedException("""Index not multiplexed!
corehq.apps.es.exceptions.IndexNotMultiplexedException: Index not multiplexed!
            Sync can only be run on multiplexed indices

This is a fairly new server (installed in November last year). I've tested on all incices and the results are the same.

Any ideas? Thanks!

Hey Ed!

When you say that it is a fairly new server, do you mean that you have set up the server from scratch?
If yes, did you install Elasticsearch 5 or Elasticsearch 2?

And can you share the output of the following command?

curl -X GET '<ES_HOST>:9200/_cat/indices?v'

Hi Amit, yes, it was installed with Elasticsearch 2.4.6

(cchq) ccc@monolith:~/environments/monolith$ curl -X GET '10.2.0.4:9200/_cat/indices?v'
health status index                  pri rep docs.count docs.deleted store.size pri.store.size
green  open   smslogs_2020-01-28       5   0          0            0       795b           795b
green  open   users-20230524           2   0       2775          785      1.5mb          1.5mb
green  open   groups-20230524          5   0          1            0      3.4kb          3.4kb
green  open   hqgroups_2017-05-29      5   0          0            0       796b           796b
green  open   cases-20230524           5   0       6160        10882      4.7mb          4.7mb
green  open   hqapps_2020-02-26        5   0       1572          783      2.8mb          2.8mb
green  open   hqusers_2017-09-07       2   0       2773          148      1.2mb          1.2mb
green  open   forms-20230524           5   0      31069         9917    176.3mb        176.3mb
green  open   sms-20230524             5   0          0            0       795b           795b
green  open   hqcases_2016-03-04       5   0       6107          451      3.2mb          3.2mb
green  open   apps-20230524            5   0       1572         3257      4.5mb          4.5mb
green  open   domains-20230524         5   0          1            0       28kb           28kb
green  open   xforms_2016-07-07        5   0      30785         7554    162.4mb        162.4mb
green  open   case_search_2018-05-29   5   0      37833          864      4.5mb          4.5mb
green  open   case-search-20230524     5   0      37833         5411      4.5mb          4.5mb
green  open   hqdomains_2021-03-08     5   0          1            0       28kb           28kb

Thanks for sharing the information, Ed.

Since you have started the system in November and around that time the indices were already multiplexed so all data was successfully populated in your secondary indices. It means you don't need to reindex process on this server. You can straightaway go with the ES 5 upgrade process and follow this changelog.

Let me know if you have any other queries.

1 Like

That makes sense - yes, it was after that changelog... I was just following the latest changelog which referred to it. Thanks for confirming Amit!
Ed