Saturday, June 10, 2017

hiveserver2 starts and then very quickly stops

Leave a Comment

I run hive on my Mac Sierra and basically the client hive works. However, when I start hiveserver2 it runs a little and then exits. I start hiveserver2 by 2 methods, either

hive --service hiveserver2 

Or

$HIVE_HOME/bin/hiveserver2 

The result and output are the same in both cases:

SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/local/Cellar/hive/2.1.0/libexec/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/local/Cellar/hadoop/2.8.0/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] 

Probably I need to get some logs but I cannot. I configure logging in hive-site.xml as follows:

<property> <name>hive.server2.logging.operation.enabled</name> <value>true</value> <description>When true, HS2 will save operation logs and make them available for clients</description> </property> <property> <name>hive.server2.logging.operation.log.location</name> <value>/usr/local/Cellar/hive/2.1.0/libexec/log</value> <description>Top level directory where operation logs are stored if logging functionality is enabled</description> </property> <property> <name>hive.server2.logging.operation.level</name> <value>VERBOSE</value> ... 

However, I do not see anything created in the log directory

1 Answers

Answers 1

You need to check using beeline if it's on or off without a doubt. In one example the HiveServer2 process is running on localhost at port 52000:

$ beeline beeline> !connect jdbc:hive2://localhost:52000 username password org.apache.hive.jdbc.HiveDriver 0: jdbc:hive2://localhost:52000> 

,

Another thing is to use start as in documentation. To start HiveServer2:

$ sudo service hive-server2 start 

To stop HiveServer2:

$ sudo service hive-server2 stop 
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment