我们正试图在Linux服务器上启动hive-Metoreore,但我们正面临一个问题。如果我们尝试使用此命令启动hive-Metoreore服务:
sudo hive --services Metoreore
我们遇到了很多这样的错误:
由以下原因引起:java.sql.SQLException:拒绝访问用户' hive' @' sandbox.hortonworks.com' (使用密码:是) 在com.mysql.jdbc.SQLError.createSQLException(SQLError.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。(ConnectionImpl.java:792) 在com.mysql.jdbc.JDBC4Connection。(JDBC4Connection.java:49) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at 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个
我们还尝试重置用户配置单元的密码,但它没有帮助。
我们想要启动hive-Metoreore的原因是端口9083没有监听我们的服务器。我们也不知道为什么在重新启动服务器后,Metastore-service不再运行。
如果您知道重启hive 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)
修改:我发现了另一条错误消息:
我使用serverip:8080连接到Ambari并检查了某些服务的状态。如果我尝试手动启动hive-Metoreore,我会收到以下错误消息:
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
在启动Hive-services的最后4个步骤中发生错误。步骤" Hive Metastore开始"和" Hiveserver 2开始"已经完成没有错误。名为" Hive Check的步骤执行"失败。这是stdout上的错误消息:
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
烟雾测试是否有可能存在缺陷?
答案 0 :(得分:2)
在mysql中为hive用户授予权限
GRANT ALL ON metastore.* TO 'hive'@'sandbox.hortonworks.com';
GRANT ALL ON metastore TO 'hive'@'sandbox.hortonworks.com';
FLUSH PRIVILEGES;
答案 1 :(得分:0)
我不是为什么,但存储的密码不正确。我做了以下更改,并且hive Metastore和hive工作:
SET PASSWORD FOR'hive'@sandbox.hortonworks.com'= PASSWORD('password');
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>password</value>
</property>
hive --service Metoreore
然而,当我重启HDP虚拟机时,Hive Metastore不会再自动启动。