2

I have sphinx setup to run in config files on port 3312. I can use the indexer, and create the index. I can search.

I can't run searchd to return queries. I tried telnet 127.0.0.1 3312. My connection is refused.

Whats my next step? I am not very good with Iptables.

Wesley
  • 32,320
  • 9
  • 80
  • 116
Brandon Ellis
  • 123
  • 1
  • 3

2 Answers2

2

You should start searchd first, something like /usr/local/bin/searchd (you should use actual path to searchd, try locate searchd to get it)

Okay, it looks like you have two listen directives in your config:

listen = {port}
listen = {sql_host}:{sql_port}:mysql41

and the second one is obviously not right

Alex
  • 7,789
  • 4
  • 36
  • 51
  • I have tried. My result is this: using config file '/usr/local/etc/sphinx.conf'... WARNING: compat_sphinxql_magics=1 is deprecated; please update your application and config listening on all interfaces, port=3306 bind() failed on 0.0.0.0, retrying... bind() failed on 0.0.0.0, retrying... – Brandon Ellis Sep 01 '11 at 20:05
  • Please double check your configuration file, it tries to bind to port 3306 which is not right, 3306 is a MySQL port. – Alex Sep 01 '11 at 20:07
  • Sorry I forgot to specify the config file. This is my result: listening on all interfaces, port=3312 listening on 127.0.0.1:3306 bind() failed on 127.0.0.1, retrying... bind() failed on 127.0.0.1, retrying... bind() failed on 127.0.0.1, retrying... bind() failed on 127.0.0.1, retrying... bind() failed on 127.0.0.1, retrying... – Brandon Ellis Sep 01 '11 at 20:07
  • You should set `listen = 3312` in the `searchd` section of your Sphinx config file. – Alex Sep 01 '11 at 20:10
  • Yes it was previously set as that. but as you can see from the previous post something else is causing issues. – Brandon Ellis Sep 01 '11 at 20:15
  • Could you please post your full config somewhere (say, to pastebin.com) and post a link here? – Alex Sep 01 '11 at 20:17
  • http://pastebin.com/JwLb9Qze --> sphinx.conf – Brandon Ellis Sep 01 '11 at 20:21
  • http://pastebin.com/YqffTYbX --> import file – Brandon Ellis Sep 01 '11 at 20:23
  • I am however missing the .pid file. Am I supposed to create that, or is it created when the service is ran. – Brandon Ellis Sep 01 '11 at 20:25
  • I edited my answer, I think the problem is that you generate the config with two `listen` lines, you should just delete or comment out the second one. – Alex Sep 01 '11 at 20:29
  • Yes, I commented that second directive out. Although it is still having issues with the .pid. I manually created the .pid file with proper permission, but it doesnt seem to like it very much. Thank you for your help – Brandon Ellis Sep 01 '11 at 20:32
  • Well, your pid path is set to `pid_file = {root}/searchd.pid` and `root` resolves to `''` according to your config, you should use `/var/run/searchd.pid`, `/searchd.pid` is not writable I guess. – Alex Sep 01 '11 at 20:36
  • Actually its only an issue when I try to stop the service. Removing the directive you pointed out now fixes the search. – Brandon Ellis Sep 01 '11 at 20:45
0

It may be because the port is already hold by some else daemon. If the '127.0.0.1:3306' is failed - it is nothing surprising, since 3306 is the port for mysqld. You can try the 9312 (sphinx api) and 9306 (sphinxql) as official IANA assigned ports for sphinx.

Alexey
  • 26
  • 1