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:

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

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

Failed with exception 
Connection error (chck network and/or proxy settings)- all nodes failed; tried [[]]
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: compass
bootstrap.memory_lock: false
network.publish_host: ${ES_PUBLISH_HOST} ${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.