Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Elastic search #1

Open
AyushRoy2001 opened this issue Nov 7, 2024 · 4 comments
Open

Error with Elastic search #1

AyushRoy2001 opened this issue Nov 7, 2024 · 4 comments

Comments

@AyushRoy2001
Copy link

Hi sir/ma'am,
I have been receiving an error regarding the elastic search. Can you please help me solve it?
The error: "ERROR:root:Unable to create Index in Elastic Search. Reason: TransportError(503, 'master_not_discovered_exception', None)"

This is received when I try to run:
cd data
wget -O elasticsearch-7.17.9.tar.gz https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.9-linux-x86_64.tar.gz # download Elasticsearch
tar zxvf elasticsearch-7.17.9.tar.gz
rm elasticsearch-7.17.9.tar.gz
cd elasticsearch-7.17.9
nohup bin/elasticsearch & # run Elasticsearch in background
cd ../..
python prep_elastic.py --data_path data/dpr/psgs_w100.tsv --index_name wiki # build index

@AyushRoy2001
Copy link
Author

Hi @Bocchi7 , please try to answer to my doubt. There is a shard error and the elastic search code is stuck at 0docs [01:00, ?docs/s].

@Bocchi7
Copy link
Owner

Bocchi7 commented Nov 9, 2024

I am sorry that I tried but failed to reproduce this error. You might have to provide more details about your error.

@AyushRoy2001
Copy link
Author

Hi, please see my elasticsearch node health,

{
"cluster_name" : "elasticsearch",
"status" : "red",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 2,
"active_shards" : 2,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 3,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 2,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 15,
"active_shards_percent_as_number" : 40.0
}

It shows red, can you please guide me on how to solve it? It was not red earlier and the code was running perfectly.

@Bocchi7
Copy link
Owner

Bocchi7 commented Nov 11, 2024

I am not familiar with the implementation of ElasticSearch. Thus, I cannot give any useful advice.
Since you said "the code was running perfectly", you might try to reinstall elasticsearch and create index again. Creating index might take a lot of time, but this waste of time can be, to a great extent, attributed to the poor implementation of the script. You might try to rewrite it to make it faster.
If you solve the problem in the end, welcome to show your solution here.
Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants