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.

UnsupportedProductError is raised when connecting to OSS-only Elasticsearch distributions

See original GitHub issue

Elasticsearch version (bin/elasticsearch --version): Using

elasticsearch-py version (elasticsearch.__versionstr__): 7.14.0a1

Description of the problem including expected versus actual behavior:

The transport _do_verify_elasticsearch function returns false, preventing the use of the elasticsearch API since the transport refuses to talk to ES.

Steps to reproduce:

Start a 7.9.1 docker container

 docker run --rm --name es -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node"

Then try connecting to it via the python connector

>>> import elasticsearch
>>> es = elasticsearch.Elasticsearch(hosts='http://localhost:9200/')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/.pyenv/versions/3.8.10/envs/proj/lib/python3.8/site-packages/elasticsearch/client/", line 168, in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
  File "/home/user/.pyenv/versions/3.8.10/envs/proj/lib/python3.8/site-packages/elasticsearch/client/", line 294, in info
    return self.transport.perform_request(
  File "/home/user/.pyenv/versions/3.8.10/envs/proj/lib/python3.8/site-packages/elasticsearch/", line 413, in perform_request
    raise NotElasticsearchError(
elasticsearch.exceptions.NotElasticsearchError: The client noticed that the server is not Elasticsearch and we do not support this unknown product

Logging the args given to _verify_elasticsearch contains the following information

INFO GET http://localhost:9200/ [status:200 request:0.003s]
INFO {'content-type': 'application/json; charset=UTF-8', 'content-length': '537'}
INFO {'name': 'df9e379eabf8', 'cluster_name': 'docker-cluster', 'cluster_uuid': 'NMWmEyckTqK2UMKgVM_zCA', 'version': {'number': '7.9.1', 'build_flavor': 'oss', 'build_type': 'docker', 'build_hash': '083627f112ba94dffc1232e8b42b73492789ef91', 'build_date': '2020-09-01T21:22:21.964974Z', 'build_snapshot': False, 'lucene_version': '8.6.2', 'minimum_wire_compatibility_version': '6.8.0', 'minimum_index_compatibility_version': '6.0.0-beta1'}, 'tagline': 'You Know, for Search'}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

philkracommented, Jul 20, 2021

Thank you for the feedback about the compatibility of the README. We are addressing the wording to mitigate confusion.

Elastic’s recommendation is to upgrade the server first, then the client. Which entails a forward compatible of the language clients. The following paragraph is defined in docs of the HLRC:

The High Level Client is guaranteed to be able to communicate with any Elasticsearch node running on the same major version and greater or equal minor version. It doesn’t need to be in the same minor version as the Elasticsearch nodes it communicates with, as it is forward compatible meaning that it supports communicating with later versions of Elasticsearch than the one it was developed for.

lnielsencommented, Jul 15, 2021

We also see the same error when using containers:

~$ curl
  "name" : "60865ffac484",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "eCYk6HMBSOu9jznjKXipzw",
  "version" : {
    "number" : "7.10.2",
    "build_flavor" : "oss",
    "build_type" : "docker",
    "build_hash" : "747e1cc71def077253878a59143c1f785afa92b9",
    "build_date" : "2021-01-13T00:42:12.435326Z",
    "build_snapshot" : false,
    "lucene_version" : "8.7.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  "tagline" : "You Know, for Search"
Read more comments on GitHub >

github_iconTop Results From Across the Web

Elasticsearch::UnsupportedProductError (The client noticed ...
Elasticsearch::UnsupportedProductError is raised when your Elasticsearch server version don't match with Ruby's Elasticsearch client ( gem ...
Read more >
[Elasticsearch] The Server Is Not A Supported Distribution Of ...
raise UnsupportedProductError (message) elasticsearch.exceptions.UnsupportedProductError: The client noticed that the server is not a ...
Read more >
7.14 Release notes | Elasticsearch Ruby Client [8.5] | Elastic
If the client isn't connected to a supported Elasticsearch cluster the UnsupportedProductError exception will be raised. This release changes the way in ...
Read more >
Exceptions & Warnings - Python Elasticsearch Client
UnsupportedProductError (message: str, meta: elastic_transport. ... Error which is raised when the client detects it's not connected to a supported product.
Read more >
OpenSearch Client Java & Python APIs - OpenDistro
The Elasticsearch Python client just got a product check built-in, ... is raised when connecting to OSS-only Elasticsearch distributions ...
Read more >

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 Post

No results found

github_iconTop Related Hashnode Post

No results found