sphinxsearch 返回“无法发送客户端协议版本”
在我的一些服务器上,执行 sphinx php 查询会返回该错误。搜索谷歌我找不到任何东西,除了这是错误出现的部分原因:
// send my version
// this is a subtle part. we must do it before (!) reading back from searchd.
// because otherwise under some conditions (reported on FreeBSD for instance)
// TCP stack could throttle write-write-read pattern because of Nagle.
if (!$this->Send($fp, pack('N', 1), 4))
{
fclose($fp);
$this->error = 'failed to send client protocol version';
return false;
}
我发现的关闭是这个 http://www.sphinxsearch.com/forum/view.html?id=4919
但我不知道 sphinxapi.php 在哪里(我使用手动编译安装)并且不确定这是否是一个好主意。
有人有什么想法吗?
On some of my servers, doing a sphinx php query returns that error. Searching google I can't find anything except this is part of why the error came out:
// send my version
// this is a subtle part. we must do it before (!) reading back from searchd.
// because otherwise under some conditions (reported on FreeBSD for instance)
// TCP stack could throttle write-write-read pattern because of Nagle.
if (!$this->Send($fp, pack('N', 1), 4))
{
fclose($fp);
$this->error = 'failed to send client protocol version';
return false;
}
The close I've found is this http://www.sphinxsearch.com/forum/view.html?id=4919
But I do not know where the sphinxapi.php is (I installed using manual compile) and not sure if that's a good idea.
Anyone has any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我的服务器上刚刚遇到了同样的问题,我意识到我根本没有启动 searchd 守护进程。
希望这有帮助
I just had the same issue on my server, and I realized I did not start the searchd daemon at all.
Hope this helps
首先请确保您为 api 库使用合适的 IP。
中查看正在使用的 ip
您可以在sphinx.config 部分 searchd{}
。如果没问题,下一步是查看 sphinx 状态
searchd --status
First of all make shure that you use suitable ip for api library.
What ip is using you can see into
sphinx.config section searchd{}.
If it is ok next step is to see sphinx status
searchd --status
问题可能出在错误的端口上。我在
sphinx.config
中设置了两个端口用于监听:当我尝试通过
9306
端口进行连接时,出现了上述错误。将其更改为9312
解决了问题。The issue can be with the wrong port. I had two ports set for listening in my
sphinx.config
:When I've tried to connect via
9306
port, I got the error mentioned above. Changing it to9312
solved the problem.我对 Sphinx 2.2.8 也有同样的问题,
我发现在这个版本中,searchd 配置中的侦听端口集已被删除,现在端口是
所以当您配置 sphinx 客户端时,使用端口 9312 对我有用。即:
希望这对您有帮助。如果您需要有关基本配置的更多详细信息,请询问我。
I have the same problem with Sphinx 2.2.8
What I found is in this version the set of listen port in searchd configuration was removed and now the ports are
So when you configure the sphinx client use port 9312 works for me. Ie:
Hope this helps you. And if you need more details about the basic configuration just ask me.