Sphinx cannot start a resolution

Source: Internet
Author: User
Tags error code spl automake

Sphinx cannot start a resolution

Index or query prompt: Error:invalid token in config file line 1 Col 1.:

The hint indicates that the current profile encoding is not UTF-8 (no BOM header) format, can not be resolved correctly, use the editing software to open the configuration file, save as UTF-8 (no BOM header) format;

The wrong encoding format includes: Unicode, Unicode BOM, Unicode big endian, Unicode low front, UTF-8 + BOM, UTF-8 Signature, UTF-8 include signature, etc.

Special Note: Windows with Notepad (Notepad) or WordPad (WordPad) can not be saved correctly in the desired format, do not use it to edit the configuration file;

Ways to handle errors caused by using special characters in Sphinx

When using a Sphinx search engine, you sometimes encounter special characters that may be the source of the Sphinx fatal error:

such as "$", "^", in the Sphinx search keyword at the top or end of such a word characters (same as the same), can lead to Sphinx fatal error. For example, "$ notebook" or "notebook ^" as a keyword search, it will cause similar to ' Query failed:index product:syntax error, unexpected '.

Automatically add half-width spaces to the front and back of the search keyword to resolve this problem without affecting the search results.

Error:index ' product ': raw_hits:write error:122070 of 262017 bytes written

A: This type of problem is due to an index write disk error, for several reasons. Note To see if the disk space is full. In addition, it may be because there are more than one indexer process in progress, write index failed! Another workaround is to reduce the size of the max_iosize in the indexer configuration. Max_iosize is the Sphinx maximum allowable I/O operation size, in bytes, for I/O throttling. For example, it can be set to 524288 (512KB)

1, incremental index, note that the deletion of the problem 2, on large data, be sure to give the Sphinx data directory to leave a lot of space, because the temporary file will occupy a very large space

Q, this problem occurs when compiling the installation ... sphinx.cpp; Then Mv-f ". Deps/sphinx. Tpo "". Deps/sphinx. Po "; Else Rm-f ". Deps/sphinx. Tpo "; Exit 1; Fi in file included from sphinx.cpp:14:sphinx.h:54:19:error:mysql.h:no such file or directory ....

A: Missing libmysqlclient15.so, installing Mysql-devel. If already exists. Please use Ldconfig to load this dynamic link library (Linux)

Q:sphinx The following problems occurred while rotate. (searchd.log) warning:rotating index ' Sphinx ': Prealloc:mmap () Failed:cannot allocate (memory); Using old index, and SPHINX.SPL SPHINX.NEW.SPL occurs in the indexed data directory, causing the original index to not be retrieved correctly

Sphinx Indexer has 2 processes running simultaneously, and Sphinx Indexer cannot be used at the same time, resulting in the inability to allocate memory. and make indexer use the old index file

First look at the –rotate mechanism of Sphinx:

Indexer completes the index-> sends Sighup to SEARCHD (while the terminal output index has completed)->searchd to the interrupt signal-> waits for all child processes to exit-> Rename the current index to the old index.

-> Rename the. New index file as the current index-> attempt to load the current index file-> if the load fails, searchd rolls back the. old file to the current file and renames the newly created index to. New-> loaded: Complete Seamless convergence

When the rotate switch is performed, indexer sends an interrupt signal to the SEARCHD (and the output is already indexed) after the index is completed.

Then Searchd will do the following things:

1 wait for all child processes to exit

2 renames the current index as. Old

3 renaming the. New index file as the current index

4 attempt to load the current index file

5 If the load fails, SEARCHD will roll back the. old file to the current file and rename the newly created index to. New

In view of the above, it is possible to open 2 processes that detect directory access. The user uses 2 indexer at the same time and Searchd runs under it and so on

Sphinx's Searchd creates an. SPL lock file at startup and deletes it when it is closed. If an. spl file is found when indexer is created, the new index is not created unless you use the –rotate

So, the problem may be that the lock file is lost somehow, or the –rotate switch is not used when rebuilding the index.

