Forum error message in Ginkgo

Hi everyone,

I’ve been getting error messages in forums on Open EDX Gingko 1.0.
It seems others also had this issue :!topic/edx-code/ExNjCyV0xGo
But I can’t find how to run the rake search:initialize command which should solve my problem.
I tried installing Ruby, bundler, etc. but it still fails…
Any idea or documentation on how to execute this command ?
I thank you in advance for your help !

Hi @Vassantha,

please try this shell sequence:

sudo -sHu forum bash
cd ~/cs_comments_service/
source ~/forum
rake -AT # list available rake commands
rake search:initialize

Hi Andrey,

Thank you for your answer.
The source ~/forum command replies with bash: /edx/app/forum/forum: No such file or directory

Edit : in fact, it was source ~/forum_env

The command did not initialize:
Skipping initialization. The ‘content’ alias already exists. If ‘rake search:validate_index’ indicates a problem with the mappings, you could either use ‘rake search:rebuild_index’ to reload from the db or ‘rake search:initialize[true]’ to force initialization with an empty index.

I tried the recommended commands, but I get the following error:
rake aborted!
Elasticsearch::Transport::Transport::Errors::NotFound: [404] {“error”:“IndexMissingException[[content_20190528020054415,content_20171130103944060] missing]”,“status”:404}

you can try to force new index creation

rake search:initialize[true]
rake search:catchup[9999]

and then verify that elasticsearch index contains non zero number of documents

curl -XGET http://localhost:9200/_cat/indices'?v'

in latest index named using this pattern content_YYYMMDDHHMMSSmmm

rake search:initialize[true] created the new index (despite the IndexMissingException error).
But it remains empty.
rake search:catchup[9999] aborts with the following error:
rake aborted!
Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {“error”:“ElasticsearchIllegalArgumentException[Alias [content] has more than one indices associated with it [[content_20190528020054415, content_20171130103944060]], can’t execute a single index op]”,“status”:400}

Ok, so I deleted the content alias on each “missing index” ( and then executed rake search:rebuild_index and now it works !
Thanks again for your precious help Andrey !