启动配置单元元存储

nkhmeac6  于 2021-06-03  发布在  Hadoop
关注(0)|答案(2)|浏览(391)

我们正在尝试在linux服务器上启动hive元存储,但是我们面临一个问题。如果尝试使用以下命令启动配置单元元存储服务:
sudo hive—服务元存储
我们会遇到很多这样的错误:
原因:java.sql.sqlexception:拒绝访问位于com.mysql.jdbc.sqlerror.createsqlexception(sqlerror)的用户'hive'@'sandbox.hortonworks.com'(使用密码:yes)。java:1073)在com.mysql.jdbc.mysqlio.checkerrorpacket(mysqlio。java:3597)在com.mysql.jdbc.mysqlio.checkerrorpacket(mysqlio。java:3529)在com.mysql.jdbc.mysqlio.checkerrorpacket(mysqlio。java:935)在com.mysql.jdbc.mysqlio.secureauth411(mysqlio。java:4101)在com.mysql.jdbc.mysqlio.dohandshake(mysqlio。java:1300)在com.mysql.jdbc.connectionimpl.coreconnect(connectionimpl。java:2337)在com.mysql.jdbc.connectionimpl.connectonetryonly(connectionimpl。java:2370)在com.mysql.jdbc.connectionimpl.createnewio(connectionimpl。java:2154)在com.mysql.jdbc.connectionimpl。java:792)在com.mysql.jdbc.jdbc4connection.(jdbc4connection。java:49)位于sun.reflect.nativeconstructoraccessorimpl.newinstance0(本机方法)sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl。java:39)在sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl。java:27)在java.lang.reflect.constructor.newinstance(constructor。java:513)在com.mysql.jdbc.util.handlenewinstance(util。java:411)在com.mysql.jdbc.connectionimpl.getinstance(connectionimpl。java:381)在com.mysql.jdbc.nonregisteringdriver.connect(nonregisteringdriver。java:305)在java.sql.drivermanager.getconnection(drivermanager。java:582)在java.sql.drivermanager.getconnection(drivermanager。java:154)在com.jolbox.bonecp.bonecp.obtainrawinternalconnection(bonecp。java:254)在com.jolbox.bonecp.bonecp.(bonecp。java:305) ... 48个以上
我们还尝试重置用户配置单元的密码,但没有帮助。
我们要启动配置单元元存储的原因是,端口9083没有在服务器上侦听。我们也不知道为什么metastore服务在服务器重启后不再运行。
如果您知道任何其他命令来重新启动配置单元元存储或任何其他可能的解决方案,请让我知道。
提前谢谢
编辑:我显示了用户配置单元的授权:

mysql> show grants for 'hive'@'sandbox.hortonworks.com';
+--------------------------------------------------------------------------------+
| Grants for hive@sandbox.hortonworks.com                                        |
+--------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'hive'@'sandbox.hortonworks.com'                |
| GRANT ALL PRIVILEGES ON `metastore`.* TO 'hive'@'sandbox.hortonworks.com'      |
| GRANT ALL PRIVILEGES ON `hive`.`metastore` TO 'hive'@'sandbox.hortonworks.com' |
+--------------------------------------------------------------------------------+
3 rows in set (0.01 sec)

在这里,我选择了mysql.user表的主机用户和密码。用户配置单元没有密码!

mysql> select host, user, password from mysql.user;
+-------------------------+------+----------+
| host                    | user | password |
+-------------------------+------+----------+
| localhost               | root |          |
| sandbox.hortonworks.com | root |          |
| 127.0.0.1               | root |          |
| localhost               |      |          |
| sandbox.hortonworks.com |      |          |
| sandbox.hortonworks.com | hive |          |
| localhost               | hive |          |
+-------------------------+------+----------+
7 rows in set (0.01 sec)

编辑:我发现其他错误消息:
我和ambari有联系serverip:8080 and 检查了某些服务的状态。如果尝试手动启动配置单元元存储,则会收到以下错误消息:

Hive Metastore status
CRITICAL: Error accessing Hive Metastore status [14/08/25 04:41:55 INFO Configuration.deprecation: mapred.input.dir.recursive is deprecated. Instead, use mapreduce.input.fileinputformat.input.dir.recursive

错误发生在启动配置单元服务的4个步骤中的最后一个步骤。步骤“hive metastore start”和“hiveserver 2 start”已经完成,没有出现错误。名为“配置单元检查执行”的步骤失败。以下是标准输出的错误消息:

notice: /Stage[2]/Hdp-hcat::Hcat::Service_check/Exec[hcatSmoke.sh prepare]/returns: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
err: /Stage[2]/Hdp-hcat::Hcat::Service_check/Exec[hcatSmoke.sh prepare]/returns: change from notrun to 0 failed: su - ambari-qa -c 'sh /tmp/hcatSmoke.sh hcatsmokeidd4b2a272_date472514 prepare' returned 1 instead of one of [0] at /var/lib/ambari-agent/puppet/modules/hdp-hcat/manifests/hcat/service_check.pp:54
notice: /Stage[2]/Hdp-hcat::Hcat::Service_check/Hdp-hadoop::Exec-hadoop[hcat::service_check::test]/Hdp::Exec[hadoop --config /etc/hadoop/conf fs -test -e /apps/hive/warehouse/hcatsmokeidd4b2a272_date472514]/Anchor[hdp::exec::hadoop --config /etc/hadoop/conf fs -test -e /apps/hive/warehouse/hcatsmokeidd4b2a272_date472514::begin]: Dependency Exec[hcatSmoke.sh prepare] has failures: true
notice: /Stage[2]/Hdp-hcat::Hcat::Service_check/Hdp-hadoop::Exec-hadoop[hcat::service_check::test]/Hdp::Exec[hadoop --config /etc/hadoop/conf fs -test -e /apps/hive/warehouse/hcatsmokeidd4b2a272_date472514]/Exec[hadoop --config /etc/hadoop/conf fs -test -e /apps/hive/warehouse/hcatsmokeidd4b2a272_date472514]: Dependency Exec[hcatSmoke.sh prepare] has failures: true

烟度测试有可能有缺陷吗?

z9zf31ra

z9zf31ra1#

向mysql中的配置单元用户授予权限

GRANT ALL ON metastore.* TO 'hive'@'sandbox.hortonworks.com';
GRANT ALL ON metastore TO 'hive'@'sandbox.hortonworks.com';
FLUSH PRIVILEGES;
fd3cxomn

fd3cxomn2#

我不知道为什么,但是存储的密码不正确。我做了以下更改,配置单元元存储和配置单元工作:
连接到mysql,执行下一个命令更改“password”的配置单元用户密码(原始密码是加密的,未知的):
为'hive'@'sandbox.hortonworks.com'=password('password')设置密码;
将以下内容添加到hive-site.xml <property> <name>javax.jdo.option.ConnectionPassword</name> <value>password</value> </property> 启动配置单元元存储
配置单元—服务元存储
但是,当我重新启动hdp虚拟机时,配置单元元存储不再自动启动。

相关问题