Original:

http://www.sphinxsearch.com/forum/view.html?id=274

It seems that

A) The lock files were lost somehow, and

b) you ran indexer without–rotate switch.

Normally, Searchd would create. SPL lock files on startup (and kill them on shutdown),

and indexer would then refuse to reindex without–rotate switch.

Indexers sends Sighup to SEARCHD when completed (and it should print this). Searchd

Then does the following:

1) waits for all children to exit

2) Renames current index files to. old

3 renames. New index files to current

4) tries to load current index files

5) If something failed, it rollbacks current files from. Old and new to. New

In your case I would start with double checking directory access rights, users which both

Indexer and Searchd run under, etc.

Specific actions:

Killall Searchd and then reboot. Automatic loading will be named sphinx.new.sp* as sphinx.sp* after reboot

In addition, when such problems occur, it is best to pay attention to the use of –rotate, in the application of the license, it may be directly used to close the Searchd index, and then open searchd

Q: Questions about Updateattribute update index

Sphinx Use APIs do not immediately really update the index, but the updated API can show that the index is already updated. However, search cannot be found using CLI-side searches. The disk file will not be written until the SEARCHD is restarted. Remember!

Q, Sphinx installation make, encountered Libiconv problems.

Check for a long time, change makefile,configure are not reliable. Finally in the official station to find:

./configure–without-iconv, just fine. NND, why do you want this iconv?

Look in the error code, it is used when xmlunknowencode. We all use Utf-8, most of the time may not need this function! If necessary, you can add this Lib

Q, after retrieving the result id sort problem

SELECT * FROM documents WHERE ID to (3,5,7) Order by FIELD (id,3,5,7);

Or

SELECT * FROM documents WHERE ID to (3,5,7) Order by Substring_index ((id,3,5,7), id,1)

Q, warning:sort_hits:merge_block_size=248 kb too low, increasing mem_limit may improve performance

A, increase the value of Mem_limit

Q:sphinx sorting problem

$sphinx->setsortmode (sph_sort_extended, ' status desc,is_deleted DESC '); Sort setgroupby in groups, sorted among groups and sorted within groups, such as: (317,1,hello), (317,0,world). If you sort within a group, you need to use Setsortmode (), sort it naturally, and then sort by group, so that sorting between groups and sorting within groups is a natural state!

Q, warning:maxed out, dismissing client

This is the Sphinx client could not find the Searchd daemon. It is possible that the lock file for the index (***.SPL) is lost, and this file is usually used to identify whether the searchd is open.

Typically, the client also returns "Zero-sized searchd response". Workaround: Restart Searchd to the author's words: It seems that a) the lock files were lost somehow, and b) you ran indexer without--rotate switch. http://www.sphinxsearch.com/forum/view.html?id=247

Q, CentOS5.4 install coreseek-3.2.13 mmseg,./configure Error: Config.status:error:cannot find input file:src/makefile.in

Coreseek installation requires pre-installed software: # yum install gcc gcc-c++ libtool autoconf automake imake mysql-devel libxml2-devel expat-devel#aclocal #libtoolize--force#automake--add-missing#autoconf#autoheader

Configure can be! Original please refer to: http://www.coreseek.cn/news/6/100/

Q:coreseek appears undefined reference to ' libiconv ' when installation make

A: Edit:

./src/makefile file

Will

LIBS =-lm-lexpat-l/usr/local/lib

Change into

LIBS =-lm-lexpat-liconv-l/usr/local/lib

Q: In Distributed Search API calls appear search Error:unknown local index ' allindex ' in search request

The specific configuration is index Allindex

{

Type = Distributed

Local =usertest1stemmed

Local =TESTIDX

Agent = Localhost:3306:agentdata1,agentdata2

Agent_connect_timeout = 1000

Agent_query_timeout = 3000

}

A: Here is Sphinx in parsing localhost can not correctly point to 127.0.0.1, so change the configuration of localhost can. That

Agent = 127.0.0.1:3306:agentdata1,agentdata2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.