Sphinx出现1429查询错误

2018年6月14日07:52:45 发表评论 513 阅读

服务器硬盘出现故障,恢复备份数据库后sphinx无法正确执行查询语句出现以下错误:

#1429 - Unable to connect to foreign data source: failed to resolve searchd host (name=localhost)。

用netstat -ltnp检查search服务及端口都显示正常

Sphinx出现1429查询错误

Sphinx出现1429查询错误

 

show engines;
+--------------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                    | Transactions | XA   | Savepoints |
+--------------------+---------+------------------------------------------------------------+--------------+------+------------+
| InnoDB             | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES          | YES  | YES        |
| PERFORMANCE_SCHEMA | YES     | Performance Schema                                         | NO           | NO   | NO         |
| MyISAM             | YES     | MyISAM storage engine                                      | NO           | NO   | NO         |
| CSV                | YES     | CSV storage engine                                         | NO           | NO   | NO         |
| MRG_MYISAM         | YES     | Collection of identical MyISAM tables                      | NO           | NO   | NO         |
| SPHINX             | YES     | Sphinx storage engine 2.2.9-release                        | NO           | NO   | NO         |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables  | NO           | NO   | NO

在mysql中使命令更新搜索表的连接服务器为127.0.0.1后正常。

ALTER TABLE t1CONNECTION="sphinx://NEWHOST:NEWPORT/NEWINDEXNAME";

 

但是不能使用localhost做连接串,还需要继续排查。

luqy

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: