Question - Deployed Datahub via Helm charts on EKS...
# all-things-deployment
h
Question - Deployed Datahub via Helm charts on EKS Cluster -Getting the following error when clicking on Analytics on top right
Suppressed: org.elasticsearch.client.ResponseException: method [POST], host [<hostname>:443], URI [/demo_datahub_usage_event/_search?typed_keys=true&max_concurrent_shard_requests=5&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&ignore_throttled=true&search_type=query_then_fetch&batched_reduce_size=512&ccs_minimize_roundtrips=true], status line [HTTP/1.1 400 Bad Request]
Copy code
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [browserId] in order to load field data by uninverting the inverted index. Note that this can use significant memory."
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards failed",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "index": "demo_datahub_usage_event",
        "node": "abc",
        "reason": {
          "type": "illegal_argument_exception",
          "reason": "Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [browserId] in order to load field data by uninverting the inverted index. Note that this can use significant memory."
        }
      }
    ],
    "caused_by": {
      "type": "illegal_argument_exception",
      "reason": "Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [browserId] in order to load field data by uninverting the inverted index. Note that this can use significant memory.",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [browserId] in order to load field data by uninverting the inverted index. Note that this can use significant memory."
      }
    }
  },
  "status": 400
}
at org.elasticsearch.client.RestClient.convertResponse(RestClient.java:302)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:272)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:246)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1613)
... 21 common frames omitted
Caused by: org.elasticsearch.ElasticsearchException: Elasticsearch exception [type=illegal_argument_exception, reason=Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [browserId] in order to load field data by uninverting the inverted index. Note that this can use significant memory.]
at org.elasticsearch.ElasticsearchException.innerFromXContent(ElasticsearchException.java:496)
at org.elasticsearch.ElasticsearchException.fromXContent(ElasticsearchException.java:407)
at org.elasticsearch.ElasticsearchException.innerFromXContent(ElasticsearchException.java:437)
at org.elasticsearch.ElasticsearchException.failureFromXContent(ElasticsearchException.java:603)
at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:179)
... 24 common frames omitted
e
https://datahubproject.io/docs/deploy/aws/#elasticsearch-service did you add the extraEnvs USE_AWS_ELASTICSEARCH ?
h
@early-lamp-41924 - These were added
Copy code
elasticsearchSetupJob:
  enabled: true
  image:
    repository: imagename
    tag: "v0.8.14"
  extraEnvs:
    - name: USE_AWS_ELASTICSEARCH
      value: "true"
And under globals
Copy code
elasticsearch:
  host: "<vpchostname>"
  port: "443"
  indexPrefix: demo
  useSSL: "true"
e
can you check the logs of the elasticsearch setup job?
h
2021/10/08 203147 Waiting for: <https://vpc-da-metadata-ingestion-yfbqmxyamgl7pzztb7blueknpm.us-east-1.es.amazonaws.com:443%7C&lt;&gt;hostname> 2021/10/08 203147 Received 200 from <https://vpc-da-metadata-ingestion-yfbqmxyamgl7pzztb7blueknpm.us-east-1.es.amazonaws.com:443%7C&lt;&gt;hostname> creating datahub_usage_event_policy {  "policy": {   "policy_id": "datahub_usage_event_policy",   "description": "Datahub Usage Event Policy",   "default_state": "Rollover",   "schema_version": 1,   "states": [    {     "name": "Rollover",     "actions": [      {       "rollover": {        "min_index_age": "1d"       }      }     ],     "transitions": [      {       "state_name": "ReadOnly",       "conditions": {        "min_index_age": "7d"       }      }     ]    },    {     "name": "ReadOnly",     "actions": [      {       "read_only": {}      }     ],     "transitions": [      {       "state_name": "Delete",       "conditions": {        "min_index_age": "60d"       }      }     ]    },    {     "name": "Delete",     "actions": [      {       "delete": {}      }     ],     "transitions": []    }   ],   "ism_template": {    "index_patterns": [     "datahub_usage_event-*"    ],    "priority": 100   }  }  % Total  % Received % Xferd Average Speed  Time  Time   Time Current                  Dload Upload  Total  Spent  Left Speed 100 1808 100  747 100 1061  5321  7557 -- -- -- -- -- -- 13007 }{"_id":"datahub_usage_event_policy","_version":1,"_primary_term":1,"_seq_no":28,"policy":{"policy":{"policy_id":"datahub_usage_event_policy","description":"Datahub Usage Event Policy","last_updated_time":1633725107336,"schema_version":1,"error_notification":null,"default_state":"Rollover","states":[{"name":"Rollover","actions":[{"rollover":{"min_index_age":"1d"}}],"transitions":[{"state_name":"ReadOnly","conditions":{"min_index_age":"7d"}}]},{"name":"ReadOnly","actions":[{"read_only":{}}],"transitions":[{"state_name":"Delete","conditions":{"min_index_age":"60d"}}]},{"name":"Delete","actions":[{"delete":{}}],"transitions":[]}],"ism_template":[{"index_patterns":["datahub_usage_event-*"],"priority":100,"last_updated_time":1633725107335}]}}} creating datahub_usagAe_event_index_template {  "index_patterns": ["datahub_usage_event-*"],  "mappings": {   "properties": {    "@timestamp": {     "type": "date"    },    "type": {     "type": "keyword"    },    "timestamp": {     "type": "date"    },    "userAgent": {     "type": "keyword"    },    "browserId": {     "type": "keyword"    }   }  },  "settings": {   "index.opendistro.index_state_management.rollover_alias": "datahub_usage_event"  }  % Total  % Received % Xferd Average Speed  Time  Time   Time Current                  Dload Upload  Total  Spent  Left Speed 100  467 100  21 100  446  366  7774 -- -- -- -- -- -- 8051  % Total  % Received % Xferd Average Speed  Time  Time   Time Current                  Dload Upload  Total  Spent  Left Speed 100  144 100  85 100  59  562  390 -- -- -- -- -- --  953 2021/10/08 203147 Command finished successfully. }{"acknowledged":true}{"acknowledged":true,"shards_acknowledged":true,"index":"datahub_usage_event-000001"}*%*
From the Error seems like it is trying to access the wrong index. Suppressed: org.elasticsearch.client.ResponseException: method [POST], host [<hostname>, URI [/demo_datahub_usage_event/_search?typed_keys=true&max_concurrent_shard_requests=5&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&ignore_throttled=true&search_type=query_then_fetch&batched_reduce_size=512&ccs_minimize_roundtrips=true], status line [HTTP/1.1 400 Bad Request] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [browserId] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"*demo_datahub_usage_event*","node":"abc","reason":{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [browserId] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [browserId] in order to load field data by uninverting the inverted index. Note that this can use significant memory.","caused_by":{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [browserId] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}}},"status":400}
e
Hmn wonder why setup job is not picking up index
@handsome-football-66174 if you haven’t ingested yet
can you remove the indexPrefix field
and redeploy?
even if you have, you can redeploy and use the restore indices job to reconstruct the indices
h
@early-lamp-41924 Sure , the indexPrefix is not present though. not sure why its not picking it up.
e
in your values.yaml
h
Redeploying
e
seems like it is set to demo
h
Yes In values.yaml, i removed it long back
e
oh thought what you pasted above
is your values.yaml ?
I see indexPrefix there
i’m referring to global.elasticsearch.indexPrefix
h
Copy code
elasticsearch:
  host: "<hostname>"
  port: "443"
  #indexPrefix: demo
  useSSL: "true"
Yes commented out.
e
awesome
h
Redeploying did the trick.
e
aewsome!!