Search doesn't work on the chef server


#1

Hi, I installed chef server using the following cloud formation
configuration
https://s3.amazonaws.com/cloudformation-templates-us-east-1/chef-server-ubuntu-configuration.templatewhich
I found linked to on the site
http://aws.amazon.com/cloudformation/aws-cloudformation-templates/

This mostly worked out of the box, except for the search functionality,
which simply always returns zero results.

Where should I dig to fixed it?

Here’s what I did:

  • tried searching for nodes, clients, rols, nothing brings up data (and I
    have from all these groups)
  • verified that the following processes are running: chef-server,
    chef-server-webui, couchdb, rabbitmq, chef-solr, see
    https://gist.github.com/3945810
  • looked at solr at http://chef:8983/solr/admin/stats.jsp and the stats
    show that there are zero indexed documents.

So I guess solr doesn’t get the input. But now what? How do I debug this?

thanks!


#2

Have you tried “knife index rebuild” ? See
http://wiki.opscode.com/display/chef/Chef+Indexer

On Wed, Oct 24, 2012 at 5:31 AM, Ran Tavory ran@totango.com wrote:

Hi, I installed chef server using the following cloud formation
configuration
https://s3.amazonaws.com/cloudformation-templates-us-east-1/chef-server-ubuntu-configuration.template
which I found linked to on the site
http://aws.amazon.com/cloudformation/aws-cloudformation-templates/

This mostly worked out of the box, except for the search functionality,
which simply always returns zero results.

Where should I dig to fixed it?

Here’s what I did:

  • tried searching for nodes, clients, rols, nothing brings up data (and I
    have from all these groups)
  • verified that the following processes are running: chef-server,
    chef-server-webui, couchdb, rabbitmq, chef-solr, see
    https://gist.github.com/3945810
  • looked at solr at http://chef:8983/solr/admin/stats.jsp and the stats show
    that there are zero indexed documents.

So I guess solr doesn’t get the input. But now what? How do I debug this?

thanks!


#3

oh hi mike, thanks.

yes, I tried that, it runs smoothly but the index is still empty…

$ knife index rebuild
This operation is destructive. Rebuilding the index may take some time. You
sure? (yes/no): yes
Chef::ApiClient: success
Chef::DataBag: success
Chef::Environment: success
Chef::Node: success
Chef::Role: success

I think I’m missing the chef-expander process.
$ ps aux | grep expander
ubuntu 6540 0.0 0.0 7800 640 pts/3 S+ 12:57 0:00 grep
–color=auto expander

On Wed, Oct 24, 2012 at 2:34 PM, Mike miketheman@gmail.com wrote:

Have you tried “knife index rebuild” ? See
http://wiki.opscode.com/display/chef/Chef+Indexer

On Wed, Oct 24, 2012 at 5:31 AM, Ran Tavory ran@totango.com wrote:

Hi, I installed chef server using the following cloud formation
configuration

https://s3.amazonaws.com/cloudformation-templates-us-east-1/chef-server-ubuntu-configuration.template

which I found linked to on the site
http://aws.amazon.com/cloudformation/aws-cloudformation-templates/

This mostly worked out of the box, except for the search functionality,
which simply always returns zero results.

Where should I dig to fixed it?

Here’s what I did:

  • tried searching for nodes, clients, rols, nothing brings up data (and I
    have from all these groups)
  • verified that the following processes are running: chef-server,
    chef-server-webui, couchdb, rabbitmq, chef-solr, see
    https://gist.github.com/3945810
  • looked at solr at http://chef:8983/solr/admin/stats.jsp and the stats
    show
    that there are zero indexed documents.

So I guess solr doesn’t get the input. But now what? How do I debug this?

thanks!


#4

I was affected by this a long time back . The issue was this -
http://tickets.opscode.com/browse/CHEF-2346 . Is this affecting your setup?

On Wed, Oct 24, 2012 at 6:27 PM, Ran Tavory ran@totango.com wrote:

oh hi mike, thanks.

yes, I tried that, it runs smoothly but the index is still empty…

$ knife index rebuild
This operation is destructive. Rebuilding the index may take some time.
You sure? (yes/no): yes
Chef::ApiClient: success
Chef::DataBag: success
Chef::Environment: success
Chef::Node: success
Chef::Role: success

I think I’m missing the chef-expander process.
$ ps aux | grep expander
ubuntu 6540 0.0 0.0 7800 640 pts/3 S+ 12:57 0:00 grep
–color=auto expander

On Wed, Oct 24, 2012 at 2:34 PM, Mike miketheman@gmail.com wrote:

Have you tried “knife index rebuild” ? See
http://wiki.opscode.com/display/chef/Chef+Indexer

On Wed, Oct 24, 2012 at 5:31 AM, Ran Tavory ran@totango.com wrote:

