Pivotal Knowledge Base

Follow

Hive query reports a message "FAILED: Error in semantic analysis: Lock manager could not be initialized, check hive.lock.manager Check hive.zookeeper.quorum and hive.zookeeper.client.port"

Environment:

PHD 2.x

Problem:

On a hive-server2, you may see a notification as mentioned below, but the query will still return the response.

Snippet:

hive> show tables;
FAILED: Error in semantic analysis: Lock manager could not be initialized, check hive.lock.manager Check hive.zookeeper.quorum and hive.zookeeper.client.port
OK
arin_test
arindam_dt_po
arindam_dt_popr

Solution:

Once you have enabled Hive's table lock manager service to support concurrency with hive-server2 by setting the value of hive.support.concurrency = true, you can see this error. [hive.lock.manager here refers to hive.support.concurrency]

In order to isolate the cause, you must verify if the below parameter is set in hive-site.xml

1. hive.zookeeper.quorum

2. hive.zookeeper.client.port (If not present, by default its 2181) 

Often if all the configuration are correct, you will still see the error if there are spaces in the list of hive.zookeeper.quorum, so ensure that there are no spaces.

It must be like below.

<property>
<name>hive.zookeeper.quorum</name>
<description>Zookeeper quorum used by Hive's Table Lock Manager</description>
<value>host1.com,host2.com,host3.com/value>
</property>

Comments

Powered by Zendesk