donv29560 2014-11-18 04:21
浏览 146
已采纳

Sphinx searchhd windows错误[关闭]

I have issues accessing Sphinx from PHP. I've added php_sphinx.dll to my config, restarted and checked that it is in info() and so far so good. Then configured my Sphinx server, installed the service:

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.

Then started the service then built my index

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).

So far no error, everything looks ok, all files created.

Now if I do a php test like:

<?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);
?>

I only get

bool(false)

So I went to do a test in command line:

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

And I get

FATAL: malformed or unknown option near 'test'

So I went to my log file, query.log is empty and searchd.log contains:

[ 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

But the file F:\webserver\sphinx\data\app.spl does exist here.

So I have no idea what's going on.

  • 写回答

1条回答 默认 最新

  • dongyixiu3110 2014-11-18 05:13
    关注

    I was able to resolve my question, it turned out to be a firewall issue.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?