Connection error when selecting from ES table in Hive

Hi all,

I've a problem with connecting ES to Hive.
I have created an external table in Hive on ES index like this:

CREATE EXTERNAL TABLE es_hive_test(
    logger  STRING,
    level   STRING,
    streamer STRING)
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES('es.resource' = 'logs-2017.05.09/logs',
'es.nodes' = '10.8.120.185',  
'es.port' = '9200')

But when I try to select from the table I get the following error:

Failed with exception java.io.IOException:org.elasticsearch.hadoop.rest.EsHadoopNoNodesLeftException: 
Connection error (chck network and/or proxy settings)- all nodes failed; tried [[192.168.229.19:9200]]
Time taken: 0.467 seconds

Versions I'm using:
ES: 5.2.2
JDK: 1.8.0_131
Hadoop: 2.7.3
Hive: 1.2.2

Both ES, Hadoop and Hive are running on the same machine.

These are the configurations in elasticearch.yml:

cluster.name: compass
bootstrap.memory_lock: false
network.host: 0.0.0.0
network.publish_host: ${ES_PUBLISH_HOST}
discovery.zen.ping.unicast.hosts: ${ES_HOSTS}
path.repo: "/usr/share/elasticsearch/backup"
cluster.routing.allocation.disk.watermark.low: 95%
cluster.routing.allocation.disk.watermark.high: 98%
discovery.zen.ping_timeout: 20s

Have read any other post here about it but can't figure out how to fix it.

Any suggestions?

Are you using X-pack with Elasticsearch ?

Your Elasticsearch server is most likely returning that address as it's bound http address during the node discovery phase in the connector. Try enabling es.nodes.wan.only for your local development to disable the node discovery and filtering routines in the connector.

Thanks a lot!

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