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 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?