1启动hiveserver2时候报错
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Exception in thread "Thread-8" java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hive.ql.exec.spark.session.SparkSessionManagerImpl
at org.apache.hive.service.server.HiveServer2.stop(HiveServer2.java:503)
at org.apache.hive.service.server.HiveServer2$1.run(HiveServer2.java:198)
[root@master01 ~]# ^C
2查看hiveserver2日志文件
2019-05-27 16:20:58,584 INFO org.eclipse.jetty.webapp.WebInfConfiguration: [main]: Extract jar:file:/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/jars/hive-jdbc-1.1.0-cdh5.13.0-standalone.jar!/hive-webapps/hiveserver2/ to /tmp/jetty-0.0.0.0-10002-hiveserver2-_-any-/webapp
2019-05-27 16:20:59,162 ERROR org.apache.hive.service.cli.thrift.ThriftCLIService: [Thread-11]: 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)
at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:87)
at org.apache.hadoop.hive.common.auth.HiveAuthUtils.getServerSocket(HiveAuthUtils.java:87)
at org.apache.hive.service.cli.thrift.ThriftBinaryCLIService.run(ThriftBinaryCLIService.java:67)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.BindException: Address already in use (Bind failed)
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:106)
... 5 more
2019-05-27 16:20:59,257 INFO org.apache.hive.service.server.HiveServer2: [Thread-4]: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down HiveServer2 at master01/10.10.109.198
************************************************************/
2019-05-27 16:21:00,648 INFO org.eclipse.jetty.server.handler.ContextHandler: [main]: started o.e.j.w.WebAppContext{/,file:/tmp/jetty-0.0.0.0-10002-hiveserver2-_-any-/webapp/},jar:file:/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/jars/hive-jdbc-1.1.0-cdh5.13.0-standalone.jar!/hive-webapps/hiveserver2
2019-05-27 16:21:00,699 INFO org.eclipse.jetty.server.handler.ContextHandler: [main]: started o.e.j.s.ServletContextHandler{/static,jar:file:/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/jars/hive-jdbc-1.1.0-cdh5.13.0-standalone.jar!/hive-webapps/static}
2019-05-27 16:21:00,700 INFO org.eclipse.jetty.server.handler.ContextHandler: [main]: started o.e.j.s.ServletContextHandler{/logs,file:/var/log/hive/hadoop-cmf-hive-HIVESERVER2-master01.log.out}
2019-05-27 16:21:00,711 WARN org.eclipse.jetty.util.component.AbstractLifeCycle: [main]: FAILED SelectChannelConnector@0.0.0.0:10002: java.net.BindException: Address already in use
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:173)
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:311)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:251)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.Server.doStart(Server.java:272)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.apache.hive.http.HttpServer.start(HttpServer.java:186)
at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:451)
at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:543)
at org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.java:89)
报错原因是因为hiveserver2的端口被占用
查看端口进程号
netstat -apn|grep 10002
进行杀死进程 kill -9 17534