node.js - mongoosesastic no living connection -


i'm trying insert mongoose scheme elasticsearch mongoosastic gives me { [error: no living connections] message: 'no living connections' }

my mongoose schema:

var mongoose = require( 'mongoose' ); var schema = mongoose.schema; var mongoosastic = require('mongoosastic'); var productschema = new schema( {    ----huge load of json---- });  productschema.plugin(mongoosastic,{host:'xxx.xxx.xxx.xxx:9200',curldebug: true});  mongoose.model('product', productschema);  var product = mongoose.model('product'); product.createmapping(function(err, mapping){ if(err){     console.log('error creating mapping (you can safely ignore this)');     console.log(err); }else{     console.log('mapping created!');     console.log(mapping); } }); module.exports = product; 

i can curl elasticsearch server, no issue there

fixed passing ip in array

productschema.plugin(mongoosastic,{ hosts: [     'xxx.xxx.xxx.xxx:9200'  ] }); 

must bug in mongoosastic


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -