Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

hiveserver2 and metastore not starting

hiveserver2 and metastore not starting

I am trying to start the hiveserver2 and metastore but both are not getting started , please find below logs :

2018-09-03 09:10:13,051 ERROR [Thread-14]: util.PolicyRefresher (PolicyRefresher.java:loadPolicyfromPolicyAdmin(240)) - PolicyRefresher(serviceName=AADSPRD_hive): failed to refresh policies. Will continue to use last known version of policies (6)
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused (Connection refused)
        at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
        at com.sun.jersey.api.client.Client.handle(Client.java:648)
--
2018-09-03 09:10:43,052 ERROR [Thread-14]: util.PolicyRefresher (PolicyRefresher.java:loadPolicyfromPolicyAdmin(240)) - PolicyRefresher(serviceName=AADSPRD_hive): failed to refresh policies. Will continue to use last known version of policies (6)
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused (Connection refused)
        at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
        at com.sun.jersey.api.client.Client.handle(Client.java:648)
--
2018-09-03 09:34:32,306 FATAL [Thread-20]: thrift.ThriftCLIService (ThriftBinaryCLIService.java:run(101)) - Error starting HiveServer2: could not start ThriftBinaryCLIService
org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:10000.
        at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:109)
        at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:91)
--
2018-09-03 09:42:21,489 FATAL [Thread-20]: thrift.ThriftCLIService (ThriftBinaryCLIService.java:run(101)) - Error starting HiveServer2: could not start ThriftBinaryCLIService
org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:10000.
        at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:109)
        at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:91)
3 REPLIES 3

Re: hiveserver2 and metastore not starting

Super Mentor

@Anurag Mishra

Can you check if by any chance if the port 10000 is already opened and occupied b y some oither process?

# netstat -tnlpa | grep 10000

.

Also please verify if your Ranger Admin process is running fine or not? Also please check the ranger admin logs to see if there are any error/warnings logged.

Re: hiveserver2 and metastore not starting

tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 255607/java

ranger admin is running also I ran the service checks successfully .

2018-09-03 09:22:29,354 [http-bio-6080-exec-11] INFO  org.apache.ranger.common.RESTErrorUtil (RESTErrorUtil.java:65) - Request failed. SessionId=null, loginId=null, logMessage=RangerKRBAuthenticationFilter Failed : null
javax.ws.rs.WebApplicationException
        at org.apache.ranger.common.RESTErrorUtil.createRESTException(RESTErrorUtil.java:56)
        at org.apache.ranger.common.RESTErrorUtil.createRESTException(RESTErrorUtil.java:321)
        at org.apache.ranger.security.web.filter.RangerKRBAuthenticationFilter.doFilter(RangerKRBAuthenticationFilter.java:287)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
--
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
--
2018-09-03 09:22:29,355 [http-bio-6080-exec-11] INFO  org.apache.ranger.common.RESTErrorUtil (RESTErrorUtil.java:322) - Operation error. response=VXResponse={org.apache.ranger.view.VXResponse@32c1b651statusCode={1} msgDesc={RangerKRBAuthenticationFilter Failed : null} messageList={null} }
javax.ws.rs.WebApplicationException
        at org.apache.ranger.common.RESTErrorUtil.createRESTException(RESTErrorUtil.java:56)
        at org.apache.ranger.common.RESTErrorUtil.createRESTException(RESTErrorUtil.java:321)
        at org.apache.ranger.security.web.filter.RangerKRBAuthenticationFilter.doFilter(RangerKRBAuthenticationFilter.java:287)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
--

Re: hiveserver2 and metastore not starting

2018-09-03 11:21:28,181 INFO  [HiveServer2-Handler-Pool: Thread-101]: session.HiveSessionImpl (HiveSessionImpl.java:releaseBeforeOpLock(356)) - We are resetting the hadoop caller context for thread HiveServer2-Handler-Pool: Thread-101
2018-09-03 11:21:28,181 INFO  [HiveServer2-Handler-Pool: Thread-101]: session.HiveSessionImpl (HiveSessionImpl.java:acquireAfterOpLock(332)) - We are setting the hadoop caller context to e2ea598f-f8c4-4ea1-adf9-a9e4d991160b for thread HiveServer2-Handler-Pool: Thread-101
2018-09-03 11:21:28,183 INFO  [HiveServer2-Handler-Pool: Thread-101]: session.HiveSessionImpl (HiveSessionImpl.java:releaseBeforeOpLock(356)) - We are resetting the hadoop caller context for thread HiveServer2-Handler-Pool: Thread-101
2018-09-03 11:21:52,969 INFO  [timeline]: availability.MetricSinkWriteShardHostnameHashingStrategy (MetricSinkWriteShardHostnameHashingStrategy.java:findCollectorShard(42)) - Calculated collector shard host based on hostname: hiveserverhost
2018-09-03 11:24:29,181 INFO  [HiveServer2-Handler-Pool: Thread-101]: thrift.ThriftCLIService (ThriftCLIService.java:OpenSession(313)) - Client protocol version: HIVE_CLI_SERVICE_PROTOCOL_V8
2018-09-03 11:24:29,182 INFO  [HiveServer2-Handler-Pool: Thread-101]: metastore.HiveMetaStore (HiveMetaStore.java:logInfo(822)) - 5: Shutting down the object store...
2018-09-03 11:24:29,182 INFO  [HiveServer2-Handler-Pool: Thread-101]: HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(391)) - ugi=hive/host@SOLON.PRD        ip=unknown-ip-addr      cmd=Shutting down the object store...
2018-09-03 11:24:29,183 INFO  [HiveServer2-Handler-Pool: Thread-101]: metastore.HiveMetaStore (HiveMetaStore.java:logInfo(822)) - 5: Metastore shutdown complete.
2018-09-03 11:24:29,183 INFO  [HiveServer2-Handler-Pool: Thread-101]: HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(391)) - ugi=hive/host@SOLON.PRD        ip=unknown-ip-addr      cmd=Metastore shutdown complete.
2018-09-03 11:24:29,184 INFO  [HiveServer2-Handler-Pool: Thread-101]: metastore.HiveMetaStore (HiveMetaStore.java:init(523)) - Begin calculating metadata count metrics.
2018-09-03 11:24:29,184 INFO  [HiveServer2-Handler-Pool: Thread-101]: metastore.HiveMetaStore (HiveMetaStore.java:newRawStore(665)) - 5: Opening raw store with implemenation class:org.apache.hadoop.hive.metastore.ObjectStore
2018-09-03 11:24:29,307 INFO  [HiveServer2-Handler-Pool: Thread-101]: metastore.ObjectStore (ObjectStore.java:initialize(299)) - ObjectStore, initialize called
2018-09-03 11:24:29,310 INFO  [HiveServer2-Handler-Pool: Thread-101]: metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(139)) - Using direct SQL, underlying DB is MYSQL
Don't have an account?
Coming from Hortonworks? Activate your account here