[Hadoop] Cannot discover Elasticsearch version exception

Hi,

I'm going my way using Hortonworks Sandbox & Elasticsearch Hadoop.

I can't have Hive request Elasticsearch. Seems it attemps connecting to ES
through hostname while I provided IP adress in Hive query...

I found a workaround setting up /etc/hosts in snadbox, but can't figure out
why it resolves ip to hostname....

14/02/24 05:41:37 INFO Configuration.deprecation: mapred.input.dir.recursive is deprecated. Instead, use mapreduce.input.fileinputformat.input.dir.recursive

14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO parse.ParseDriver: Parsing command: use default
14/02/24 05:41:37 INFO parse.ParseDriver: Parse Completed
14/02/24 05:41:37 INFO ql.Driver: </PERFLOG method=parse start=1393249297364 end=1393249297365 duration=1>
14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO ql.Driver: Semantic Analysis Completed
14/02/24 05:41:37 INFO ql.Driver: </PERFLOG method=semanticAnalyze start=1393249297365 end=1393249297365 duration=0>
14/02/24 05:41:37 INFO ql.Driver: Returning Hive schema: Schema(fieldSchemas:null, properties:null)
14/02/24 05:41:37 INFO ql.Driver: </PERFLOG method=compile start=1393249297364 end=1393249297365 duration=1>
14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO ql.Driver: Starting command: use default
14/02/24 05:41:37 INFO ql.Driver: </PERFLOG method=TimeToSubmit start=1393249297364 end=1393249297366 duration=2>
14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO ql.Driver: </PERFLOG method=task.DDL.Stage-0 start=1393249297366 end=1393249297374 duration=8>
14/02/24 05:41:37 INFO ql.Driver: </PERFLOG method=runTasks start=1393249297366 end=1393249297374 duration=8>
14/02/24 05:41:37 INFO ql.Driver: </PERFLOG method=Driver.execute start=1393249297365 end=1393249297374 duration=9>
OK
14/02/24 05:41:37 INFO ql.Driver: OK
14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO ql.Driver: </PERFLOG method=releaseLocks start=1393249297374 end=1393249297375 duration=1>
14/02/24 05:41:37 INFO ql.Driver: </PERFLOG method=Driver.run start=1393249297364 end=1393249297375 duration=11>
converting to local hdfs://sandbox.hortonworks.com:8020/user/elasticsearch-hadoop-1.3.0.M2-yarn.jar
14/02/24 05:41:37 INFO SessionState: converting to local hdfs://sandbox.hortonworks.com:8020/user/elasticsearch-hadoop-1.3.0.M2-yarn.jar
Added /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar to class path
14/02/24 05:41:37 INFO SessionState: Added /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar to class path
Added resource: /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar
14/02/24 05:41:37 INFO SessionState: Added resource: /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar
14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO parse.ParseDriver: Parsing command: -- stream data from Elasticsearch
SELECT * FROM fca
14/02/24 05:41:37 INFO parse.ParseDriver: Parse Completed
14/02/24 05:41:37 INFO ql.Driver: </PERFLOG method=parse start=1393249297389 end=1393249297389 duration=0>
14/02/24 05:41:37 INFO ql.Driver:
14/02/24 05:41:37 INFO parse.SemanticAnalyzer: Starting Semantic Analysis
14/02/24 05:41:37 INFO parse.SemanticAnalyzer: Completed phase 1 of Semantic Analysis
14/02/24 05:41:37 INFO parse.SemanticAnalyzer: Get metadata for source tables
14/02/24 05:41:37 INFO parse.SemanticAnalyzer: Get metadata for subqueries
14/02/24 05:41:37 INFO parse.SemanticAnalyzer: Get metadata for destination tables
14/02/24 05:41:37 INFO ql.Context: New scratch dir is hdfs://sandbox.hortonworks.com:8020/tmp/hive-beeswax-hue/hive_2014-02-24_05-41-37_389_1622127390930327029-1
14/02/24 05:41:37 INFO parse.SemanticAnalyzer: Completed getting MetaData in Semantic Analysis
14/02/24 05:41:37 INFO ppd.OpProcFactory: Processing for FS(8)
14/02/24 05:41:37 INFO ppd.OpProcFactory: Processing for SEL(7)
14/02/24 05:41:37 INFO ppd.OpProcFactory: Processing for TS(6)
FAILED: IllegalStateException Cannot discover Elasticsearch version
14/02/24 05:41:57 ERROR ql.Driver: FAILED: IllegalStateException Cannot discover Elasticsearch version
java.lang.IllegalStateException: Cannot discover Elasticsearch version
at org.elasticsearch.hadoop.hive.EsStorageHandler.init(EsStorageHandler.java:101)
at org.elasticsearch.hadoop.hive.EsStorageHandler.configureInputJobProperties(EsStorageHandler.java:78)
at org.apache.hadoop.hive.ql.plan.PlanUtils.configureJobPropertiesForStorageHandler(PlanUtils.java:755)
at org.apache.hadoop.hive.ql.plan.PlanUtils.configureInputJobPropertiesForStorageHandler(PlanUtils.java:725)
at org.apache.hadoop.hive.ql.optimizer.SimpleFetchOptimizer$FetchData.convertToWork(SimpleFetchOptimizer.java:208)
at org.apache.hadoop.hive.ql.optimizer.SimpleFetchOptimizer$FetchData.access$000(SimpleFetchOptimizer.java:180)
at org.apache.hadoop.hive.ql.optimizer.SimpleFetchOptimizer.optimize(SimpleFetchOptimizer.java:103)
at org.apache.hadoop.hive.ql.optimizer.SimpleFetchOptimizer.transform(SimpleFetchOptimizer.java:74)
at org.apache.hadoop.hive.ql.optimizer.Optimizer.optimize(Optimizer.java:131)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:8392)
at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:284)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:441)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:342)
at com.cloudera.beeswax.BeeswaxServiceImpl$RunningQueryState.checkedCompile(BeeswaxServiceImpl.java:247)
at com.cloudera.beeswax.BeeswaxServiceImpl$RunningQueryState.compile(BeeswaxServiceImpl.java:200)
at com.cloudera.beeswax.BeeswaxServiceImpl$2.run(BeeswaxServiceImpl.java:830)
at com.cloudera.beeswax.BeeswaxServiceImpl$2.run(BeeswaxServiceImpl.java:823)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
at com.cloudera.beeswax.BeeswaxServiceImpl.doWithState(BeeswaxServiceImpl.java:772)
at com.cloudera.beeswax.BeeswaxServiceImpl.query(BeeswaxServiceImpl.java:822)
at com.cloudera.beeswax.api.BeeswaxService$Processor$query.getResult(BeeswaxService.java:915)
at com.cloudera.beeswax.api.BeeswaxService$Processor$query.getResult(BeeswaxService.java:899)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Out of nodes and retries; caught exception
at org.elasticsearch.hadoop.rest.NetworkClient.execute(NetworkClient.java:81)
at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:221)
at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:205)
at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:209)
at org.elasticsearch.hadoop.rest.RestClient.get(RestClient.java:103)
at org.elasticsearch.hadoop.rest.RestClient.esVersion(RestClient.java:274)
at org.elasticsearch.hadoop.rest.InitializationUtils.discoverEsVersion(InitializationUtils.java:84)
at org.elasticsearch.hadoop.hive.EsStorageHandler.init(EsStorageHandler.java:99)
... 29 more
Caused by: java.net.UnknownHostException: uc403496vw7scl.siege.dev-fr.intra
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.(Socket.java:375)
at java.net.Socket.(Socket.java:249)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at org.elasticsearch.hadoop.rest.commonshttp.CommonsHttpTransport.execute(CommonsHttpTransport.java:160)
at org.elasticsearch.hadoop.rest.NetworkClient.execute(NetworkClient.java:74)
... 36 more

