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 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么