Solr issue trying to start chef 0.10 rc server


#1

So I’ve been trying to go through the manual chef server setup with
0.10.0.rc0 using the gem install on RHEL 5.6 and hit a snag with solr.
-chef-expander is running

  • when trying to start chef-solr via the init script, it starts up and
    jetty binds to the port but solr isn’t working:

ps -ef | grep java

root 13287 1 0 21:42 ? 00:00:00 java -Xmx256M -Xms256M
-Dsolr.data.dir=/var/chef/solr/data -Dsolr.solr.home=/var/chef/solr
-jar /var/chef/solr-jetty/start.jar

But the logs reveal a problem (see the bottom). I’m guessing something
simple about my solr config is wrong. Hoping someone can help. The
server api and server webui will start up but solr returns a 404
whenever you try t hit it so they server can’t do much.

cat solr.rb

log_location STDOUT

solr_url “http://localhost:8983

supportdir = "/var/chef"
solr_jetty_path "/var/chef/solr-jetty"
solr_data_path "/var/chef/solr/data"
solr_home_path "/var/chef/solr"
solr_heap_size “256M”

Here is the log output:

[Fri, 15 Apr 2011 21:42:52 -0700] INFO: Daemonizing…
[Fri, 15 Apr 2011 21:42:52 -0700] INFO: Forked, in 13287. Priveleges: 0 0
[Fri, 15 Apr 2011 21:42:52 -0700] INFO: Starting Solr with java
-Xmx256M -Xms256M -Dsolr.data.dir=/var/chef/solr/data
-Dsolr.solr.home=/var/chef/solr -jar /var/chef/solr-jetty/start.jar
2011-04-15 21:42:52.214::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
2011-04-15 21:42:52.285::INFO: jetty-6.1.3
2011-04-15 21:42:52.376::INFO: NO JSP Support for /solr, did not find
org.apache.jasper.servlet.JspServlet
2011-04-15 21:42:52.456::WARN: failed SolrRequestFilter
java.lang.NoClassDefFoundError: org.apache.solr.core.SolrResourceLoader
at java.lang.Class.initializeClass(libgcj.so.7rh)
at org.apache.solr.core.Config.(Config.java:93)
at org.apache.solr.servlet.SolrDispatchFilter.(SolrDispatchFilter.java:65)
at java.lang.Class.newInstance(libgcj.so.7rh)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:94)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:210)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.mortbay.start.Main.invokeMain(Main.java:183)
at org.mortbay.start.Main.start(Main.java:497)
at org.mortbay.start.Main.main(Main.java:115)
Caused by: java.lang.ClassNotFoundException:
java.util.concurrent.ConcurrentHashMap not found in ContextLoader@null
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
at java.lang.Class.forName(libgcj.so.7rh)
at java.lang.Class.initializeClass(libgcj.so.7rh)
…25 more
2011-04-15 21:42:52.480::WARN: failed
org.mortbay.jetty.webapp.WebAppContext@259ed505{/solr,jar:file:/var/chef/solr-jetty/webapps/solr.war!/}
java.lang.NoClassDefFoundError: org.apache.solr.core.SolrResourceLoader
at java.lang.Class.initializeClass(libgcj.so.7rh)
at org.apache.solr.core.Config.(Config.java:93)
at org.apache.solr.servlet.SolrDispatchFilter.(SolrDispatchFilter.java:65)
at java.lang.Class.newInstance(libgcj.so.7rh)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:94)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:210)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.mortbay.start.Main.invokeMain(Main.java:183)
at org.mortbay.start.Main.start(Main.java:497)
at org.mortbay.start.Main.main(Main.java:115)
Caused by: java.lang.ClassNotFoundException:
java.util.concurrent.ConcurrentHashMap not found in ContextLoader@null
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
at java.lang.Class.forName(libgcj.so.7rh)
at java.lang.Class.initializeClass(libgcj.so.7rh)
…25 more
2011-04-15 21:42:52.480::WARN: failed ContextHandlerCollection@25fc61a5
java.lang.NoClassDefFoundError: org.apache.solr.core.SolrResourceLoader
at java.lang.Class.initializeClass(libgcj.so.7rh)
at org.apache.solr.core.Config.(Config.java:93)
at org.apache.solr.servlet.SolrDispatchFilter.(SolrDispatchFilter.java:65)
at java.lang.Class.newInstance(libgcj.so.7rh)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:94)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:210)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.mortbay.start.Main.invokeMain(Main.java:183)
at org.mortbay.start.Main.start(Main.java:497)
at org.mortbay.start.Main.main(Main.java:115)
Caused by: java.lang.ClassNotFoundException:
java.util.concurrent.ConcurrentHashMap not found in ContextLoader@null
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
at java.lang.Class.forName(libgcj.so.7rh)
at java.lang.Class.initializeClass(libgcj.so.7rh)
…25 more
2011-04-15 21:42:52.483::WARN: failed HandlerCollection@25fa251d
java.lang.NoClassDefFoundError: org.apache.solr.core.SolrResourceLoader
at java.lang.Class.initializeClass(libgcj.so.7rh)
at org.apache.solr.core.Config.(Config.java:93)
at org.apache.solr.servlet.SolrDispatchFilter.(SolrDispatchFilter.java:65)
at java.lang.Class.newInstance(libgcj.so.7rh)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:94)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:210)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.mortbay.start.Main.invokeMain(Main.java:183)
at org.mortbay.start.Main.start(Main.java:497)
at org.mortbay.start.Main.main(Main.java:115)
Caused by: java.lang.ClassNotFoundException:
java.util.concurrent.ConcurrentHashMap not found in ContextLoader@null
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
at java.lang.Class.forName(libgcj.so.7rh)
at java.lang.Class.initializeClass(libgcj.so.7rh)
…25 more
2011-04-15 21:42:52.484::WARN: Error starting handlers
java.lang.NoClassDefFoundError: org.apache.solr.core.SolrResourceLoader
at java.lang.Class.initializeClass(libgcj.so.7rh)
at org.apache.solr.core.Config.(Config.java:93)
at org.apache.solr.servlet.SolrDispatchFilter.(SolrDispatchFilter.java:65)
at java.lang.Class.newInstance(libgcj.so.7rh)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:94)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:210)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.mortbay.start.Main.invokeMain(Main.java:183)
at org.mortbay.start.Main.start(Main.java:497)
at org.mortbay.start.Main.main(Main.java:115)
Caused by: java.lang.ClassNotFoundException:
java.util.concurrent.ConcurrentHashMap not found in ContextLoader@null
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
at java.lang.Class.forName(libgcj.so.7rh)
at java.lang.Class.initializeClass(libgcj.so.7rh)
…25 more
2011-04-15 21:42:52.486::INFO: Started SocketConnector @ 0.0.0.0:8983

