question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

parseError with elasticsearh-js 13.0.1

See original GitHub issue

We are using elasticsearch 2.4.0. We started facing memory issues with elasticsearch-js client version 12.1. We saw some known issues related to memory and we switched to elasticsearch -js issues 13.0.1

Node version used is 6.2.0

const elasticSearchClient = elasticSearch.Client({
    host: config.endpoints.elasticsearch, apiVersion: "2.4",
    maxRetries: 5, requestTimeout: 15000, deadTimeout: 30000, keepAlive: true
});

After switching we are getting this exception for search calls

Elasticsearch ERROR: 2017-05-17T12:19:21Z
  Error: Request error, retrying
  POST http://elasticsearch:9200/products/product/_search?q=id%3A2672789668 => Parse Error
      at Log.error (/home/app/node_modules/elasticsearch/src/lib/log.js:225:56)
      at checkRespForFailure (/home/app/node_modules/elasticsearch/src/lib/transport.js:246:18)
      at HttpConnector.<anonymous> (/home/app/node_modules/elasticsearch/src/lib/connectors/http.js:157:7)
      at ClientRequest.bound (/home/app/node_modules/elasticsearch/node_modules/lodash/dist/lodash.js:729:21)
      at emitOne (events.js:101:20)

Not sure what this exception exactly means. Is it because of incompatible versions ( is 2.4.0 not compatible with 13.0.1)?

Response much appreciated. Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
spalgercommented, May 23, 2017

@Lakshmihm That Parse Error is coming from node.js, which means that node is unable to communicate with Elasticsearch for some reason.

Can you please verify that you can connect to elasticsearch from that machine using curl? Does this happen every time you use the search API? Are you using any other API methods?

0reactions
delvedorcommented, Jan 12, 2022

Hello @hashika2, the legacy client is no longer maintained, I strongly recommend migrating to the new one! Take a look here to understand what’s changed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found