14/02/24 05:41:57 INFO ql.Driver: </PERFLOG method=compile start=1393249297388 end=1393249317487 duration=20099>
14/02/24 05:41:57 ERROR security.UserGroupInformation: PriviledgedActionException as:hue (auth:SIMPLE) cause:BeeswaxException(message:OK
converting to local hdfs://sandbox.hortonworks.com:8020/user/elasticsearch-hadoop-1.3.0.M2-yarn.jar
Added /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar to class path
Added resource: /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar
FAILED: IllegalStateException Cannot discover Elasticsearch version
, log_context:c3c30060-343d-4a2c-9207-d84040200b48, handle:QueryHandle(id:c3c30060-343d-4a2c-9207-d84040200b48, log_context:c3c30060-343d-4a2c-9207-d84040200b48), SQLState: )
14/02/24 05:41:57 ERROR beeswax.BeeswaxServiceImpl: Caught unexpected exception.
java.lang.reflect.UndeclaredThrowableException
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1504)
at com.cloudera.beeswax.BeeswaxServiceImpl.doWithState(BeeswaxServiceImpl.java:772)
at com.cloudera.beeswax.BeeswaxServiceImpl.query(BeeswaxServiceImpl.java:822)
at com.cloudera.beeswax.api.BeeswaxService$Processor$query.getResult(BeeswaxService.java:915)
at com.cloudera.beeswax.api.BeeswaxService$Processor$query.getResult(BeeswaxService.java:899)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: BeeswaxException(message:OK
converting to local hdfs://sandbox.hortonworks.com:8020/user/elasticsearch-hadoop-1.3.0.M2-yarn.jar
Added /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar to class path
Added resource: /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar
FAILED: IllegalStateException Cannot discover Elasticsearch version
, log_context:c3c30060-343d-4a2c-9207-d84040200b48, handle:QueryHandle(id:c3c30060-343d-4a2c-9207-d84040200b48, log_context:c3c30060-343d-4a2c-9207-d84040200b48), SQLState: )
at com.cloudera.beeswax.BeeswaxServiceImpl$RunningQueryState.checkedCompile(BeeswaxServiceImpl.java:249)
at com.cloudera.beeswax.BeeswaxServiceImpl$RunningQueryState.compile(BeeswaxServiceImpl.java:200)
at com.cloudera.beeswax.BeeswaxServiceImpl$2.run(BeeswaxServiceImpl.java:830)
at com.cloudera.beeswax.BeeswaxServiceImpl$2.run(BeeswaxServiceImpl.java:823)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
... 10 more
14/02/24 05:41:57 ERROR security.UserGroupInformation: PriviledgedActionException as:hue (auth:SIMPLE) cause:BeeswaxException(message:OK
converting to local hdfs://sandbox.hortonworks.com:8020/user/elasticsearch-hadoop-1.3.0.M2-yarn.jar
Added /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar to class path
Added resource: /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar
FAILED: IllegalStateException Cannot discover Elasticsearch version
, log_context:c3c30060-343d-4a2c-9207-d84040200b48, handle:QueryHandle(id:c3c30060-343d-4a2c-9207-d84040200b48, log_context:c3c30060-343d-4a2c-9207-d84040200b48), SQLState: )
14/02/24 05:41:57 ERROR beeswax.BeeswaxServiceImpl: Caught unexpected exception.
java.lang.reflect.UndeclaredThrowableException
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1504)
at com.cloudera.beeswax.BeeswaxServiceImpl.doWithState(BeeswaxServiceImpl.java:772)
at com.cloudera.beeswax.BeeswaxServiceImpl.fetch(BeeswaxServiceImpl.java:980)
at com.cloudera.beeswax.api.BeeswaxService$Processor$fetch.getResult(BeeswaxService.java:987)
at com.cloudera.beeswax.api.BeeswaxService$Processor$fetch.getResult(BeeswaxService.java:971)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: BeeswaxException(message:OK
converting to local hdfs://sandbox.hortonworks.com:8020/user/elasticsearch-hadoop-1.3.0.M2-yarn.jar
Added /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar to class path
Added resource: /tmp/2d776dfb-d58c-452d-90f0-28d774c6dd2d_resources/elasticsearch-hadoop-1.3.0.M2-yarn.jar
FAILED: IllegalStateException Cannot discover Elasticsearch version
, log_context:c3c30060-343d-4a2c-9207-d84040200b48, handle:QueryHandle(id:c3c30060-343d-4a2c-9207-d84040200b48, log_context:c3c30060-343d-4a2c-9207-d84040200b48), SQLState: )
at com.cloudera.beeswax.BeeswaxServiceImpl$RunningQueryState.checkedCompile(BeeswaxServiceImpl.java:249)
at com.cloudera.beeswax.BeeswaxServiceImpl$RunningQueryState.compile(BeeswaxServiceImpl.java:200)
at com.cloudera.beeswax.BeeswaxServiceImpl$2.run(BeeswaxServiceImpl.java:830)
at com.cloudera.beeswax.BeeswaxServiceImpl$2.run(BeeswaxServiceImpl.java:823)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
at com.cloudera.beeswax.BeeswaxServiceImpl.doWithState(BeeswaxServiceImpl.java:772)
at com.cloudera.beeswax.BeeswaxServiceImpl.query(BeeswaxServiceImpl.java:822)
at com.cloudera.beeswax.api.BeeswaxService$Processor$query.getResult(BeeswaxService.java:915)
at com.cloudera.beeswax.api.BeeswaxService$Processor$query.getResult(BeeswaxService.java:899)
... 6 more

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e5599040-a5d2-4989-aee4-06e5baea46cb%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.