UnsupportedProductError is raised when connecting to OSS-only Elasticsearch distributions
See original GitHub issueElasticsearch version (bin/elasticsearch --version
): Using docker.elastic.co/elasticsearch/elasticsearch-oss:7.9.1
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" docker.elastic.co/elasticsearch/elasticsearch-oss:7.9.1
Then try connecting to it via the python connector
>>> import elasticsearch
>>> es = elasticsearch.Elasticsearch(hosts='http://localhost:9200/')
>>> es.info()
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/utils.py", 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/__init__.py", 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/transport.py", 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 elasticsearch:base.py:270 GET http://localhost:9200/ [status:200 request:0.003s]
INFO elasticsearch:transport.py:499 {'content-type': 'application/json; charset=UTF-8', 'content-length': '537'}
INFO elasticsearch:transport.py:500 {'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:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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:
We also see the same error when using containers: