Please help! I am currently using Manticore 3.4.2 in ubuntu/bionic64
I have distributed, template and plain indexes. All of them passed indextool --check. indextool --checkconfig also passed. indexer --rotate --all --sighup-each also successful.
But upon entering mysql -h0 -P9306 to select from the indexes, I got an error saying ERROR 1064 (42000): unknown local index(es) *index_name* in search request
I can only assume that you started the searchd with no indexes, then updated the config file and built the index (indexer w/o --rotate). In this case to make the index appear in the searchd you can:
I got this issue when I use Docker, but don’t mount a /var/lib/manticore dir to the host. Then the search daemon after starting tries to read the index defined in the configuration file, but it does not yet exist. I got this record in the log: [Thu Feb 11 13:32:22.511 2021] [19] WARNING: index 'messages_index': prealloc: failed to open /var/lib/manticore/messages_index.sph: No such file or directory - NOT SERVING.
If I mount the /var/lib/manticore dir to the host, the search daemon will read the index after the SECOND launch and search queries will work.
This is my config file. Variables are replaced in the Dockerfile.
When I run the docker exec -it manticore gosu manticore indexer --all --rotate command, I get the message WARNING: nothing to rotate after SIGHUP in the log, but all files as like as .spa, .spb, .spd, etc. are created. Search requests don’t work: ERROR 1064 (42000): unknown local index(es) 'messages_index' in search request
But after the second launch of the Docker container, search requests begin to work.
when you run Manticore with a config which refers to a plain index which doesn’t exist yet it just skips it (and says “No such file or directory - NOT SERVING”)
then when you build your index by indexer it makes the index files and (since you use --rotate) sends a signal to Manticore to rotate the index, but since Manticore doesn’t know about it yet it does nothing
then when you restart Manticore it already sees the index files and loads the index normally
Alternatively instead of restarting it (“second launch of the Docker container”)) you can call RELOAD INDEXES SQL command to force Manticore re-read the config, check if either of the indexes already have files and start using them.