KC Braunschweig


#2

On Friday, April 15, 2011 at 9:52 PM, KC Braunschweig wrote:
So I’ve been trying to go through the manual chef server setup with

0.10.0.rc0 using the gem install on RHEL 5.6 and hit a snag with solr.
-chef-expander is running

  • when trying to start chef-solr via the init script, it starts up and
    jetty binds to the port but solr isn’t working:

ps -ef | grep java

root 13287 1 0 21:42 ? 00:00:00 java -Xmx256M -Xms256M
-Dsolr.data.dir=/var/chef/solr/data -Dsolr.solr.home=/var/chef/solr
-jar /var/chef/solr-jetty/start.jar

But the logs reveal a problem (see the bottom). I’m guessing something
simple about my solr config is wrong. Hoping someone can help. The
server api and server webui will start up but solr returns a 404
whenever you try t hit it so they server can’t do much.

cat solr.rb

log_location STDOUT

solr_url “http://localhost:8983

supportdir = "/var/chef"
solr_jetty_path "/var/chef/solr-jetty"
solr_data_path "/var/chef/solr/data"
solr_home_path "/var/chef/solr"
solr_heap_size “256M”

You ran chef-solr-installer, yes? Does it fix anything if you run it again?


Dan DeLeo


#3

Yes I had run it before based on this:

http://wiki.opscode.com/display/chef/Upgrading+Chef+0.9.x+to+Chef+0.10.x#UpgradingChef0.9.xtoChef0.10.x-UpgradeSolr

Though this is a new install, not an upgrade. Just tried running it
again didn’t change the symptoms.

KC

[root@i-5-140-VM ~]# chef-solr-installer -u chef -g chef
Configuration setting solr_url is unknown and will be ignored
Configuration setting solr_heap_size is unknown and will be ignored
Configuration setting log_location is unknown and will be ignored

