Controlling Solr with supervisord

A while ago I found a solution to run Solr with supervisord, without leaking java processes, which you get when you use the generated solr-instance script with supervisord.

You need something like this in your supervisord.conf:

directory = ${solr-instance:jetty-destination}/..
command = java -jar start.jar
autostart = true
autorestart = true

The key is the directory option. With that the command is executed in that directory, which starts Solr correctly and doesn’t leave java processes when stopping it with supervisord.

I discovered today that Solr, when used with collective.recipe.solrinstance, by default logs every query to stdout.

The solution is to change the command like the following:

command = java -Djava.util.logging.config.file=${buildout:directory}/etc/ -jar start.jar

Now you just need to add the file with something like this as content:

# Default global logging level:
.level = WARNING
Published in: on September 11, 2009 at 8:10 pm  Comments (2)