Failure while retrieving metadata for table

Hello. I have some problem for seeing my dataset in dremio.

After successfully Connecting AWS ES, I can see the indecies on my Sources.

And I clicked the schema (puple table icon) after clicking a index (folder icon), then System show me “Failure while retrieving metadata for table” error message.

I’m sure the curl commend is work on dremio server and amazon server’s access policy is public

ES server : AWS ES
ES version : 5.5
dremio server : AWS EC2
dremio version : 1.3.1

curl -XGET ‘elastic-hostname:9200/_nodes?pretty’

{
  "_nodes" : {
    "total" : 5,
    "successful" : 5,
    "failed" : 0
  },
  "cluster_name" : "256598433840:dev-poc-r3",
  "nodes" : {
    "uqqFBTdxT02TGUmJptYIJA" : {
      "name" : "uqqFBTd",
      "version" : "5.5.2",
      "build_hash" : "Unknown",
      "total_indexing_buffer" : 852020428,
      "roles" : [ "master", "data", "ingest" ],
      "os" : {
        "refresh_interval_in_millis" : 1000,
        "available_processors" : 8,
        "allocated_processors" : 8
      },
      "process" : {
        "refresh_interval_in_millis" : 1000,
        "id" : 5802,
        "mlockall" : true
      },
      "jvm" : {
        "pid" : 5802,
        "start_time_in_millis" : 1516669813189,
        "mem" : {
          "heap_init_in_bytes" : 8589934592,
          "heap_max_in_bytes" : 8520204288,
          "non_heap_init_in_bytes" : 2555904,
          "non_heap_max_in_bytes" : 0,
          "direct_max_in_bytes" : 8520204288
        },
        "using_compressed_ordinary_object_pointers" : "true"
      },
      "thread_pool" : {
        "force_merge" : {
          "type" : "fixed",
          "min" : 1,
          "max" : 1,
          "queue_size" : -1
        },
        "fetch_shard_started" : {
          "type" : "scaling",
          "min" : 1,
          "max" : 16,
          "keep_alive" : "5m",
          "queue_size" : -1
        },
        "listener" : {
          "type" : "fixed",
          "min" : 4,
          "max" : 4,
          "queue_size" : -1
.......

Below is server.log when I got the message

2018-01-24 01:55:13,731 [2598187e-2f5f-1a41-175f-4771786e2a00:foreman] INFO  com.dremio.exec.store.AbstractSchema - User Error Occurred [ErrorId: 02d3e895-cdf4-4416-ae9b-6f5a3a49c19b]
com.dremio.common.exceptions.UserException: Failure while retrieving metadata for table "dev-poc-r3"."1_20171102"."_default_".
        at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:648) ~[dremio-common-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at com.dremio.exec.store.SimpleSchema.getTableFromSource(SimpleSchema.java:405) [dremio-sabot-kernel-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at com.dremio.exec.store.SimpleSchema.getTableWithRegistry(SimpleSchema.java:297) [dremio-sabot-kernel-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at com.dremio.exec.store.SimpleSchema.getTable(SimpleSchema.java:415) [dremio-sabot-kernel-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at org.apache.calcite.jdbc.SimpleCalciteSchema.getImplicitTable(SimpleCalciteSchema.java:67) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.3.1-201712020438070881-a7af5c8]
        at org.apache.calcite.jdbc.CalciteSchema.getTable(CalciteSchema.java:219) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.3.1-201712020438070881-a7af5c8]
        at org.apache.calcite.prepare.CalciteCatalogReader.getTableFrom(CalciteCatalogReader.java:117) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.prepare.CalciteCatalogReader.getTable(CalciteCatalogReader.java:106) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.prepare.CalciteCatalogReader.getTable(CalciteCatalogReader.java:73) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.EmptyScope.getTableNamespace(EmptyScope.java:71) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.DelegatingScope.getTableNamespace(DelegatingScope.java:189) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.IdentifierNamespace.validateImpl(IdentifierNamespace.java:104) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:910) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:891) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2859) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2844) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:3077) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:910) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:891) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.SqlSelect.validate(SqlSelect.java:208) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:866) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:577) [calcite-core-1.12.0-201711022309440460-bd4149e.jar:1.12.0-201711022309440460-bd4149e]
        at com.dremio.exec.planner.sql.SqlConverter.validate(SqlConverter.java:188) [dremio-sabot-kernel-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at com.dremio.exec.planner.sql.handlers.PrelTransformer.validateNode(PrelTransformer.java:167) [dremio-sabot-kernel-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at com.dremio.exec.planner.sql.handlers.PrelTransformer.validateAndConvert(PrelTransformer.java:155) [dremio-sabot-kernel-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan(NormalHandler.java:43) [dremio-sabot-kernel-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan(HandlerToExec.java:66) [dremio-sabot-kernel-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at com.dremio.exec.work.foreman.AttemptManager.run(AttemptManager.java:290) [dremio-sabot-kernel-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
Caused by: java.lang.NullPointerException: null
        at com.dremio.plugins.elastic.ElasticTableBuilder.populate(ElasticTableBuilder.java:239) ~[dremio-elasticsearch-plugin-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at com.dremio.plugins.elastic.ElasticTableBuilder.buildIfNecessary(ElasticTableBuilder.java:161) ~[dremio-elasticsearch-plugin-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at com.dremio.plugins.elastic.ElasticTableBuilder.getDataset(ElasticTableBuilder.java:142) ~[dremio-elasticsearch-plugin-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        at com.dremio.exec.store.SimpleSchema.getTableFromSource(SimpleSchema.java:377) [dremio-sabot-kernel-1.3.1-201712020438070881-a7af5c8.jar:1.3.1-201712020438070881-a7af5c8]
        ... 32 common frames omitted
2018-01-24 01:55:13,733 [2598187e-2f5f-1a41-175f-4771786e2a00:foreman] INFO  query.logger - {"queryId":"2598187e-2f5f-1a41-175f-4771786e2a00","schema":"","queryText":"select *\r\nfrom \"dev-poc-r3\".\"1_20171102\".\"_default_\"","start":1516758913555,"finish":1516758913731,"outcome":"FAILED","username":"reiui9","commandDescription":"<unknown>"}

Hi @youngin,

I was researching this and I had been able to add ES 5.5.2, upload a JSON and query it successfully in Dremio, however if you make changes to indexes, or any similar object pertaining to the ES data then you need to refresh the metadata for the PDS:

Use the below command and see if you can query ES after that:
ALTER PDS "dev-poc-r3"."1_20171102"."_default_". REFRESH METADATA

Please let us know if were able to query ES after this.

Thanks,
Danny

Hi @youngin

Can you please download the latest version on our website and try this query again?

Thanks,
@balaji.ramaswamy