hive-metastore 无法在 cloudera manager 安装过程中启动
Posted
技术标签:
【中文标题】hive-metastore 无法在 cloudera manager 安装过程中启动【英文标题】:hive-metastore is not able to start in the cloudera manager installation process 【发布时间】:2014-08-13 06:44:15 【问题描述】:我们正在Ubuntu 12.04 LTS
中安装Cloudera CDH4
,在安装步骤中我们卡在 hive 元存储启动。我们已按照下载文档中的建议配置了meta-store
和mysql
。
它给了我们以下错误:
/usr/lib/hive/conf$ sudo service hive-metastore status
* Hive Metastore is dead and pid file exists
在日志文件中显示以下错误:
ERROR metastore.HiveMetaStore (HiveMetaStore.java:main(4153)) - Metastore Thrift Server threw an exception...
org.apache.thrift.transport.TTransportException: No keytab specified
以下是hive-site.xml
文件:
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://my-local-system-ip:3306/metastore?createDatabaseIfNotExist=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>org.apache.derby.jdbc.EmbeddedDriver</value>
<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hive</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>my-password</value>
</property>
<property>
<name>datanucleus.autoCreateSchema</name>
<value>false</value>
</property>
<property>
<name>datanucleus.fixedDatastore</name>
<value>true</value>
</property>
<property>
<name>datanucleus.autoStartMechanism</name>
<value>SchemaTable</value>
</property>
<property>
<name>hive.aux.jars.path</name>
<value>file:///usr/share/java/mysql-connector-java.jar</value>
</property>
<property>
<name>hive.metastore.uris</name>
<value>thrift://<FQDN>:9083</value>
</property>
<property>
<name>hive.support.concurrency</name>
<description>Enable Hive's Table Lock Manager Service</description>
<value>true</value>
</property>
<property>
<name>hive.metastore.local</name>
<description>Enable Hive's Table Lock Manager Service</description>
<value>false</value>
</property>
<property>
<name>hive.server2.authentication</name>
<value>KERBEROS</value>
</property>
<property>
<name>hive.server2.authentication.kerberos.principal</name>
<value>hive/_HOST@<my-domain-name></value>
</property>
<property>
<name>hive.server2.thrift.port</name>
<value>10001</value>
<description>TCP port number to listen on, default 10000</description>
</property>
<property>
<name>hive.server2.authentication.kerberos.keytab</name>
<value>/etc/hive/conf/hive.keytab</value>
</property>
<property>
<name>hive.zookeeper.quorum</name>
<description>Zookeeper quorum used by Hive's Table Lock Manager</description>
<value>FQDN</value>
</property>
<property>
<name>hive.metastore.sasl.enabled</name>
<value>true</value>
</property>
<property>
<name>hive.zookeeper.client.port</name>
<value>2181</value>
<description>
The port at which the clients will connect.
</description>
</property>
<property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>
<property>
<name>hive.server2.thrift.sasl.qop</name>
<value>auth</value>
<description>Sasl QOP value; one of 'auth', 'auth-int' and 'auth-conf'</description>
</property>
<property>
<name>hive.metastore.client.socket.timeout</name>
<value>3600</value>
<description>MetaStore Client socket timeout in seconds</description>
</property>
我们的主要重点是安装impala
。如果我们使用默认的德比。 Hive 元存储运行良好。但是当我们开始impala-shell
。它向我们显示未连接。我们可以做些什么来纠正这个问题?
谁能帮我们解决这个错误。
【问题讨论】:
【参考方案1】:我认为问题在于您缺少以下参数:
<property>
<name>hive.metastore.kerberos.keytab.file</name>
<value>/etc/hive/conf/hive.keytab</value>
<description>The path to the Kerberos Keytab file containing the metastore thrift server's service principal.</description>
</property>
我看到您确实有 hive.server2.authentication.kerberos.keytab,但似乎这还不够。
【讨论】:
现在我收到以下错误ERROR metastore.HiveMetaStore (HiveMetaStore.java:main(4153)) - Metastore Thrift Server threw an exception... org.apache.thrift.transport.TTransportException: Kerberos principal should have 3 parts: hive
您的 hive.server2.authentication.kerberos.principal 设置有问题。它应该具有这种格式的三个部分:username/fully.qualified.domain.name@YOUR-REALM.COM 所以有了你所拥有的,“hive”应该是 kerberos 主体的用户名。 _HOST I gather from here 是一个特殊的东西,应该自行解决,但您需要确保 RDNS 正常工作。最后一点应该是您的 kerberos 领域,而不是您的域名。【参考方案2】:
将 hive.server2.authentication.kerberos.principal 属性中的“my-domain-name”替换为您的域名。这是 hive 主体中缺少的第三部分。
【讨论】:
以上是关于hive-metastore 无法在 cloudera manager 安装过程中启动的主要内容,如果未能解决你的问题,请参考以下文章
无法在 Spring Data Cloud Spanner 中将 java.sql.Timestamp 转换为 com.google.cloud.Timestamp
GCP - 无法在 Cloud Run 中使用 Google Secret Manager (@google-cloud/secret-manager)