"Riddle cannot detect Sphinx" - on separate machine

253 views
Skip to first unread message

kc

unread,
Dec 22, 2009, 3:10:03 AM12/22/09
to Thinking Sphinx
Hello,

I recently installed thinking_sphinx 1.3.9 and riddle 1.0.8 on a set
of servers. I get the following warning message in my server logs
whenever a search is conducted:

Riddle cannot detect Sphinx on your machine, and so can't determine
which
version of Sphinx you are planning on using. Please use one of the
following
lines after "require 'riddle'" to avoid this warning.

require 'riddle/0.9.8'
# or
require 'riddle/0.9.9'

The server setup is as follows:
1. a server with our Rails app + apache - all http requests come here.
2. a db server
3. a server with sphinx installed. Our Rails app gets deployed here
as well, but no http requests hit this box. We rebuild our sphinx
index by running the thinking_sphinx rake task on this box. A riddle
client on server #1 hits the sphinx searchd process on server #3 for
all end user searches.

All functionality seems to be fine - when a user searches, the search
succeeds and returns the relevant results. But each time a search is
run, server #1 logs the above warning. What can be done to get rid of
the warning? In which file should I add the require statement?

Thanks

kc

Pat Allan

unread,
Dec 25, 2009, 11:23:28 PM12/25/09
to thinkin...@googlegroups.com
Ah, I didn't think of this... I'll have to add a patch to allow people to explicitly set a version.

The quick fix is to install Sphinx on each of your servers. It won't get used on any beyond your explicit Sphinx server, but at least your app will know which version you're using.

Sorry for the hassle.

--
Pat

> --
>
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>
>

kc

unread,
Dec 28, 2009, 5:20:19 AM12/28/09
to Thinking Sphinx
Thanks for the quick response, Pat. I'll keep an eye out for the
update to riddle.

In the meantime...is my understanding correct that thinking_sphinx and
riddle are still able to figure out how to communicate properly with
the sphinx process on the other machine? As far as I can tell, the
end result seems to function ok. Not sure if we're causing some perf
issues.

Thanks

kc

Pat Allan

unread,
Dec 28, 2009, 5:22:52 AM12/28/09
to thinkin...@googlegroups.com
If you're using Sphinx 0.9.8, then it'll all be fine, provided you've set address and port in your sphinx.yml file (which, given things are working, I'm pretty sure you have). Even if you're using Sphinx 0.9.9, as long as you're not using any of the new features/changes, then it'll all still work smoothly.

--
Pat

Hayes Davis

unread,
Dec 28, 2009, 4:39:31 PM12/28/09
to Thinking Sphinx
Path,

For what it's worth, +1 on this issue. Just spent a while dealing with
it before I found this thread. Looking forward to that config file.

Thanks.

Hayes

On Dec 28, 5:22 am, Pat Allan <p...@freelancing-gods.com> wrote:
> If you're usingSphinx0.9.8, then it'll all be fine, provided you've set address and port in yoursphinx.yml file (which, given things are working, I'm pretty sure you have). Even if you're usingSphinx0.9.9, as long as you're not using any of the new features/changes, then it'll all still work smoothly.


>
> --
> Pat
>
> On 28/12/2009, at 9:20 PM, kc wrote:
>
> > Thanks for the quick response, Pat.  I'll keep an eye out for the
> > update toriddle.
>
> > In the meantime...is my understanding correct that thinking_sphinx and

> >riddleare still able to figure out how to communicate properly with
> > thesphinxprocess on the other machine?  As far as I can tell, the


> > end result seems to function ok.  Not sure if we're causing some perf
> > issues.
>
> > Thanks
>
> > kc
>
> > --
>

> > You received this message because you are subscribed to the Google Groups "ThinkingSphinx" group.

Hayes Davis

unread,
Dec 28, 2009, 4:41:35 PM12/28/09
to Thinking Sphinx
Sorry, Pat. Little typo in your name there on that last email. Been
dealing with paths to sphinx binaries. : )

Hayes

Pat Allan

unread,
Jan 31, 2010, 10:07:18 PM1/31/10
to thinkin...@googlegroups.com
Okay, I've just pushed a commit that takes care of explicitly setting the Sphinx version, when you don't have Sphinx installed on the web server - just add "version: 0.9.9" (or 0.9.8) to your sphinx.yml file under the appropriate environment.

