Title:
Bug 82291:The cfsolr script for Mac, Linux, and Unix is written such that you must be in the ColdFusion9/solr/ directory when running the script
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Steven Erat / Steven Erat (StevenErat)
Created: 03/01/2010
Components: Text Search, Solr
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 272778
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
The cfsolr script for Mac, Linux, and Unix is written such that you must be in the ColdFusion9/solr/ directory when running the script. The script refers to the startup.jar file without providing the full path. The problem is that if you are not in the solr/ directory, the cfsolr script echos that Solr has been started or stopped, even though it has not. Since the standard error is redirected to the standard out with "2>&1" the problem is swallowed.Example:SOLRSTART='nohup java $JVMARGS -jar start.jar > $SOLR/logs/start.log 2>&1 &'SOLRSTOP='nohup java $JVMARGS -jar start.jar --stop > $SOLR/logs/start.log 2>&1'Looking at the logs, I see that the problem was quietly recorded:QAs-iMac:logs QA$ pwd/opt/ColdFusion901/solr/logsQAs-iMac:logs QA$ cat start.log Unable to access jarfile start.jarThe script already has a variable defining the Solr directory path:SOLR="/opt/ColdFusion9/solr"To fix the bug, prefix the reference to startup.jar with ${SOLR}/startup.jar like this:SOLRSTART='nohup java $JVMARGS -jar ${SOLR}/start.jar > $SOLR/logs/start.log 2>&1 &'SOLRSTOP='nohup java $JVMARGS -jar ${SOLR}/start.jar --stop > $SOLR/logs/start.log 2>&1'With that fix, the cfsolr script can be called from any directory outside the solr directory.Example of echoing falsely that the solr server has stopped or started:---------------------------------QAs-iMac:opt QA$ pwd/optQAs-iMac:opt QA$ ./ColdFusion9/bin/coldfusion stopStopping ColdFusion 9, please waitStopping coldfusion server.stoppedColdFusion 9 has been stoppedQAs-iMac:opt QA$ ps -ef | grep solr 501 73310 1 0 0:00.25 ?? 0:02.64 /usr/bin/java -XX:+AggressiveOpts -XX:+ScavengeBeforeFullGC -XX:-UseParallelGC -Xmx256m -Dsolr.solr.home=multicore -DSTOP.PORT=8079 -DSTOP.KEY=cfsolrstop -jar start.jar------------------------QAs-iMac:opt QA$ ./ColdFusion9/solr/cfsolr startStarting ColdFusion Solr Server...ColdFusion Solr Server is starting up and will be available shortly.QAs-iMac:opt QA$ ps -ef | grep solr 501 78371 62961 0 0:00.00 ttys000 0:00.00 grep solrQAs-iMac:opt QA$ ps -ef | grep solr 501 78373 62961 0 0:00.00 ttys000 0:00.00 grep solrQAs-iMac:opt QA$ ps -ef | grep solr
Method:
Result:
No Error Message
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041049
External Customer Info:
External Company:
External Customer Name: Steven Erat
External Customer Email: 722B2D4444633DB6992016B6
External Test Config: 03/01/2010
Attachments:
Comments: