Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dump ended with error (set phase) => Error: read ECONNRESET

I am using elasticdump to dump data from local machine to the server. But my dumps always ended with this error:

...

Tue, 20 Oct 2015 22:56:35 GMT | sent 100 objects to destination elasticsearch, wrote 100

Tue, 20 Oct 2015 22:56:35 GMT | got 100 objects from source elasticsearch (offset: 21200)

Tue, 20 Oct 2015 22:56:36 GMT | Error Emitted => read ECONNRESET

Tue, 20 Oct 2015 22:56:36 GMT | Total Writes: 21200

Tue, 20 Oct 2015 22:56:36 GMT | dump ended with error (set phase) => Error: read ECONNRESET

...

How should I solve this problem? Is there a better way to dump data from local machine to the server? Thanks in advance!

like image 652
Ivy Avatar asked Sep 16 '25 00:09

Ivy


1 Answers

It sounds like your issue is being caused by the elasticdump opening too many sockets to your elasticsearch cluster. You can use the --maxSockets option to limit the number of sockets opened.

For example:

$ elasticdump --input http://192.168.2.222:9200/index1 --output http://192.168.2.222:9200/index2 --type=data --maxSockets=5

You can find a detailed explanation of the issue here: https://github.com/taskrabbit/elasticsearch-dump/issues/98

like image 199
Dennis F. O'Connor Avatar answered Sep 19 '25 06:09

Dennis F. O'Connor