嘿。只是想给你一个提示,如果你在使用 Unix 套接字与你的 Sphinx / Manticore 实例通信时遇到错误 "FATAL: port 0 is out of range" 应该如何处理。
这里有一个示例:
snikolaev@dev:~/dir$ ./searchd -c sphinx.conf
Manticore 2.7.1 458e9c6@180704 dev
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2018, Manticore Software LTD (http://manticoresearch.com)
using config file 'sphinx.conf'...
FATAL: port 0 is out of range
shutdown complete
如果你看到这个错误,请确保在你的 Sphinx / Manticore 配置中,Unix 套接字文件的路径是绝对路径。这样做的原因在于,如果你只写
listen = searchd.sock
那么:
- 无法区分这是否为 Unix 套接字
- 可能存在安全隐患
祝你好运!