3

I'm using in my grails 1.3.7 project the searchable plugin. My project was running well until my macbooks harddrive was full and osx threw an message about memory problems and that it'll delete some files (tmp and so on) (after that i deleted some movies and got more than 10GB free space). I didn't change the sourcecode but when i start my grails app now, i get the following exception:

Running Grails application..
Configuring Spring Security ...
Configuring SpringSocial Facebook
2011-11-18 01:54:16,804 [main] ERROR context.GrailsContextLoader  - Error executing        bootstraps: Failed to retrieve transaction locks; nested exception is java.io.IOException:    Permission denied
org.compass.core.engine.SearchEngineException: Failed to retrieve transaction locks; nested exception is java.io.IOException: Permission denied
java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:883)
at org.apache.lucene.store.SimpleFSLock.obtain(SimpleFSLockFactory.java:144)
at org.apache.lucene.store.Lock.obtain(Lock.java:73)
at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager$6.doInTransaction(DefaultLuceneSearchEngineIndexManager.java:203)
at org.compass.core.impl.DefaultCompass$CompassTransactionContext.execute(DefaultCompass.java:423)
at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager.doOperate(DefaultLuceneSearchEngineIndexManager.java:197)
at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager.doReplaceIndex(DefaultLuceneSearchEngineIndexManager.java:266)
at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager.replaceIndex(DefaultLuceneSearchEngineIndexManager.java:261)
at org.compass.gps.impl.SingleCompassGps.doIndex(SingleCompassGps.java:118)
at org.compass.gps.impl.AbstractCompassGps.index(AbstractCompassGps.java:154)
at org.compass.gps.impl.AbstractCompassGps.index(AbstractCompassGps.java:128)
at grails.plugin.searchable.internal.compass.CompassGpsUtils.index(CompassGpsUtils.java:49)
at grails.plugin.searchable.internal.compass.CompassGpsUtils$index.call(Unknown Source)
at SearchableGrailsPlugin$_closure3.doCall(SearchableGrailsPlugin.groovy:158)
at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:212)
at grails.web.container.EmbeddableServer$start.call(Unknown Source)
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158)
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy)
at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116)
at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
at RunApp$_run_closure1.doCall(RunApp:33)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Application context shutting down...
Application context shutdown.

I think there is a problem with the lucene index in filesystem, but where can i find it? Where is the lucene index folder or file stored? I didn't change the plugins configuration.

whitenexx
  • 1,350
  • 2
  • 25
  • 53

3 Answers3

0

It looks like some kind of Unix/OS X permissions issue. When Searchable/Lucene starts up and tries to create an index, the first thing it does is create a lock file in the index directory. From your stack trace this looks to be what is failing.

The Searchable.groovy file is where the index path is defined; it's possible that it has been overridden in the environment block, possibly even in Config.groovy.

grails run-app runs Grails as your user, so the problem doesn't have anything to do with Tomcat running as a different user.

Ken Liu
  • 22,503
  • 19
  • 75
  • 98
0

According the the default conf file

/**
 * The location of the Compass index
 *
 * Examples: "/home/app/compassindex", "ram://app-index" or null to use the default
 *
 * The default is "${user.home}/.grails/projects/${app.name}/searchable-index/${grails.env}"
 */

So unless you have changed it (you say you haven't), I'd have a look in

~/.grails/projects/${app.name}/searchable-index/${grails.env}
tim_yates
  • 167,322
  • 27
  • 342
  • 338
  • I haven't changed it and i already looked into that path, it doesn't exist and doesn't get created while starting my app. So where could the problem be? – whitenexx Nov 20 '11 at 18:02
0

With my tomcat installation is in ${user.home}/.grails/projects/${app.name}/searchable-index , remember that the tomcat process probably is running under a different user than yours, so I ran "sudo nautilus" to be able to see it