Hi, I installed chef server using the following cloud formation
configuration

https://s3.amazonaws.com/cloudformation-templates-us-east-1/chef-server-ubuntu-configuration.template

which I found linked to on the site
http://aws.amazon.com/cloudformation/aws-cloudformation-templates/

This mostly worked out of the box, except for the search functionality,
which simply always returns zero results.

Where should I dig to fixed it?

Here’s what I did:

  • tried searching for nodes, clients, rols, nothing brings up data (and
    I
    have from all these groups)
  • verified that the following processes are running: chef-server,
    chef-server-webui, couchdb, rabbitmq, chef-solr, see
    https://gist.github.com/3945810
  • looked at solr at http://chef:8983/solr/admin/stats.jsp and the
    stats show
    that there are zero indexed documents.

So I guess solr doesn’t get the input. But now what? How do I debug
this?

thanks!


#5

There’s my problem (why chef-expander doen’t run).

$ chef-expander -n1
/usr/lib/ruby/1.8/rubygems.rb:233:in activate': can't activate eventmachine (~> 0.12.10, runtime) for ["chef-expander-10.16.0"], already activated eventmachine-1.0.0 for ["amqp-0.6.7", "chef-expander-10.16.0"] (Gem::LoadError) from /usr/lib/ruby/1.8/rubygems.rb:249:inactivate’
from /usr/lib/ruby/1.8/rubygems.rb:248:in each' from /usr/lib/ruby/1.8/rubygems.rb:248:inactivate’
from /usr/lib/ruby/1.8/rubygems.rb:1082:in `gem’
from /usr/sbin/chef-expander:18

Anyone knows how to fix this?

Madhurranjan, I didn’t get that far…

On Wed, Oct 24, 2012 at 2:57 PM, Ran Tavory ran@totango.com wrote:

oh hi mike, thanks.

yes, I tried that, it runs smoothly but the index is still empty…

$ knife index rebuild
This operation is destructive. Rebuilding the index may take some time.
You sure? (yes/no): yes
Chef::ApiClient: success
Chef::DataBag: success
Chef::Environment: success
Chef::Node: success
Chef::Role: success

I think I’m missing the chef-expander process.
$ ps aux | grep expander
ubuntu 6540 0.0 0.0 7800 640 pts/3 S+ 12:57 0:00 grep
–color=auto expander

On Wed, Oct 24, 2012 at 2:34 PM, Mike miketheman@gmail.com wrote:

Have you tried “knife index rebuild” ? See
http://wiki.opscode.com/display/chef/Chef+Indexer

On Wed, Oct 24, 2012 at 5:31 AM, Ran Tavory ran@totango.com wrote:

Hi, I installed chef server using the following cloud formation
configuration

https://s3.amazonaws.com/cloudformation-templates-us-east-1/chef-server-ubuntu-configuration.template

which I found linked to on the site
http://aws.amazon.com/cloudformation/aws-cloudformation-templates/

This mostly worked out of the box, except for the search functionality,
which simply always returns zero results.

Where should I dig to fixed it?

Here’s what I did:

  • tried searching for nodes, clients, rols, nothing brings up data (and
    I
    have from all these groups)
  • verified that the following processes are running: chef-server,
    chef-server-webui, couchdb, rabbitmq, chef-solr, see
    https://gist.github.com/3945810
  • looked at solr at http://chef:8983/solr/admin/stats.jsp and the
    stats show
    that there are zero indexed documents.

So I guess solr doesn’t get the input. But now what? How do I debug
this?

thanks!


#6

I had a similar error message a few weeks ago.
Maybe that thread will help you.
http://lists.opscode.com/sympa/arc/chef/2012-09/msg00331.html

On Wed, Oct 24, 2012 at 9:12 AM, Ran Tavory ran@totango.com wrote:

There’s my problem (why chef-expander doen’t run).

$ chef-expander -n1
/usr/lib/ruby/1.8/rubygems.rb:233:in activate': can't activate eventmachine (~> 0.12.10, runtime) for ["chef-expander-10.16.0"], already activated eventmachine-1.0.0 for ["amqp-0.6.7", "chef-expander-10.16.0"] (Gem::LoadError) from /usr/lib/ruby/1.8/rubygems.rb:249:inactivate’
from /usr/lib/ruby/1.8/rubygems.rb:248:in each' from /usr/lib/ruby/1.8/rubygems.rb:248:inactivate’
from /usr/lib/ruby/1.8/rubygems.rb:1082:in `gem’
from /usr/sbin/chef-expander:18

Anyone knows how to fix this?

Madhurranjan, I didn’t get that far…

On Wed, Oct 24, 2012 at 2:57 PM, Ran Tavory ran@totango.com wrote:

oh hi mike, thanks.

yes, I tried that, it runs smoothly but the index is still empty…