Chef Solr is already installed in /var/chef/solr
Do you want to overwrite the current install? All existing Solr data
will be lost. [y/n] y
Removing the existing Chef Solr installation
rm -rf /var/chef/solr
rm -rf /var/chef/solr-jetty
rm -rf /var/chef/solr/data
Creating Solr Home Directory
mkdir -p /var/chef/solr
entering /var/chef/solr
tar zxvf /usr/lib/ruby/gems/1.8/gems/chef-solr-0.10.0.rc.0/solr/solr-home.tar.gz
Creating Solr Data Directory
mkdir -p /var/chef/solr/data
chown -R chef:chef /var/chef/solr/data
Unpacking Solr Jetty
mkdir -p /var/chef/solr-jetty
entering /var/chef/solr-jetty
tar zxvf /usr/lib/ruby/gems/1.8/gems/chef-solr-0.10.0.rc.0/solr/solr-jetty.tar.gz
chown -R chef:chef /var/chef/solr-jetty

Successfully installed Chef Solr.
You can restore your search index using knife index rebuild

On Mon, Apr 18, 2011 at 9:27 AM, Daniel DeLeo dan@kallistec.com wrote:

On Friday, April 15, 2011 at 9:52 PM, KC Braunschweig wrote:

So I’ve been trying to go through the manual chef server setup with
0.10.0.rc0 using the gem install on RHEL 5.6 and hit a snag with solr.
-chef-expander is running

  • when trying to start chef-solr via the init script, it starts up and
    jetty binds to the port but solr isn’t working:

ps -ef | grep java

root 13287 1 0 21:42 ? 00:00:00 java -Xmx256M -Xms256M
-Dsolr.data.dir=/var/chef/solr/data -Dsolr.solr.home=/var/chef/solr
-jar /var/chef/solr-jetty/start.jar

But the logs reveal a problem (see the bottom). I’m guessing something
simple about my solr config is wrong. Hoping someone can help. The
server api and server webui will start up but solr returns a 404
whenever you try t hit it so they server can’t do much.

cat solr.rb

log_location STDOUT

solr_url “http://localhost:8983

supportdir = "/var/chef"
solr_jetty_path "/var/chef/solr-jetty"
solr_data_path "/var/chef/solr/data"
solr_home_path "/var/chef/solr"
solr_heap_size "“256M”

You ran chef-solr-installer, yes? Does it fix anything if you run it again?

Dan DeLeo


#4

Well this is partially resolved. It turns out that although I’d
installed java (sun jdk), it wasn’t properly linked into /usr/bin so
the app had been trying to use gcj which reports as java 1.4.2 (not
that it’d probably work anyway) and so it wasn’t loading jsp hence the
solr failure. A proper link to a proper java made it much happier.

So one more time running the chef solr installer, got everything
started and then ran knife index rebuild. No errors, however, I still
don’t seem to have a search index. For example, clicking on the search
environment link in the webui ought to return at least the _default
environment even if no others exist, but it returns nothing. Same with
the other indexes. Now I’m at a loss again.

As an aside, it looks like /usr/bin/chef-solr-rebuild is still in
0.10.0.rc.0 but it seems to be non-functional, I suspect due to a
change in the way that indexing happens with chef-expander now.

KC

On Mon, Apr 18, 2011 at 11:01 AM, KC Braunschweig
kcbraunschweig@gmail.com wrote:

Yes I had run it before based on this:

http://wiki.opscode.com/display/chef/Upgrading+Chef+0.9.x+to+Chef+0.10.x#UpgradingChef0.9.xtoChef0.10.x-UpgradeSolr

Though this is a new install, not an upgrade. Just tried running it
again didn’t change the symptoms.


#5

It would seem the index rebuild was ineffective. I’m able to create
new indexed data (for example a new data bag and data bag item) and it
appears in search as expected. So indexing of new data is happening.
It is just the rebuild of already existing data from the db isn’t
happening.

KC

On Mon, Apr 18, 2011 at 6:24 PM, KC Braunschweig
kcbraunschweig@gmail.com wrote:

Well this is partially resolved. It turns out that although I’d
installed java (sun jdk), it wasn’t properly linked into /usr/bin so
the app had been trying to use gcj which reports as java 1.4.2 (not
that it’d probably work anyway) and so it wasn’t loading jsp hence the
solr failure. A proper link to a proper java made it much happier.

So one more time running the chef solr installer, got everything
started and then ran knife index rebuild. No errors, however, I still
don’t seem to have a search index. For example, clicking on the search
environment link in the webui ought to return at least the _default
environment even if no others exist, but it returns nothing. Same with
the other indexes. Now I’m at a loss again.

As an aside, it looks like /usr/bin/chef-solr-rebuild is still in
0.10.0.rc.0 but it seems to be non-functional, I suspect due to a
change in the way that indexing happens with chef-expander now.

KC

On Mon, Apr 18, 2011 at 11:01 AM, KC Braunschweig
kcbraunschweig@gmail.com wrote:

