Sam Farmer

Growing up I never imagined I would play bass guitar for the Dave Matthews Band. And indeed it never happened.

Starting Solr for ColdFusion on a Mac

January 31, 2011

Here is a straightforward way to start Solr when running ColdFusion 9 on a Mac. If it is not running in the ColdFusion Administrator under Data & Services > ColdFusion Collections the following message will appear:

Unable to retrieve collections from any of the Search Services. Please verify that atleast one of ColdFusion Search Services is installed and running.

To get it running run the following two lines in Terminal:

cd /Applications/JRun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/solr ./cfsolr start

Thats for multi-instance installs for ColdFusion 9 standard install it will be:

cd /Applications/ColdFusion9/solr ./cfsolr start

Within seconds Solr will be up and running and collections will show on the page above.

(As a quick note don't delete core0 collection as its needed to get everything up and running.)


Thank you very much, Sam! I installed CF 9 multiserver and created a second instance of CF. I see the SOLR folder within the cfusion directory, but I don't see this folder within the second instance's directory. Does SOLR not get setup with each new CF instance created? Is it as simple as copying the folder over to the second instance's directory? Not certain what the best approach is. Any suggestions would be appreciated.

By: James Eisenlohr 04/14/2011 10:37 AM
@James The easiest thing to do is to have both instances point to the same solr server. That way they share the collections. In CF Admin, simply copy the Solr server info from the first instance and put it in the second.

By: Sam Farmer 04/17/2011 9:03 AM
One thing that tripped me up for quite a while this morning is that you MUST be in the solr directory when issuing the start and stop commands. Like Steven Erat says is the blog post below if you start it from any other location you're going to have an issue with finding start.jar, but that message will be suppressed and you will be led to believe solr is running. In my case I had an alias to cfsolr which I thought would allow me to start solr from any location.

By: Ryan Arneson 04/27/2011 1:10 PM
@Ryan Thanks for posting that.

By: Sam Farmer 04/30/2011 2:09 PM
FYI, solr must be started from WITHIN the solr/ directory. If you call the command from elsewhere, it will tell you it started (or stopped), but it's lying to you. You can fix the script to make it tell the truth:

By: Steven Erat 04/24/2012 4:31 PM
Well, you can see who posts before reading all the comments. :)

By: Steven Erat 04/24/2012 5:01 PM
Some comments have been lost over the years due to moving hosts.


More blog entries that I have written.

Code coloring by PRISM.