Sphinx错误-binlog.lock':2'没有这样的文件或目录'

时间:2018-08-25 01:41:56

标签: sql-server sphinx

我设法使Sphinx Service在Windows 10上正常工作,我的计划是将Sphinx用作MSSQL Server 2017全文搜索的替代方法,但是我遇到了一个错误,该错误使我无法使用search命令,我给出了完整的访问Sphinx目录,并且不应是文件夹安全权限问题。

c:\sphinx\bin>searchd.exe
Sphinx 3.0.3-dev (commit facc3fb)
Copyright (c) 2001-2018, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file './sphinx.conf'...
listening on all interfaces, port=9312
listening on all interfaces, port=9306
precaching index 'FTS_Catalog'
precaching index 'testrt'
WARNING: index 'testrt': prealloc: failed to lock C:/sphinx/var/data/testrt.lock: No such file or directory; NOT SERVING
precached 2 indexes in 0.005 sec
WARNING: No extra index definitions found in data folder
FATAL: failed to lock 'C:/sphinx/var/data/binlog.lock': 2 'No such file or directory'

索引器似乎工作正常

c:\sphinx\bin>indexer.exe --all --rotate
Sphinx 3.0.3-dev (commit facc3fb)
Copyright (c) 2001-2018, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file './sphinx.conf'...
indexing index 'FTS_Catalog'...
collected 9 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 9 docs, 0.2 Kb
total 0.0 sec, 5.1 Kb/sec, 259 docs/sec
skipping non-plain index 'testrt'...
rotating indices: successfully sent SIGHUP to searchd (pid=13916).

我可以使用以下配置启动服务

#
# Minimal Sphinx configuration sample (clean, simple, functional)
#

source src1
{
    type            = mssql

    sql_host        = #####
    sql_user        = #####
    sql_pass        = #####
    sql_db          = #####
    sql_port        = 1433  # optional, default is 3306

    sql_query       = \
        SELECT ID, Group_ID, FullName \
        FROM Sphinx_tbl

    sql_attr_uint       = Group_ID
}


index FTS_Catalog
{
    source          = src1
    path            = C:/sphinx/var/data/test1
}


index testrt
{
    type            = rt
    rt_mem_limit        = 256M


    path            =  C:/sphinx/var/data/testrt

    rt_field        = FullName
    rt_field        = content
    rt_attr_uint        = gid
}


indexer
{
    mem_limit       = 128M
}


searchd
{
    listen          = 9312
    listen          = 9306:mysql41
    log         = C:/sphinx/log/searchd.log
    query_log       = C:/sphinx/log/query.log
    read_timeout        = 5
    max_children        = 30
    pid_file        = C:/sphinx/var/log/searchd.pid
    seamless_rotate     = 1
    preopen_indexes     = 1
    unlink_old      = 1
    workers         = threads # for RT to work
    binlog_path     = C:/sphinx/var/data
}

这些是索引器生成的文件,到目前为止,一切似乎都很好,但是由于某种原因,searchd.exe无法查看/访问文件 Index Files - Image

你们可以指导我如何解决此问题吗?

1 个答案:

答案 0 :(得分:0)

最有可能正在运行另一个狮身人面像服务。

  • 在Windows中转到services.msc
  • 停止您可能已启动的所有Sphinx服务