Curl works but Hive can't connect to ES


From an Hadoop cluster I can request my index using curl, like this : curl -u user:pwd -X GET http://mynode:9020/myindex, it works,

but when I try to request using Hive (Beeline) I have the famous exception "Cannot detect ES version".

My external table has been created using ES handler like this :

STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES('es.resource' = 'myindex', 'es.input.json` = 'yes', 'es.nodes' = 'XXXX', 'es.port' = '9020');

and a select request on this table returns the ES version error.

My ES instance and Hive instance are on the same LAN, ping, telnet and curl are ok. I tried to set 'es.nodes.wan.only' to true but same result. In verbose mode on Beeline there is nothing more I can use to resolve this, only a " null".

Thanks for your help

Adding monitor role to Elastic user we use on Hive and permission on slash resolved this error. It seems at the end that the user has to have this role at least to detect ES version.

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