Sphinx searchhd windows错误[关闭]

问题描述 投票:0回答:1

我有从PHP访问Sphinx的问题。我已经将php_sphinx.dll添加到我的配置中,重新启动并检查它是否在info()中并且到目前为止一直很好。然后配置我的Sphinx服务器,安装了服务:

F:\webserver\sphinx\bin>searchd.exe --install --config f:\webserver\sphinx\conf\app.conf --servicename Sphinx
Sphinx 2.2.5-id64-release (r4825)
Copyright (c) 2001-2014, Andrew Aksyonoff
Copyright (c) 2008-2014, Sphinx Technologies Inc (http://sphinxsearch.com)

Installing service...
Service 'Sphinx' installed successfully.

然后启动服务然后构建我的索引

F:\webserver\sphinx\bin>indexer.exe --config f:\webserver\sphinx\conf\app.conf --rotate --all
Sphinx 2.2.5-id64-release (r4825)
Copyright (c) 2001-2014, Andrew Aksyonoff
Copyright (c) 2008-2014, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file 'f:\webserver\sphinx\conf\app.conf'...
indexing index 'app'...
collected 2 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 2 docs, 13336 bytes
total 0.047 sec, 279862 bytes/sec, 41.97 docs/sec
total 5 reads, 0.000 sec, 5.5 kb/call avg, 0.0 msec/call avg
total 12 writes, 0.000 sec, 3.9 kb/call avg, 0.0 msec/call avg
rotating indices: successfully sent SIGHUP to searchd (pid=3716).

到目前为止没有错误,一切看起来都很好,所有文件都创建

现在,如果我做一个PHP测试,如:

<?php
error_reporting(E_ALL);
$s = new SphinxClient;
$s->setServer("localhost", 9312);
$s->setMatchMode(SPH_MATCH_ANY);
$s->setMaxQueryTime(3);
$result = $s->query('test');
var_dump($result);
?>

我只能得到

bool(false)

所以我去命令行做一个测试:

F:\webserver\sphinx\bin>searchd.exe --config f:\webserver\sphinx\conf\app.conf test

我明白了

FATAL: malformed or unknown option near 'test'

所以我去了我的日志文件,query.log是空的,searchd.log包含:

[ 4212] listening on 127.0.0.1:9312
[ 4212] WARNING: index 'app': lock: failed to lock F:\webserver\sphinx\data\app.spl: No such file or directory; NOT SERVING
[ 4212] FATAL: no valid indexes to serve

但文件F:\ webserver \ sphinx \ data \ app.spl确实存在于此处。

所以我不知道发生了什么。

php sphinx
1个回答
0
投票

我能够解决我的问题,结果证明是防火墙问题。

© www.soinside.com 2019 - 2024. All rights reserved.