Troubleshoot null_pointer_exception during remote reindexing in OpenSearch VPC domains

2 minute read
Content level: Advanced
2

The goal of this article is to explain how to resolve "null_pointer_exception" seen during remote reindexing in OpenSearch VPC domains. The article also discusses an actual customer issue, its investigation and resolution.

Remote reindex allows you to copy indices from one Amazon OpenSearch Service domain to another. You can migrate indices from any OpenSearch Service domains or self-managed OpenSearch and ElasticSearch domains.

Notes:

  • A remote domain and index refers to the source of the data, or the domain and index that you want to copy data from.
  • A local domain and index refers to the target for the data, or the domain and index that you want to copy data to.

 

Scenario:

When performing remote reindex, the below error is seen:

{
  "error": {
    "root_cause": [
      {
        "type": "null_pointer_exception",
        "reason": null
      }
    ],
    "type": "null_pointer_exception",
    "reason": null
  },
  "status": 500
}

Even if the _source is set to enabled:true, the issue persists.

 

Reason:

null_pointer_exception is seen when there is no proxy in front of the remote domain.

A proxy is needed in front of the remote domain to be able to reindex it to the local domain from which the request is issued. Even if both the domains are in the same VPC, the request when trying to reach the remote host, is considered to be external and does not resolve / authenticate to reach the remote domain. Hence a proxy in front is needed.

If this is already setup, make sure the proxy domain must have a certificate signed by a public certificate authority (CA). Self-signed or private CA-signed certificates are not supported.

 

—— Reference ——  

Migrating Amazon OpenSearch Service indexes using remote reindex - https://docs.aws.amazon.com/opensearch-service/latest/developerguide/remote-reindex.html