Search not working on new OSS chef server install

Hello,

Just ran an install of chef server on ubuntu 12.10, things are generaly
working, but the search is not returning results in some cases when searching
from webui or knife.

I have 2 nodes configured:

WIN-RJS5G5R51NK.mydomain.co.uk (Windows2008)
lo-deploy-alpha (this is the client on chef-server ubuntu 12.10)

Running
knife search node name:lo-deploy-alpha

returns:
1 items found

… details of node

Running
knife search node name:WIN-RJS5G5R51NK.mydomain.co.uk
returns 0 items found

Running
knife node list
returns:
WIN-RJS5G5R51NK.mydomain.co.uk
lo-deploy-alpha

So the node is definitely there.

I checked the running processes on the server, and they all seem to be running
(based on
http://wiki.opscode.com/display/chef/Installing+Chef+Server+on+Debian+or+Ubuntu+using+Packages#InstallingChefServeronDebianorUbuntuusingPackages-VerifyThatAllComponentsareRunning)

Can someone point me in the right direction to look at what could be causing
this? just getting started with chef.

I am also getting this problem:
http://tickets.opscode.com/browse/KNIFE-1
Which could be related.

On Mon, Dec 10, 2012 at 10:48 AM, iam@seifattar.net wrote:

Just ran an install of chef server on ubuntu 12.10, things are generaly
working, but the search is not returning results in some cases when searching
from webui or knife.

What version of the Chef Server? How did you install it, e.g. using
gems or debs?

There are some general debugging steps here:

http://wiki.opscode.com/display/chef/Chef+Indexer#ChefIndexer-ChefExpander

Often issues with indexing Windows nodes surface the solr
maxFieldLength issue: http://tickets.opscode.com/browse/CHEF-2346

Bryan

Just ran an install of chef server on ubuntu 12.10, things are generaly
working, but the search is not returning results in some cases when
searching
from webui or knife.

is chef-expander running? can you check if "pa suwwx | grep
chef-expander" returns a result?

Thanks
Gourav
Founder and Principal Consultant
Initcron | www.initcron.com

On 10 December 2012 17:42, Bryan McLellan btm@loftninjas.org wrote:

On Mon, Dec 10, 2012 at 10:48 AM, iam@seifattar.net wrote:

Just ran an install of chef server on ubuntu 12.10, things are generaly
working, but the search is not returning results in some cases when
searching
from webui or knife.

What version of the Chef Server? How did you install it, e.g. using
gems or debs?

There are some general debugging steps here:

http://wiki.opscode.com/display/chef/Chef+Indexer#ChefIndexer-ChefExpander

Often issues with indexing Windows nodes surface the solr
maxFieldLength issue: http://tickets.opscode.com/browse/CHEF-2346

Thanks for the replies.

Installed using debian packages, with the apt line:

deb http://apt.opscode.com/ precise-0.10 main

chef expander is running, couldn't get the command Gourav pasted to work,
but "ps aux | grep chef-expander" returns:

root 2828 0.0 0.3 83016 16132 ? S 16:17 0:00
/usr/bin/ruby1.8 /usr/bin/chef-expander -d -c /etc/chef/solr.rb -P
/var/run/chef/expander.pid -L /var/lo .log -n 1 -i 1
root 2829 2.4 1.2 123248 51720 ? S 16:17 2:57
chef-expander worker #1 (vnodes 0-1023)

Which seems ok.

Checking queue status doesn't return any problems (there was a warning
about the url for solr being of old format, which I have changed to
http://localhost:8983/solr /etc/chef/solr.rb) but problem isnt sorted.

Only thing left to investigate is to read CHEF-2346 and comments for a
solution, as it does sound like my problem.

Thanks again,
Seif

chef expander is running, couldn't get the command Gourav pasted to work,
but "ps aux | grep chef-expander" returns:

root 2828 0.0 0.3 83016 16132 ? S 16:17 0:00
/usr/bin/ruby1.8 /usr/bin/chef-expander -d -c /etc/chef/solr.rb -P
/var/run/chef/expander.pid -L /var/lo .log -n 1 -i 1
root 2829 2.4 1.2 123248 51720 ? S 16:17 2:57
chef-expander worker #1 (vnodes 0-1023)

ok. the problem I had with chef server on ubuntu 12.04 was two versions of
eventmachine gem which were conflicting and not letting chef-expander
start. This was causing serarch to return zero results.

you could check the eventmachine versions with
gem list eventmachine

I had two of those installed, 0.12.10 and 1.0.0. Uninstalling the later
using following command, and restarting chef-expander resolved my problem.

    sudo gem uninstall eventmachine --version 1.0.0

Thanks
Gourav

Hi,

I had a chef search problem as well just last week. Turned out to be a
rabbitmq issue, as it wasn't properly delivering the messages between the
expander and solr. Here is the thread:
http://comments.gmane.org/gmane.comp.sysutils.chef.user/7305

The last comment are my steps to fix. Hope this turns out to work for you.

Kevin

On Mon, Dec 10, 2012 at 10:51 AM, Gourav Shah gs@initcron.org wrote:

chef expander is running, couldn't get the command Gourav pasted to work,

but "ps aux | grep chef-expander" returns:

root 2828 0.0 0.3 83016 16132 ? S 16:17 0:00
/usr/bin/ruby1.8 /usr/bin/chef-expander -d -c /etc/chef/solr.rb -P
/var/run/chef/expander.pid -L /var/lo .log -n 1 -i 1
root 2829 2.4 1.2 123248 51720 ? S 16:17 2:57
chef-expander worker #1 (vnodes 0-1023)

ok. the problem I had with chef server on ubuntu 12.04 was two versions
of eventmachine gem which were conflicting and not letting chef-expander
start. This was causing serarch to return zero results.

you could check the eventmachine versions with
gem list eventmachine

I had two of those installed, 0.12.10 and 1.0.0. Uninstalling the later
using following command, and restarting chef-expander resolved my problem.

    sudo gem uninstall eventmachine --version 1.0.0

Thanks
Gourav

On 10 December 2012 17:42, Bryan McLellan btm@loftninjas.org wrote:

Often issues with indexing Windows nodes surface the solr
maxFieldLength issue: http://tickets.opscode.com/browse/CHEF-2346

Yup, that was it! thanks!

I set the maxFieldLength to 1000000, restarted ran 'knife index rebuild'
and now search works.

Was hoping it would magically fix knife-1 but no such luck.

Thanks again,
Seif