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
Ceiwh
January 18, 2023, 7:55am
2
same problem here! I wonder if you have found a solution already?
Dakan
February 2, 2023, 6:51am
3
Hi! the solution is launch ES:
from haystack.utils import launch_es
launch_es()
Before launching ES, we need to install docker to run ES locally, here the link to install docker
After Docker installed, we need to change permission to use it as $USER:
sudo usermod -aG docker $USER
sudo reboot
Thats all:)
1 Like
Hi,
After launch_es(), I saw the following error messages.
Can you help me for this problems.
Of course, I changed username using āusermodā
TypeError: create() got an unexpected keyword argument āmappingsā
#curl -X GET ālocalhost:9200/?prettyā
{
ānameā : āac91bb8c9894ā,
ācluster_nameā : ādocker-clusterā,
ācluster_uuidā : āZb5y5OaSQtGIuBVB-I3POQā,
āversionā : {
ānumberā : ā7.17.6ā,
ābuild_flavorā : ādefaultā,
ābuild_typeā : ādockerā,
ābuild_hashā : āf65e9d338dc1d07b642e14a27f338990148ee5b6ā,
ābuild_dateā : ā2022-08-23T11:08:48.893373482Zā,
ābuild_snapshotā : false,
ālucene_versionā : ā8.11.1ā,
āminimum_wire_compatibility_versionā : ā6.8.0ā,
āminimum_index_compatibility_versionā : ā6.0.0-beta1ā
},
ātaglineā : āYou Know, for Searchā
}
Thanks a lot in advance.