Skip to content

Elasticsearch With Haystack -Initial connection to Elasticsearch failed #39

@ShabRa1365

Description

@ShabRa1365

Hi

I am trying to run Chapter 7 to learn about Haystack for QA:

I am using Jupyter Notebook which is connected to my GCP VM : Debian GNU/Linux 9, Tesla V100
I did install debian version
but facing the following error : ConnectionError: Initial connection to Elasticsearch failed. Make sure you run an Elasticsearch instance at [{'host': 'localhost', 'port': 9200}] and that it has finished the initial ramp up (can take > 30s).


!wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.1.2-linux-x86_64.tar.gz
!wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.1.2-linux-x86_64.tar.gz.sha512
!shasum -a 512 -c elasticsearch-8.1.2-linux-x86_64.tar.gz.sha512
!tar -xzf elasticsearch-8.1.2-linux-x86_64.tar.gz
!cd elasticsearch-8.1.2/
!pip install pymilvus
import pymilvus
import os
from subprocess import Popen, PIPE, STDOUT

!chown -R daemon:daemon elasticsearch-8.1.2
es_server = Popen(args=['elasticsearch-8.1.2/bin/elasticsearch'])
!sleep 30

from haystack.document_store.elasticsearch import ElasticsearchDocumentStore

#document_store = ElasticsearchDocumentStore(host='localhost', port= 9201, username='', password='')
document_store = ElasticsearchDocumentStore(return_embedding=True)

I would appreciate your support on this.

Shabnam

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions