Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReindexException: Unable to find index micromasters-ci_public_enrollment_default #5077

Open
sentry-io bot opened this issue Oct 5, 2021 · 5 comments

Comments

@sentry-io
Copy link

sentry-io bot commented Oct 5, 2021

This has been going on for some time on CI.

Sentry Issue: MICROMASTERS-4V0

ReindexException: Unable to find index micromasters-ci_public_enrollment_default
  File "search/tasks.py", line 104, in index_users
    enrollments = [
  File "search/tasks.py", line 105, in <listcomp>
    enrollment for enrollment in enrollments if _document_needs_updating(enrollment)
  File "search/api.py", line 345, in document_needs_updating
    conn = get_conn()
  File "search/connection.py", line 76, in get_conn
    raise ReindexException("Unable to find index {index_name}".format(
@arslanashraf7 arslanashraf7 self-assigned this Oct 15, 2021
@pdpinch
Copy link
Member

pdpinch commented Oct 18, 2021

Do you think this can be closed?

@arslanashraf7
Copy link
Contributor

Do you think this can be closed?

Looked into the code as well and it was unlikely that some code change could have removed the indices that existed before so the indices might have been removed during some clean rebuild.
This was fixed by running the recreate_index command on the CI instance of Micromasters. While running the recreate_index we saw some 502s but increasing the elastic search server timeout resolved the 502s. Running the recreate_index command added the missing indices.

Yes, this can be closed, We can reopen if we see it again.

@pdpinch
Copy link
Member

pdpinch commented Nov 6, 2021

This happened again. Do we need to run recreate_index again?

@pdpinch pdpinch reopened this Nov 6, 2021
@arslanashraf7
Copy link
Contributor

This happened again. Do we need to run recreate_index again?

Yes, Ideally running the recreate_index should fix it and create the nonexistent indices.

@arslanashraf7
Copy link
Contributor

Update, I've run the reindex again and it seems to have created the nonexistent indices, but I believe in light of this & this comments we'll have to add the recreate_index in the post deploy script in app.json & look into the Heroku build timeout OR see which app build(s) is deleting the indices because we are using the Same ES Instance for our RC/CI apps.

@arslanashraf7 arslanashraf7 removed their assignment Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants