gpt4 book ai didi

mysql - SphinxQL 连接问题(守护进程正在监听时)

转载 作者:行者123 更新时间:2023-11-29 10:12:27 26 4
gpt4 key购买 nike

我正在尝试让我的 SphinxQL 安装在我的 Ubuntu 16.04LTS 环境中运行。但是,我无法连接到服务器。我使用的配置如下:

searchd
{
listen = 9306:mysql41
log = /var/log/sphinxsearch/searchd.log
query_log = /var/log/sphinxsearch/query.log
read_timeout = 5
max_children = 30
pid_file = /var/run/sphinxsearch/searchd.pid
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
binlog_path = /var/lib/sphinxsearch/data
}

为了确认守护进程是否正在运行,我执行了:sudo systemctl status sphinxsearch.service返回:

sphinxsearch.service - LSB: Fast standalone full-text SQL search engine
Loaded: loaded (/etc/init.d/sphinxsearch; bad; vendor preset: enabled)
Active: active (running) since Thu 2018-06-07 11:23:09 CEST; 12min ago
Docs: man:systemd-sysv-generator(8)
Process: 10552 ExecStop=/etc/init.d/sphinxsearch stop (code=exited, status=0/SUCCESS)
Process: 10614 ExecStart=/etc/init.d/sphinxsearch start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/sphinxsearch.service
├─10621 /usr/bin/searchd
└─10622 /usr/bin/searchd

Jun 07 11:23:09 Serv001 sphinxsearch[10614]: listening on all interfaces, port=9306
Jun 07 11:23:09 Serv001 sphinxsearch[10614]: Sphinx 2.2.9-id64-release (rel22-r5006)
Jun 07 11:23:09 Serv001 sphinxsearch[10614]: Copyright (c) 2001-2015, Andrew Aksyonoff
Jun 07 11:23:09 Serv001 sphinxsearch[10614]: Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)
Jun 07 11:23:09 Serv001 sphinxsearch[10614]: precaching index 'I2455'
Jun 07 11:23:09 Serv001 sphinxsearch[10614]: [1.4K blob data]
Jun 07 11:23:09 Serv001 sphinxsearch[10614]: Copyright (c) 2001-2015, Andrew Aksyonoff
Jun 07 11:23:09 Serv001 sphinxsearch[10614]: Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)
Jun 07 11:23:09 Serv001 sphinxsearch[10614]: sphinxsearch.
Jun 07 11:23:09 Serv001 systemd[1]: Started LSB: Fast standalone full-text SQL search engine.

为了验证守护进程是否正在监听,我执行了: sudo lsof -i -P -n | grep LISTEN这向我展示了:

searchd   10622 sphinxsearch    8u  IPv4 423245474      0t0  TCP *:9306 (LISTEN)

但是,当我尝试连接:mysql -h0 -P9306它返回给我:ERROR 2002 (HY000): Can't connect to MySQL server on '0' (115) 过了一会儿

注意:索引构建没有问题,因此数据库连接已经提前建立

注2:我遵循了这个documentation

那么,我做错了什么,无法在端口 9306 连接到 SphinxQL?

编辑:iptables -L的输出: Output

最佳答案

从您的 iptables 来看,您似乎将所有内容列入黑名单(请参阅 INPUT 链中的 DROP 行),然后仅将选定的端口列入白名单。因此,要允许访问 9306,您应该这样做

iptables -A INPUT -p tcp --destination-port 9306 -j ACCEPT

关于mysql - SphinxQL 连接问题(守护进程正在监听时),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50737987/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com