Coder Social home page Coder Social logo

crash connection_pool about elasticsearch-js HOT 6 CLOSED

elastic avatar elastic commented on July 22, 2024
crash connection_pool

from elasticsearch-js.

Comments (6)

spalger avatar spalger commented on July 22, 2024

Can you provide me some details about your environment? OS, Node version, and elastiicsearch version?

I just ran this:

'use strict';
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({ log: 'trace' });

setTimeout(function () {
  client.close();
}, 1000);

and after 1 second the process closed.

Can you try deleting the ./node_modules/elasticsearch directory and then run npm update elasticsearch?

from elasticsearch-js.

hepr avatar hepr commented on July 22, 2024

Hi,

I had deleted ./node_modules/elasticsearch et run npm update elasticsearch

My version

  • Os : linux debian 7.0 64bits kernel 3.8.0-34
  • Nodejs : 0.10.24
  • elasticsearch :
    "ok" : true,
    "status" : 200,
    "name" : "Beetle II",
    "version" : {
    "number" : "0.90.10",
    "build_hash" : "0a5781f44876e8d1c30b6360628d59cb2a7a2bbb",
    "build_timestamp" : "2014-01-10T10:18:37Z",
    "build_snapshot" : false,
    "lucene_version" : "4.6"
    },
    "tagline" : "You Know, for Search"
    }

I modify my program to add :

setTimeout(function () {
client.close();
}, 1000);

I run it :

Elasticsearch INFO: 2014-01-26T00:59:05Z
Adding connection to http://localhost:9200/

/var/www/speedealing/nodejs/node_modules/elasticsearch/src/lib/connection_pool.js:284
if (!connection.id) {
^
TypeError: Cannot read property 'id' of undefined
at ConnectionPool.removeConnection (/var/www/speedealing/nodejs/node_modules/elasticsearch/src/lib/connection_pool.js:284:18)
at ConnectionPool.setHosts (/var/www/speedealing/nodejs/node_modules/elasticsearch/src/lib/connection_pool.js:322:10)
at new Transport (/var/www/speedealing/nodejs/node_modules/elasticsearch/src/lib/transport.js:66:25)
at Object.EsApiClient (/var/www/speedealing/nodejs/node_modules/elasticsearch/src/lib/client.js:49:22)
at new Client (/var/www/speedealing/nodejs/node_modules/elasticsearch/src/lib/client.js:60:10)
at Object. (/var/www/speedealing/nodejs/app/routes/elasticsearch.js:8:27)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
26 Jan 01:59:05 - [nodemon] app crashed - waiting for file changes before starting...

from elasticsearch-js.

spalger avatar spalger commented on July 22, 2024

Okay, I'm totally stumped. There must be something else going on in your script. Could you please share any additional details that you can? Feel free to email me at [email protected]

from elasticsearch-js.

hepr avatar hepr commented on July 22, 2024

Me too ! I don't see why it doesn't work.

from elasticsearch-js.

hepr avatar hepr commented on July 22, 2024

I found the problem. It's a conflit with an old module that was included in a other file.
I remove it and it's ok.

Thanks for your help

from elasticsearch-js.

spalger avatar spalger commented on July 22, 2024

Ok, glad that it's fixed!

from elasticsearch-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.