tracker issue : CF-3037119

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 74680:There's a bug in the cfsolr start script that causes SOLR to appear launched when it's really not

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Jared Rypka-Hauer / Jared Rypka-Hauer (Jared Rypka-Hauer)

Created: 12/22/2008

Components: Text Search, Solr

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 221736

Priority/Frequency: Major / Unknown

Locale/System: English / Mac 10 All

Vote Count: 1

Problem:

There's a bug in the cfsolr start script that causes SOLR to appear launched when it's really not. The startsolr() function doesn't check for an existing folder before checking to see if start.jar is a valid executable binary file. I filed this as critical because the script has no failover and wasn't showing any kind of error message. IF the condition is met, the service is unusable without modifying the shell script.

I discovered this bug because the installer put the ColdFusionSolrSearchService folder in / and I moved it to a different location. Doing so broke the path referenced in the shell script and the service looked like it was starting but never did. I had to edit the file and change the path to match the correct new location for the cfsolr shell script, then edited the startsolr() function to check for the directory before launching.

If the SOLR directory is invalid, there's no error message but the SOLR service never starts. The startsolr() function should look something like this instead:

# Run the K2 admin start script
# Jared Rypka-Hauer: Modified to check for a valid path before trying to run the start command
solrstart()
{
        solrrunning
        
        if [ "$IS_RUNNING" = "true" ]; then
           echo "ColdFusion Solr is already running or the port is not free"
           echo exiting
           exit 2
        fi

		if [ ! -d $SOLR -a ! -x $SOLR/start.jar ]; then
			echo "$SOLR is not a directory or missing start.jar."
			echo exiting
			exit 2
		fi

        echo "Starting ColdFusion Solr Server..."
		eval $SOLRSTART >> $SOLR/logs/start.log 2>&1 &
        echo "ColdFusion Solr Server is starting up and will be available shortly."
        
}
Method:

edit ColdFusionSolrSearchService and change line 9 to an invalid folder, save it, and execute it. No error message is seen, just the notification that the service is starting and should be available soon.

Changing the code to the above will check for the directory, then for start.jar, and if either is invalid the error will be shown.
Result:

There is no error message.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3037119

External Customer Info:
External Company:  
External Customer Name: Jared Rypka-Hauer
External Customer Email: 08C411A143BC38A7992016B6
External Test Config: 12/22/2008

Attachments:

Comments:

issue where SOLR service doesn't automatically start even though it's configured to automatically start - however, it reports that it has started successfully when it has not. have to manually stop and start server.
Vote by External U.
24350 | November 10, 2011 07:10:10 PM GMT