Sphinx "unknown index" errors

We are trying to migrate a repo over from TravisCI. The specs all pass in Travis and locally. But on CircleCI we get three specs that fail with an error message:

   unknown index 'lesson_core' in update request

These all have to do with destroying a Lesson model. Any ideas of what we should be doing different in our configuration to get this properly ported over from TravisCI?

We are using Ruby 2.1.6 with the default Sphinx (2.0.4) and ThinkingShpinx 3.0.6, rails 3.2.21.

Is this project open source? If so can we get a link to it? Thanks!

No, it isn’t.

Ok no problem, can you share your teardown method?

Do you mean for our specs? The only thing we have there is to run DatabaseCleaner.clean.

That is run after each.

@levlaz any ideas on this?


Looks two instances of sphinx are running in a build (one is by CircleCI and other spawned by Rails). Can you add the following to your circle.yml to stop the one started by Circle?

    -  sudo service sphinxsearch stop
1 Like

@kimh That worked. Thanks!

Could you please explain why there are two instances running? I’m running into the same problem and your solution works, but I wanna understand why I have two instances.

In my case I was using thinking-sphinx 3.0.2 and It was working just fine. After I upgraded it to 3.1.0 I started getting those errors. I tested both versions and it doesn’t really seem that the problem is because there are two instances running. Based on my tests seem like CircleCI always starts a sphinx process with the default configuration (pointing to /etc/sphinxsearch/sphinx.conf).