Comments (6)
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.
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.
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.
Me too ! I don't see why it doesn't work.
from elasticsearch-js.
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.
Ok, glad that it's fixed!
from elasticsearch-js.
Related Issues (20)
- bulk helper add onSuccess callback HOT 3
- Content-Type header being changed to "text/plain" from "application/json" somewhere in the process of publishing a document to self-hosted Elasticsearch HOT 5
- Global client context not passed to Transport in 7.13.0 HOT 1
- Support for ES|QL HOT 2
- enum and/or type guard for QueryDslTextQueryType HOT 1
- search_after with sort on nested fields HOT 1
- Redaction mechanism transform arrays properties into objects HOT 1
- Nuxt 3 compatibility HOT 2
- Using the `[]` chars for an enrich policy name isn't wrapped correctly on `deletePolicy` method HOT 1
- ProductNotSupportedError: The client noticed that the server is not a supported distribution of Elasticsearch HOT 1
- Add types for plugins HOT 2
- Error parsing undici module in Next.js 14 project HOT 3
- MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 product-check listeners added HOT 3
- test issue
- Always return statusCode property.
- Stack traces are not informative when using `HttpConnection` HOT 7
- Can't use asStream with body on v8 but docs say we can HOT 2
- Inserting geo_point value modifies index mapping HOT 1
- [ESQL] Version is a required field HOT 3
- Incorrect TypeScript typings for `function_score` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-js.