Opensearch: connection error 401

Level 2
Opensearch: connection error 401

Hi all,


We have Opensearch setup in a cluster and when I try to setup a connection to it from Dataiku, I get the error

Connection Error: Server didn't answer 200 but 401: Unauthorized

I have tried all the possible dialects but I still get the same error.

Is it not possible to use the Dataiku Elastic search driver to connect to opensearch or is there an issue with our setup?

I can connect to Opensearch from the Dataiku host using curl

curl -u user:password 
  "name" : "opensearch-cluster-master-0",
  "cluster_name" : "opensearch-cluster",
  "cluster_uuid" : "****",
  "version" : {
    "distribution" : "opensearch",
    "number" : "2.4.0",
    "build_type" : "tar",
    "build_hash" : "744ca260b892d119be8164f48d92b8810bd7801c",
    "build_date" : "2022-11-15T04:42:29.671309257Z",
    "build_snapshot" : false,
    "lucene_version" : "9.4.1",
    "minimum_wire_compatibility_version" : "7.10.0",
    "minimum_index_compatibility_version" : "7.0.0"
  "tagline" : "The OpenSearch Project:"

Opensearch version: 2.4.0

Dataiku version: 11.1.1

Operating system used: Linux

0 Kudos
2 Replies

Hi, I will suggest you use the OpenSearch low level Python client to connect from Dataiku. You will need to install the opensearch-py package in the Python code environment. Then either use Jupyter Notebook or a Python Recipe. There are some good examples in the OpenSearch low level Python client documentation:

The OpenSearch low-level Python client (opensearch-py) provides wrapper methods for the OpenSearch REST API so that you can interact with your cluster more naturally in Python. If you need to expose this system wide you could develop a Dataiku Python plugin.

Level 2

Hi Turribeach,

Thank you very much for the workaround. Does this mean that the Dataiku Elastic search connector is not compatible with Opensearch? It would be nicer to be able to create datasets from Opensearch and to have the additional features and recipes, I would also prefer to not create Opensearch users for my Dataiku users.

0 Kudos