Troubleshooting Elasticsearch Indices Creation Issue in Datahub Deployment on AWS

Original Slack Thread

Hello, I moved our POC datahub deployment to AWS-managed services (RDS, Opensearch, MSK)
But I’m getting the following error inside the upgrade job:
org.opensearch.OpenSearchStatusException: OpenSearch exception [type=index_not_found_exception, reason=no such index [datahubpolicyindex_v2]]
I’m running datahub v0.12.0
Any ideas? I’ve seen this error before but in those cases it was resolved by the datahub-update routine, not originating there.


I also made sure I had USE_AWS_ELASTICSEARCH=true set on the elasticsearch jobattachment

what is your deployment framework for datahub?
have copied your elastic search data to the new deployment (OpenSearch)
if not you may have run the restore indices job once

with Kubernets

We’re using helm on k8s. Since we are in POC I was just starting things with fresh DBs.

I just tried the restore indices and it does not solve the issue. My understanding was that this restored the content of the indices by republishing MAE events. It doesn’t seem to ensure the indices exist

Yes, restoring indices won’t create indices. you may have to run the elasticsearch-setup,|kafka-setup and mysql-setup

Those all run successfully but the indices aren’t created. I posted the elasticsearch-setup log above

with Helm deployment enable these respective sections

how about datahub-system-update-job job ?

That is the first error log

<@U0667UL20SD> you have shared datahubUpgrade logs (first one), not datahub-system-update-job
datahub-system-update-job is where elasticsearch indices are created

Sorry, the first log I posted is actually from the system update job. I named it based off of the docker image before I realized that multiple jobs used that image. I just re-ran my deployment and the datahub-system-update-job failed with that same error

Here is the full log. Pretty much the same as last time.

When I /_cat/indices/ on my opensearch cluster only 2 indices are there:

green open .kibana_1                  Eh6BSDbYSbemo6VLfpVaYQ 1 1 0 0 416b 208b
green open datahub_usage_event-000001 aJmlTza_Tr6mOQgDsiXihw 5 1 0 0  2kb  1kb```![attachment](

Yeah, somehow indices are not created, checking …

<@U0667UL20SD> It looks like the reason for the actual failure is

java.lang.RuntimeException: 30,000 milliseconds timeout on connection http-outgoing-0 [ACTIVE]
	at com.linkedin.datahub.upgrade.system.elasticsearch.steps.BuildIndicesStep.lambda$executable$0(
	at com.linkedin.datahub.upgrade.impl.DefaultUpgradeManager.executeStepInternal(
	at com.linkedin.datahub.upgrade.impl.DefaultUpgradeManager.executeInternal(
	at com.linkedin.datahub.upgrade.impl.DefaultUpgradeManager.executeInternal(
	at com.linkedin.datahub.upgrade.impl.DefaultUpgradeManager.execute(
	at org.springframework.boot.SpringApplication.callRunner(
	at org.springframework.boot.SpringApplication.callRunners(
	at com.linkedin.datahub.upgrade.UpgradeCliApplication.main(
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.base/java.lang.reflect.Method.invoke(
	at org.springframework.boot.loader.Launcher.launch(
	at org.springframework.boot.loader.Launcher.launch(
	at org.springframework.boot.loader.JarLauncher.main(
Caused by: 30,000 milliseconds timeout on connection http-outgoing-0 [ACTIVE]
	at org.opensearch.client.RestClient.extractAndWrapCause(
	at org.opensearch.client.RestClient.performRequest(
	at org.opensearch.client.RestClient.performRequest(
	at org.opensearch.client.RestHighLevelClient.internalPerformRequest(
	at org.opensearch.client.RestHighLevelClient.performRequest(
	at org.opensearch.client.RestHighLevelClient.performRequestAndParseEntity(
	at org.opensearch.client.IndicesClient.create(
	... 21 common frames omitted```
it indicates ElasticSearch is not responding to create index requests, you must be having some problem in ES, please take a look at ES logs when you running this deployment

That doesn’t fully make sense since the graph_service_v1 index is successfully created somehow. I’m also able to curl -XPUT &lt;eshost&gt;/test_index from the GMS pod to create a test index

Managed to pull this logattachment

What Opensearch version are you using?

Support for Openserach 2.x was only added recently, would check if that’s in availaable in v0.12.0

<@U05SKM6KGGK> I’m using the Elasticsearch_7.10 version on AWS Opensearch. Do you know if the USE_AWS_ELASTICSEARCH flag should still be set in that case?