Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB migration and elastic search #123

Open
bernji opened this issue Jul 9, 2015 · 0 comments
Open

DB migration and elastic search #123

bernji opened this issue Jul 9, 2015 · 0 comments

Comments

@bernji
Copy link

bernji commented Jul 9, 2015

Hi,

I am using the elastic search plugin. Everything okay so far.
Now, I wanted to initialize the db migration plugin as described here:
http://grails-plugins.github.io/grails-database-migration/docs/manual/guide/gettingStarted.html

the docs say that there might be some problems with the searchable plugin (which I ran into). The docs suggest that I need to disable the auto index on startup, run the migration and then manually trigger the index in the bootstrap.

This is my config of the ES:

development {
        elasticSearch.datastoreImpl = 'hibernateDatastore'
        elasticSearch.bulkIndexOnStartup = false
        elasticSearch.disableAutoIndex = true
        elasticSearch.client.mode = 'local'
        elasticSearch.index.store.type = 'memory' // store local node in memory and not on disk
        //elasticSearch.migration.strategy = 'delete'
    }

And in the bootstrap I call:

log.debug "Start indexing"
elasticSearchService.index()

log.debug "Flush Index"
elasticSearchAdminService.refresh()

BUT the plugin crashes in the first line (index) with this (not saying anything) error:

2015-07-09 16:49:31,029 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing the application: null
Message: null
    Line | Method
->>  305 | doCall                       in org.grails.datastore.gorm.GormStaticApi$_withCriteria_closure11
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    302 | execute                      in org.grails.datastore.mapping.core.DatastoreUtils
|     37 | execute . . . . . . . . . .  in org.grails.datastore.gorm.AbstractDatastoreApi
|    304 | withCriteria                 in org.grails.datastore.gorm.GormStaticApi
|    273 | doCall . . . . . . . . . . . in org.grails.plugins.elasticsearch.ElasticSearchService$_doBulkRequest_closure2_closure11
|    267 | doCall                       in org.grails.plugins.elasticsearch.ElasticSearchService$_doBulkRequest_closure2
|    251 | doBulkRequest . . . . . . .  in org.grails.plugins.elasticsearch.ElasticSearchService
|    158 | index                        in     ''
|    167 | index . . . . . . . . . . .  in     ''
|    163 | doCall                       in BootStrap$_closure1_closure3_closure5
|    340 | execute . . . . . . . . . .  in grails.util.Environment$EnvironmentBlockEvaluator
|    321 | executeForEnvironment        in grails.util.Environment
|    296 | executeForCurrentEnvironment in     ''
|    262 | run                          in java.util.concurrent.FutureTask
|   1145 | runWorker . . . . . . . . .  in java.util.concurrent.ThreadPoolExecutor
|    615 | run                          in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run . . . . . . . . . . . .  in java.lang.Thread
Error |
Forked Grails VM exited with error

I got the command from the docs... Can you give me a hint what to do or try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant