The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Hive / HCatalog Forum

Select statement error with exitCode 1

  • #50047
    Sandeep A
    Participant

    Hi,

    Hive throws an error for the statement

    select col1 from SomeTable;

    But the statement

    select * from SomeTable; is working fine.

    Application log for the error

    Application application_1394775974788_0001 failed 2 times due to AM Container for appattempt_1394775974788_0001_000002 exited with exitCode: 1 due to: Exception from container-launch:
    org.apache.hadoop.util.Shell$ExitCodeException:
    at org.apache.hadoop.util.Shell.runCommand(Shell.java:464)
    at org.apache.hadoop.util.Shell.run(Shell.java:379)
    at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:589)
    at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:195)
    at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:283)
    at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:79)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    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)
    1 file(s) moved.
    c:\hdpdata\hadoop\local\usercache\asande\appcache\application_1394775974788_0001\container_1394775974788_0001_02_000001>if 0 NEQ 0 exit /b 0
    c:\hdpdata\hadoop\local\usercache\asande\appcache\application_1394775974788_0001\container_1394775974788_0001_02_000001>if 0 NEQ 0 exit /b 0
    

    Hive logs

    2014-03-14 11:19:12,531 WARN hive.metastore (HiveMetaStoreClient.java:open(307)) - set_ugi() not successful, Likely cause: new client talking to old server. Continuing without it.
    org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
    at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129)
    .
    .
    .
    ERROR hive.log (MetaStoreUtils.java:logAndThrowMetaException(960)) - Got exception: org.apache.thrift.TApplicationException get_databases failed: out of sequence response
    org.apache.thrift.TApplicationException: get_databases failed: out of sequence response
    at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:76)
    at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_get_databases(ThriftHiveMetastore.java:500)
    at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.get_databases(ThriftHiveMetastore.java:487)
    .
    .
    .
    2014-03-14 11:19:24,847 ERROR hive.log (MetaStoreUtils.java:logAndThrowMetaException(961)) - Converting exception to MetaException
    2014-03-14 11:19:24,970 ERROR service.CompositeService (CompositeService.java:start(74)) - Error starting services HiveServer2

  • Author
    Replies
  • #50052
    Sandeep A
    Participant

    Full Hive log

    Further in the log, Hive connected to Metastore with success


    2014-03-14 11:19:38,371 INFO service.CompositeService (SessionManager.java:init(60)) - HiveServer2: Async execution thread pool size: 100
    2014-03-14 11:19:38,371 INFO service.CompositeService (SessionManager.java:init(62)) - HiveServer2: Async execution wait queue size: 100
    2014-03-14 11:19:38,372 INFO service.CompositeService (SessionManager.java:init(64)) - HiveServer2: Async execution thread keepalive time: 10
    2014-03-14 11:19:38,376 INFO service.AbstractService (AbstractService.java:init(89)) - Service:OperationManager is inited.
    2014-03-14 11:19:38,377 INFO service.AbstractService (AbstractService.java:init(89)) - Service:SessionManager is inited.
    2014-03-14 11:19:38,377 INFO service.AbstractService (AbstractService.java:init(89)) - Service:CLIService is inited.
    2014-03-14 11:19:38,377 INFO service.AbstractService (AbstractService.java:init(89)) - Service:ThriftBinaryCLIService is inited.
    2014-03-14 11:19:38,377 INFO service.AbstractService (AbstractService.java:init(89)) - Service:HiveServer2 is inited.
    2014-03-14 11:19:38,377 INFO service.AbstractService (AbstractService.java:start(104)) - Service:OperationManager is started.
    2014-03-14 11:19:38,377 INFO service.AbstractService (AbstractService.java:start(104)) - Service:SessionManager is started.
    2014-03-14 11:19:38,377 INFO service.AbstractService (AbstractService.java:start(104)) - Service:CLIService is started.
    2014-03-14 11:19:38,389 INFO hive.metastore (HiveMetaStoreClient.java:open(244)) - Trying to connect to metastore with URI thrift://ASANDE1:9083
    2014-03-14 11:19:39,574 INFO hive.metastore (HiveMetaStoreClient.java:open(322)) - Waiting 1 seconds before next connection attempt.
    2014-03-14 11:19:40,575 INFO hive.metastore (HiveMetaStoreClient.java:open(332)) - Connected to metastore.
    2014-03-14 11:19:40,627 INFO service.AbstractService (AbstractService.java:start(104)) - Service:ThriftBinaryCLIService is started.
    2014-03-14 11:19:40,630 INFO service.AbstractService (AbstractService.java:start(104)) - Service:HiveServer2 is started.
    2014-03-14 11:19:40,949 INFO thrift.ThriftCLIService (ThriftBinaryCLIService.java:run(76)) - ThriftBinaryCLIService listening on 0.0.0.0/0.0.0.0:10001

The forum ‘Hive / HCatalog’ is closed to new topics and replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.