This isn't in the latest gem yet - but I should have 1.3.16 out by the end of the week which will include it.

Cheers

--
Pat

> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.

ct9a

unread,
Mar 16, 2010, 2:41:52 AM3/16/10
to Thinking Sphinx
hello, guys and Pat,

I got a new Ubuntu machine (Karmic Koala).
I brought my working application from my working server to this new
server.

I have installed sphinx 0.9.9
- http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz is where i
downloaded it from
- untar-ed the tar file
- ran ./configure
- ran make
- ran make install

All ran fine without a problem.


Installed thinking sphinx and it went ok. Here's the output:

root@karmic-koala:~/projects/myApp# gem install thinking-sphinx \
> --source http://gemcutter.org
----------------- Extract start ------------------------------
If you're upgrading, you should read this:
http://freelancing-god.github.com/ts/en/upgrading.html

Successfully installed thinking-sphinx-1.3.16
1 gem installed
Installing ri documentation for thinking-sphinx-1.3.16...
Updating class cache with 3020 classes...
Installing RDoc documentation for thinking-sphinx-1.3.16...
root@karmic-koala:~/projects/myApp#
----------------- Extract stop ------------------------------

-Restart nginx
-Ran "rake thinking_sphinx:rebuild"

Checked the nginx error log (/opt/nginx/logs/error.log). Here's an
extract:

----------------- Extract start ------------------------------
Sphinx cannot be found on your system. You may need to configure the
following
settings in your config/sphinx.yml file:
* bin_path
* searchd_binary_name
* indexer_binary_name

For more information, read the documentation:
http://freelancing-god.github.com/ts/en/advanced_config.html
----------------- Extract stop ------------------------------

Please help :)

Pat Allan

unread,
Mar 16, 2010, 2:50:20 AM3/16/10
to thinkin...@googlegroups.com
Have you set bin_path in your sphinx.yml file? I did set up almost the same server just over a week ago (Karmic, 0.9.9, TS 1.3.16, passenger with nginx), and it works for me... but maybe that's because I used passenger-stack:
http://github.com/benschwarz/passenger-stack

(Though I used a branch which had some issues with the nginx init.d file, but that won't influence the PATH).

I guess, I'd start with setting bin_path to wherever indexer and searchd are located (/usr/local/bin?), and if that doesn't help matters, let us know :)

--
Pat

ct9a

unread,
Mar 16, 2010, 3:03:14 AM3/16/10
to Thinking Sphinx
guys and Pat,
I know why.. When I moved the application directory, the "vendor"
directory was not copied over.

I copied the whole "vendor" directory from the application directory
in the working server to the new server, reinstalled sphinx & thinking
sphinx and then rebuilt the model.

Works like a dream :)

Thanks, Pat! TS rocks.

On Mar 16, 5:50 pm, Pat Allan <p...@freelancing-gods.com> wrote:
> Have you set bin_path in your sphinx.yml file? I did set up almost the same server just over a week ago (Karmic, 0.9.9, TS 1.3.16, passenger with nginx), and it works for me... but maybe that's because I used passenger-stack:http://github.com/benschwarz/passenger-stack
>
> (Though I used a branch which had some issues with the nginx init.d file, but that won't influence the PATH).
>
> I guess, I'd start with setting bin_path to wherever indexer and searchd are located (/usr/local/bin?), and if that doesn't help matters, let us know :)
>
> --
> Pat
>
> On 16/03/2010, at 5:41 PM, ct9a wrote:
>
> > hello, guys and Pat,
>
> >  I got a new Ubuntu machine (Karmic Koala).
> > I brought my working application from my working server to this new
> > server.
>
> > I have installed sphinx 0.9.9

> > -http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gzis where i


> > downloaded it from
> > - untar-ed the tar file
> > - ran ./configure
> > - ran make
> > - ran make install
>
> > All ran fine without a problem.
>
> > Installed thinking sphinx and it went ok. Here's the output:
>
> > root@karmic-koala:~/projects/myApp# gem install thinking-sphinx \

> >>  --sourcehttp://gemcutter.org

Pat Allan

unread,
Mar 16, 2010, 3:08:37 AM3/16/10
to thinkin...@googlegroups.com
Ah great :)

--
Pat

Reply all
Reply to author
Forward
0 new messages