Yes I had run it before based on this:

http://wiki.opscode.com/display/chef/Upgrading+Chef+0.9.x+to+Chef+0.10.x#UpgradingChef0.9.xtoChef0.10.x-UpgradeSolr

Though this is a new install, not an upgrade. Just tried running it
again didn’t change the symptoms.


#6

More info:

  • the expander claims to be doing something when knife index rebuild
    is run so maybe solr just isn’t picking it up? I can’t imagine that
    the queue takes that long given my dataset is like 2 items? From
    expander.log:

[Mon, 18 Apr 2011 18:47:01 -0700] INFO: indexed
api_client[aac1fd5e-7328-4dbf-9bd4-a22511562d17] database[chef]
transit,xml,solr-post | 1,0.000223159790039062,0.0704770088195801 |
[Mon, 18 Apr 2011 18:47:01 -0700] INFO: indexed
api_client[bba134cc-2398-4c12-9185-e8b07f0e5398] database[chef]
transit,xml,solr-post | 1,0.00023198127746582,0.00556087493896484 |
[Mon, 18 Apr 2011 18:47:01 -0700] INFO: indexed
data_bag_item[2d4219ff-7bf8-4fdd-8371-0515f7b985a4] database[chef]
transit,xml,solr-post | 1,0.000161886215209961,0.00438904762268066 |
[Mon, 18 Apr 2011 18:47:01 -0700] INFO: indexed
api_client[4642a78f-b721-47be-a973-253650860487] database[chef]
transit,xml,solr-post | 1,0.000188827514648438,0.00414490699768066 |
[Mon, 18 Apr 2011 18:47:01 -0700] INFO: indexed
data_bag[37f92149-2e3f-4c90-8fdf-6cfd2eaca1f6] database[chef]
transit,xml,solr-post | 1,0.000128030776977539,0.00445795059204102 |

Interestingly though, notice that above there is nothing indexed
related to environments. Likewise the output doesn’t mention them:

[chef@i-5-140-VM ~]$ knife index rebuild -y
Chef::ApiClient: success
Chef::DataBag: success
Chef::Node: success
Chef::Role: success

I wonder if the index rebuild function works at all and further if it
has been updated to take environments into account?

KC

On Mon, Apr 18, 2011 at 6:35 PM, KC Braunschweig
kcbraunschweig@gmail.com wrote:

It would seem the index rebuild was ineffective. I’m able to create
new indexed data (for example a new data bag and data bag item) and it
appears in search as expected. So indexing of new data is happening.
It is just the rebuild of already existing data from the db isn’t
happening.

KC

On Mon, Apr 18, 2011 at 6:24 PM, KC Braunschweig
kcbraunschweig@gmail.com wrote:

Well this is partially resolved. It turns out that although I’d
installed java (sun jdk), it wasn’t properly linked into /usr/bin so
the app had been trying to use gcj which reports as java 1.4.2 (not
that it’d probably work anyway) and so it wasn’t loading jsp hence the
solr failure. A proper link to a proper java made it much happier.

So one more time running the chef solr installer, got everything
started and then ran knife index rebuild. No errors, however, I still
don’t seem to have a search index. For example, clicking on the search
environment link in the webui ought to return at least the _default
environment even if no others exist, but it returns nothing. Same with
the other indexes. Now I’m at a loss again.

As an aside, it looks like /usr/bin/chef-solr-rebuild is still in
0.10.0.rc.0 but it seems to be non-functional, I suspect due to a
change in the way that indexing happens with chef-expander now.

KC

On Mon, Apr 18, 2011 at 11:01 AM, KC Braunschweig
kcbraunschweig@gmail.com wrote:

Yes I had run it before based on this:

http://wiki.opscode.com/display/chef/Upgrading+Chef+0.9.x+to+Chef+0.10.x#UpgradingChef0.9.xtoChef0.10.x-UpgradeSolr

Though this is a new install, not an upgrade. Just tried running it
again didn’t change the symptoms.


#7

Bugs logged against issues I’ve discovered while troubleshooting this:

http://tickets.opscode.com/browse/CHEF-2243
http://tickets.opscode.com/browse/CHEF-2244

On Mon, Apr 18, 2011 at 7:02 PM, KC Braunschweig
kcbraunschweig@gmail.com wrote:

More info:

  • the expander claims to be doing something when knife index rebuild
    is run so maybe solr just isn’t picking it up? I can’t imagine that
    the queue takes that long given my dataset is like 2 items? From

I wonder if the index rebuild function works at all and further if it
has been updated to take environments into account?

KC