Connection timed out when remote cluster re-indexing

Getting Connection timed out error while re-indexing data from old cluster to new cluster.

curl: (28) Failed to connect to elasticsearchurl port 9200: Connection timed out

We are using curl command like this


curl -X POST "https://destination_cluster_url:9200/_reindex?pretty" -H 'Content-Type: application/json' -d'
{
  "source": {
    "remote": {
      "host": "https://source_cluster_host:9200"
    },
    "index": "old_index"
       
  },
  "dest": {
    "index": "new_index"
  }
}

Do we need to make additional configuration??

Have a look at the wait_for_complete option.

I have not tried but its default value is true correct??

`wait_for_completion`

(Optional, Boolean) If `true` , the request blocks until the operation is complete. Defaults to `true` .

tried but no luck

Yes. Set it to false.

getting

"error" : {
    "type" : "null_pointer_exception",
    "reason" : null
  }

You probably have a full error message in the logs. Please share it, please share the full request and the full response as well.

I think we are not able to connect Elasticsearch cluster with port number(default 9200)? Do we really need it?I have only url of the cluster?

Here is request/response something like

Request :

 curl -X POST "https://vpc-new-cluster-url:443/_reindex?wait_for_completion=false&pretty" -H 'Content-Type: application/json' -d'
{
  "source": {
    "remote": {
      "host": "https://vpc-old-cluster-url:443"
    },
    "index": index0"
  },
  "dest": {
    "index": "index000001"
  }
}
'

Response {
"task" : "taskid2321"
}

Task Details using /_tasks/{taskid}

{
  "completed" : true,
  "task" : {
    "node" : "...",
    "id" : 3232,
    "type" : "transport",
    "action" : "indices:data/write/reindex",
    "status" : {
      "total" : 0,
      "updated" : 0,
      "created" : 0,
      "deleted" : 0,
      "batches" : 0,
      "version_conflicts" : 0,
      "noops" : 0,
      "retries" : {
        "bulk" : 0,
        "search" : 0
      },
      "throttled_millis" : 0,
      "requests_per_second" : -1.0,
      "throttled_until_millis" : 0
    },
    "description" : "...",
    "start_time_in_millis" : 1648449610121,
    "running_time_in_nanos" : 5070569,
    "cancellable" : true,
    "headers" : { }
  },
  "error" : {
    "type" : "null_pointer_exception",
    "reason" : null
  }
}

What are the full Elasticsearch logs?

Can you please help me where we can find it?

Did anyone get a chance to look into this?

Please be patient in waiting for responses to your question and refrain from pinging multiple times asking for a response or opening multiple topics for the same question. This is a community forum, it may take time for someone to reply to your question. For more information please refer to the Community Code of Conduct specifically the section "Be patient". Also, please refrain from pinging folks directly, this is a forum and anyone that participates might be able to assist you.

If you are in need of a service with an SLA that covers response times for questions then you may want to consider talking to us about a subscription.

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

It depends on your OS. But the documentation will tell you.

For example: Install Elasticsearch with Debian Package | Elasticsearch Guide [8.1] | Elastic tells that logs should be in /var/log/elasticsearch.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.