Hi,

Have you created the Hive Metastore?

http://www.cloudera.com/content/cloudera/en/documentation/cdh5/v5-1-x/CDH5-Installation-Guide/cdh5ig_hive_metastore_configure.html


and then try to start the server

*Thanks & Regards,*

*Srinivas T*

On Thu, Mar 5, 2015 at 2:57 PM, Pratik Gadiya <pratik_gad...@persistent.com>
wrote:

>   Hi,
>
> I am trying to deploy a hadoop cluster using Ambari Blueprint.
> All the services are up and running except one i.e. Hive Server 2.
>
> I tried to look into the logs(/var/log/hive/hiveserver2.log) and looks
> like Hive is trying to access the MySQL service using username:hive.
>
> However, I think it does not have appropriate privileges or something.
> I am not able to track why it does so. Am I missing any configuration part
> in blueprint ?
>
> Please find below the blueprint and hiveserver2.log for better
> understanding and debugging of the issue.
>
> *blueprint.json:-*
>
> {
> “configurations” : [
> ],
> “host_groups” : [
> {
> “name” : “slave”,
> “configurations” : [ ],
> “components” : [
> { “name” : “ZOOKEEPER_CLIENT” },
> { “name” : “PIG” },
> { “name” : “OOZIE_CLIENT” },
> { “name” : “HBASE_CLIENT” },
> { “name” : “HCAT” },
> { “name” : “FALCON_CLIENT” },
> { “name” : “TEZ_CLIENT” },
> { “name” : “SLIDER” },
> { “name” : “SQOOP” },
> { “name” : “HDFS_CLIENT” },
> { “name” : “HIVE_CLIENT” },
> { “name” : “NODEMANAGER” },
> { “name” : “YARN_CLIENT” },
> { “name” : “MAPREDUCE2_CLIENT” },
> { “name” : “DATANODE” },
> { “name” : “GANGLIA_MONITOR” }
> ],
> “cardinality” : “1”
> },
> {
> “name” : “master”,
> “configurations” : [ ],
> “components” : [
> { “name” : “PIG” },
> { “name” : “HISTORYSERVER” },
> { “name” : “KAFKA_BROKER” },
> { “name” : “HBASE_REGIONSERVER” },
> { “name” : “OOZIE_CLIENT” },
> { “name” : “HBASE_CLIENT” },
> { “name” : “NAMENODE” },
> { “name” : “SUPERVISOR” },
> { “name” : “FALCON_SERVER” },
> { “name” : “HCAT” },
> { “name” : “KNOX_GATEWAY” },
> { “name” : “SLIDER” },
> { “name” : “AMBARI_SERVER” },
> { “name” : “APP_TIMELINE_SERVER” },
> { “name” : “HDFS_CLIENT” },
> { “name” : “HIVE_CLIENT” },
> { “name” : “FLUME_HANDLER” },
> { “name” : “WEBHCAT_SERVER” },
> { “name” : “RESOURCEMANAGER” },
> { “name” : “ZOOKEEPER_SERVER” },
> { “name” : “ZOOKEEPER_CLIENT” },
> { “name” : “STORM_UI_SERVER” },
> { “name” : “HBASE_MASTER” },
> { “name” : “HIVE_SERVER” },
> { “name” : “OOZIE_SERVER” },
> { “name” : “FALCON_CLIENT” },
> { “name” : “TEZ_CLIENT” },
> { “name” : “HIVE_METASTORE” },
> { “name” : “GANGLIA_SERVER” },
> { “name” : “SQOOP” },
> { “name” : “YARN_CLIENT” },
> { “name” : “MAPREDUCE2_CLIENT” },
> { “name” : “MYSQL_SERVER” },
> { “name” : “GANGLIA_MONITOR” },
> { “name” : “DRPC_SERVER” },
> { “name” : “NIMBUS” },
> { “name” : “SECONDARY_NAMENODE” }
> ],
> “cardinality” : “1”
> }
> ],
> “Blueprints” : {
> “stack_name” : “HDP”,
> “stack_version” : “2.2”
> }
> }
>
> *hiveserver2.log:-*
>
>
> *Caused by: java.sql.SQLException: Unable to open a test connection to the
> given database. JDBC url =
> jdbc:mysql://mymaster.ibm.com/hive?createDatabaseIfNotExist=true
> <http://mymaster.ibm.com/hive?createDatabaseIfNotExist=true>, username =
> hive. Terminating connection pool (set lazyInit to true if you expect to
> start your database after your app). Original Exception: ——
> java.sql.SQLException: Access denied for user ‘hive’@’mymaster.ibm.com
> <http://mymaster.ibm.com>’ (using password: YES)*
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:935)
> at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4101)
> at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1300)
> at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2337)
> at
> com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2370)
> at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2154)
> at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
> at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)
> at sun.reflect.GeneratedConstructorAccessor11.newInstance(Unknown Source)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
> at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
> at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
> at java.sql.DriverManager.getConnection(DriverManager.java:571)
> at java.sql.DriverManager.getConnection(DriverManager.java:187)
> at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:361)
> at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:416)
> at
> com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
> at
> org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:501)
> at
> org.datanucleus.store.rdbms.RDBMSStoreManager.<init>(RDBMSStoreManager.java:298)
> at sun.reflect.GeneratedConstructorAccessor47.newInstance(Unknown Source)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at
> org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:631)
> at
> org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:301)
> at
> org.datanucleus.NucleusContext.createStoreManagerForProperties(NucleusContext.java:1187)
> at org.datanucleus.NucleusContext.initialise(NucleusContext.java:356)
> at
> org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:775)
> at
> org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:333)
> at
> org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:202)
> at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at javax.jdo.JDOHelper$16.run(JDOHelper.java:1965)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.jdo.JDOHelper.invoke(JDOHelper.java:1960)
> at
> javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1166)
> at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)
> at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701)
> at
> org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:340)
> at
> org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:369)
> at
> org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:266)
>
> at
> org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:233)
> at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:73)
> at
> org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)
> at
> org.apache.hadoop.hive.metastore.RawStoreProxy.<init>(RawStoreProxy.java:56)
> at
> org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:65)
> at
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStore(HiveMetaStore.java:560)
> at
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:538)
> at
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:591)
> at
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:429)
> at
> org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:66)
> at
> org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:72)
> at
> org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:5554)
> at
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:178)
> at
> org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:73)
> at sun.reflect.GeneratedConstructorAccessor51.newInstance(Unknown Source)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at
> org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1447)
> at
> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:63)
> at
> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:73)
> at
> org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2689)
> at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2708)
> at
> org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:425)
> at
> org.apache.hive.service.cli.session.SessionManager.applyAuthorizationConfigPolicy(SessionManager.java:124)
> at
> org.apache.hive.service.cli.session.SessionManager.init(SessionManager.java:80)
> at org.apache.hive.service.CompositeService.init(CompositeService.java:59)
> at org.apache.hive.service.cli.CLIService.init(CLIService.java:107)
> at org.apache.hive.service.CompositeService.init(CompositeService.java:59)
> at org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:96)
> at
> org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:331)
> at
> org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.java:70)
> at
> org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:583)
> at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:456)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> ——
>
> at sun.reflect.GeneratedConstructorAccessor49.newInstance(Unknown Source)
>
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at com.jolbox.bonecp.PoolUtil.generateSQLException(PoolUtil.java:192)
> at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:422)
> at
> com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
> at
> org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:501)
> at
> org.datanucleus.store.rdbms.RDBMSStoreManager.<init>(RDBMSStoreManager.java:298)
> at sun.reflect.GeneratedConstructorAccessor47.newInstance(Unknown Source)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at
> org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:631)
> at
> org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:301)
> at
> org.datanucleus.NucleusContext.createStoreManagerForProperties(NucleusContext.java:1187)
> at org.datanucleus.NucleusContext.initialise(NucleusContext.java:356)
> at
> org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:775)
> … 53 more
> Caused by: java.sql.SQLException: Access denied for user ‘hive’@’
> mymaster.ibm.com’ (using password: YES)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:935)
> at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4101)
> at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1300)
> at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2337)
> at
> com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2370)
> at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2154)
> at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
> at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)
> at sun.reflect.GeneratedConstructorAccessor11.newInstance(Unknown Source)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
> at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
> at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
> at java.sql.DriverManager.getConnection(DriverManager.java:571)
> at java.sql.DriverManager.getConnection(DriverManager.java:187)
> at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:361)
> at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:416)
> … 64 more
> 2015-03-03 05:00:04,416 INFO [Thread-3]: server.HiveServer2
> (HiveStringUtils.java:run(679)) – SHUTDOWN_MSG:
>
> Let me know if I have missed any configuration to be added in the
> blueprint or anything else.
>
> Help Appreciated !!!
>
> Thanks
>
>
>
> DISCLAIMER ========== This e-mail may contain privileged and confidential
> information which is the property of Persistent Systems Ltd. It is intended
> only for the use of the individual or entity to which it is addressed. If
> you are not the intended recipient, you are not authorized to read, retain,
> copy, print, distribute or use this message. If you have received this
> communication in error, please notify the sender and delete all copies of
> this message. Persistent Systems Ltd. does not accept any liability for
> virus infected mails.
>
> DISCLAIMER ========== This e-mail may contain privileged and confidential
> information which is the property of Persistent Systems Ltd. It is intended
> only for the use of the individual or entity to which it is addressed. If
> you are not the intended recipient, you are not authorized to read, retain,
> copy, print, distribute or use this message. If you have received this
> communication in error, please notify the sender and delete all copies of
> this message. Persistent Systems Ltd. does not accept any liability for
> virus infected mails.
>

Reply via email to