Remote Reindex from a datastream to another index

Hi Guys,

we are trying to reindex some data (from another cluster) and ran into an issue.

POST _reindex
{
 "source": {
   "remote": {
     "host": "https://COOL_IP_ADDRESS:9200",
     "username": "elastic",
     "password": "SOME_SECURE_PASSWORD"
   },
   "index": "metricbeat-*",
   "query": {
     "match": {
       "agent.hostname": "SOME HOST"
     }
   }
 },
 "dest": {
   "index": "my-new-index-000001"
 }
}

The source index is a datastream and the destination index is NOT a datastream.

And now we are getting this error (after a few minutes):

{
  "completed": true,
  "task": {
    "node": "NEjfts3ESDSE0kCTCV-PiA",
    "id": 7168527,
    "type": "transport",
    "action": "indices:data/write/reindex",
    "status": {
      "total": 139415,
      "updated": 6966,
      "created": 60034,
      "deleted": 0,
      "batches": 67,
      "version_conflicts": 0,
      "noops": 0,
      "retries": {
        "bulk": 0,
        "search": 0
      },
      "throttled_millis": 0,
      "requests_per_second": -1,
      "throttled_until_millis": 0
    },
    "description": """reindex from [scheme=https host=SOME_COOL_IP port=9200 query={
  "match" : {
    "agent.hostname" : "SOME HOST"
  }
} username=elastic password=<<>>][metricbeat-*] to [my-new-index-000001]""",
    "start_time_in_millis": 1690984129116,
    "running_time_in_nanos": 844371922267,
    "cancellable": true,
    "cancelled": false,
    "headers": {
      "trace.id": "b7a238b67ab6d7a004b20243dd361c55"
    }
  },
  "response": {
    "took": 844366,
    "timed_out": false,
    "total": 139415,
    "updated": 6966,
    "created": 60034,
    "deleted": 0,
    "batches": 67,
    "version_conflicts": 0,
    "noops": 0,
    "retries": {
      "bulk": 0,
      "search": 0
    },
    "throttled": "0s",
    "throttled_millis": 0,
    "requests_per_second": -1,
    "throttled_until": "0s",
    "throttled_until_millis": 0,
    "failures": [
      {
        "index": ".ds-metricbeat-8.8.2-2023.07.17-000002",
        "shard": 0,
        "node": "k1bGnV4bT5WHBjJHZ0Ztsg",
        "status": 500,
        "reason": {
          **"type": "runtime_exception",**
**          "reason": "array_index_out_of_bounds_exception: arraycopy: length -9 is negative"**
        }
      }
    ]
  }
}

Any suggestions why we are getting this error or where the problem is?

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