$ knife index rebuild
This operation is destructive. Rebuilding the index may take some time.
You sure? (yes/no): yes
Chef::ApiClient: success
Chef::DataBag: success
Chef::Environment: success
Chef::Node: success
Chef::Role: success

I think I’m missing the chef-expander process.
$ ps aux | grep expander
ubuntu 6540 0.0 0.0 7800 640 pts/3 S+ 12:57 0:00 grep
–color=auto expander

On Wed, Oct 24, 2012 at 2:34 PM, Mike miketheman@gmail.com wrote:

Have you tried “knife index rebuild” ? See
http://wiki.opscode.com/display/chef/Chef+Indexer

On Wed, Oct 24, 2012 at 5:31 AM, Ran Tavory ran@totango.com wrote:

Hi, I installed chef server using the following cloud formation
configuration

https://s3.amazonaws.com/cloudformation-templates-us-east-1/chef-server-ubuntu-configuration.template
which I found linked to on the site
http://aws.amazon.com/cloudformation/aws-cloudformation-templates/

This mostly worked out of the box, except for the search functionality,
which simply always returns zero results.

Where should I dig to fixed it?

Here’s what I did:

  • tried searching for nodes, clients, rols, nothing brings up data (and
    I
    have from all these groups)
  • verified that the following processes are running: chef-server,
    chef-server-webui, couchdb, rabbitmq, chef-solr, see
    https://gist.github.com/3945810
  • looked at solr at http://chef:8983/solr/admin/stats.jsp and the stats
    show
    that there are zero indexed documents.

So I guess solr doesn’t get the input. But now what? How do I debug
this?

thanks!


#7

James thanks, that did the trick. I uninstalled the newer version of
eventmachine

$ sudo gem uninstall eventmachine

Select gem to uninstall:

  1. eventmachine-0.12.10
  2. eventmachine-1.0.0
  3. All versions

2
Successfully uninstalled eventmachine-1.0.0

And now this works:

ubuntu@chef:~$ sudo chef-expander -n1

On Wed, Oct 24, 2012 at 4:10 PM, James Light j.gareth.light@gmail.comwrote:

I had a similar error message a few weeks ago.
Maybe that thread will help you.
http://lists.opscode.com/sympa/arc/chef/2012-09/msg00331.html

On Wed, Oct 24, 2012 at 9:12 AM, Ran Tavory ran@totango.com wrote:

There’s my problem (why chef-expander doen’t run).

$ chef-expander -n1
/usr/lib/ruby/1.8/rubygems.rb:233:in activate': can't activate eventmachine (~> 0.12.10, runtime) for ["chef-expander-10.16.0"], already activated eventmachine-1.0.0 for ["amqp-0.6.7", "chef-expander-10.16.0"] (Gem::LoadError) from /usr/lib/ruby/1.8/rubygems.rb:249:inactivate’
from /usr/lib/ruby/1.8/rubygems.rb:248:in each' from /usr/lib/ruby/1.8/rubygems.rb:248:inactivate’
from /usr/lib/ruby/1.8/rubygems.rb:1082:in `gem’
from /usr/sbin/chef-expander:18

Anyone knows how to fix this?

Madhurranjan, I didn’t get that far…

On Wed, Oct 24, 2012 at 2:57 PM, Ran Tavory ran@totango.com wrote:

oh hi mike, thanks.

yes, I tried that, it runs smoothly but the index is still empty…

$ knife index rebuild
This operation is destructive. Rebuilding the index may take some time.
You sure? (yes/no): yes
Chef::ApiClient: success
Chef::DataBag: success
Chef::Environment: success
Chef::Node: success
Chef::Role: success

I think I’m missing the chef-expander process.
$ ps aux | grep expander
ubuntu 6540 0.0 0.0 7800 640 pts/3 S+ 12:57 0:00 grep
–color=auto expander

On Wed, Oct 24, 2012 at 2:34 PM, Mike miketheman@gmail.com wrote:

Have you tried “knife index rebuild” ? See
http://wiki.opscode.com/display/chef/Chef+Indexer

On Wed, Oct 24, 2012 at 5:31 AM, Ran Tavory ran@totango.com wrote:

Hi, I installed chef server using the following cloud formation
configuration

https://s3.amazonaws.com/cloudformation-templates-us-east-1/chef-server-ubuntu-configuration.template

which I found linked to on the site
http://aws.amazon.com/cloudformation/aws-cloudformation-templates/

This mostly worked out of the box, except for the search
functionality,

which simply always returns zero results.

Where should I dig to fixed it?

Here’s what I did:

  • tried searching for nodes, clients, rols, nothing brings up data
    (and

I
have from all these groups)

show
that there are zero indexed documents.

So I guess solr doesn’t get the input. But now what? How do I debug
this?

thanks!