Realtime index is not loaded after restart

Hello,

I am running ManticoreSearch inside a container. I have created a real-time index CRWINDEX and inserted data into it. The location of data in the container “/var/lib/manticore/” is mapped with an external folder in the host named “/var/www/vhost/xyz/data/”. After a restart of the container, that index was not reloaded in ManticoreSearch. I did run “RELOAD INDEXES” and still the index does not appear in the list of indexes. I am able to see a folder named “CRWINDEX” under the /var/lib/manticore (and also from the host equivalent), this folder has around 250 MB of data and all the index related files with extensions: .spa, .spb, spd, .spe, spds, sph, sphi, spi, spp, spt, .lock, .meta, .ram and .settings

I have checked /var/log/manticore/searchd.log and this is the type of messages I have:

[Sun Oct  3 00:48:33.449 2021] [1] starting daemon version '3.6.0 96d61d8bf@210504 release' ...
[Sun Oct  3 00:48:33.464 2021] [1] listening on all interfaces for mysql, port=9306
[Sun Oct  3 00:48:33.464 2021] [1] listening on UNIX socket /var/run/mysqld/mysqld.sock
[Sun Oct  3 00:48:33.464 2021] [1] listening on 172.17.0.3:9312 for sphinx and http(s)
[Sun Oct  3 00:48:33.464 2021] [1] listening on all interfaces for sphinx and http(s), port=9308
[Sun Oct  3 00:48:33.512 2021] [1] accepting connections
[Sun Oct  3 00:48:33.512 2021] [28] prereading 2 indexes
[Sun Oct  3 00:48:33.512 2021] [28] prereaded 2 indexes in 0.000 sec
[Sun Oct  3 00:55:26.401 2021] [1] caught SIGHUP (seamless=1, in_rotate=0, need_rotate=0)
[Sun Oct  3 01:00:13.524 2021] [1] caught SIGHUP (seamless=1, in_rotate=0, need_rotate=1)
[Sun Oct  3 01:11:33.001 2021] [1] caught SIGHUP (seamless=1, in_rotate=0, need_rotate=1)

When I created other new realtime indexes they were able to reload even after stoping and restarting the container.

Do you have any idea what can be the cause of that index to not reload?

Thank you!

Hello

Is this:

the same time when you got this issue:

After a restart of the container, that index was not reloaded in ManticoreSearch

?

Can you reproduce the issue with the same index CRWINDEX from scratch?

Thank you for your reply Sergey, before restarting I created 2 indexes (with different names) and they could load, I think this is what corresponds to the number of indexes in the log file.

I couldn’t recreate an index with the same name, I got a message that a folder already exists. And I renamed that folder to CRWINDEX_backup and was able to recreate my index successfully. After restarting the container the new index was loaded.

Also, before doing that I tried to create a new index with the name then copy-paste the previous index files into that folder and run the “RELOAD INDEXES” command, but it didn’t work. Could it be that the previous index files were somehow corrupted which prevented them to reload? Is there a way to know that?

Could it be that the previous index files were somehow corrupted

Do you have:

  1. entire searchd log starting from the moment you created the “bad” index
  2. the “bad” index files themselves?

And can you reproduce the issue from scratch if you just nuke everything and create that index again and do what else you did before the issue popped up?

Yes I do have searchd.log and the index files (280 MB) in total. I have recreated the index from scratch and reloaded it with data and it can load without problem when the container restarts. Do you suggest anything to do with the mentioned files I still have?

Yes

  1. add the file manually to manticore.json
  2. check it with indextool --config ... --check CRWINDEX
1 Like

This is what I obtained:

Manticore 3.6.0 96d61d8bf@210504 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2021, Manticore Software LTD (https://manticoresearch.com)

using config file '/etc/manticoresearch/manticore.conf'...
checking index 'CRWINDEX'...
checking schema...
checking disk chunk, extension 0, 0(3)...
checking schema...
checking dictionary...
checking data...
checking rows...
checking attribute blocks index...
checking kill-list...
checking docstore...
checking dead row map...
checking doc-id lookup...
check passed, 2.1 sec elapsed
checking disk chunk, extension 1, 1(3)...
checking schema...
checking dictionary...
checking data...
checking rows...
checking attribute blocks index...
checking kill-list...
checking docstore...
checking dead row map...
checking doc-id lookup...
check passed, 2.5 sec elapsed
checking disk chunk, extension 2, 2(3)...
checking schema...
checking dictionary...
checking data...
checking rows...
checking attribute blocks index...
checking kill-list...
checking docstore...
checking dead row map...
checking doc-id lookup...
check passed, 3.0 sec elapsed
check passed, 7.7 sec elapsed

So all is good. If you restart your container now that the index is in manticore.json does it pick it up and process correctly?

Unfortunately it does NOT pick it up. I have also tried to run “RELOAD INDEXES”.

could you provide full daemon log when indexes failed to load? or reproducible example

could you also start daemon with —logdebug cli option to collect more events related to index files

When you copy files into new place RELOAD will not work. You have to stop Searchd and start it again as you are not reloading the existing (known) index but are trying to read indexes from disk.