loopbackio / loopback-connector-elastic-search

Strongloop Loopback connector for Elasticsearch
MIT License
78 stars 57 forks source link

The client noticed that the server is not a supported distribution of Elasticsearch #140

Closed enimakherratia closed 2 years ago

enimakherratia commented 2 years ago

Maintainers' Note: This question has been posted elsewhere:

I'm using @elastic/elasticsearch version ^7.5.0 and Node 10.24.1. Everything worked fine, until I redeploy my backend and since then I'm getting the following error:

The client noticed that the server is not a supported distribution of Elasticsearch

achrinza commented 2 years ago

This was a silent breaking change from Elastic's end. AWS has since created OpenSearch client forks.

See:

A trivial fix would be to pin the v7 dependency version in this package to a known working version (see: https://opensearch.org/docs/clients/index/#opensearch-client-compatibility).

This may not be possible, as it'll break semver rules. Will see if we can intrrdouce the OpenSearch v7 client as another option for the "version" connector setting.

However, we're currently in the midst of migrating CI infrastructures and this repo doesn't have active CI pipelines yet, so this will be blocked until the CI pipelines are migrated.

enimakherratia commented 2 years ago

any update?

achrinza commented 2 years ago

It's in my backlog, but no new updates to give. Will try to timebox by the end of the week if the CI migration goes smoothly. No promises at the moment though.

If its urgent, feel free to fork and pin the Elastic Search client v7 version as per-https://github.com/loopbackio/loopback-connector-elastic-search/issues/140#issuecomment-925816337.

achrinza commented 2 years ago

Unfortunately I have not had the time to work on this repo.

For those looking for an immediate solution:

NPM v8

NPM CLI v8.3.0 onwards support overrides.

In package.json, add the following:

"overrides": {
  "loopback-connector-elastic-search": {
    "es7": "@elastic/elasticsearch@7.13.0"
}

I've opened https://github.com/loopbackio/loopback-connector-elastic-search/issues/146 to track bringing this repo up to speed.