hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pratik Gadiya <pratik_gad...@persistent.com>
Subject RE: FW: Hive error while starting up services using Ambari
Date Wed, 11 Mar 2015 10:16:04 GMT
Hi Amith and Raunak,

I was able to resolve that error by the solution which you guys had described.

Actually, Ambari was not able to pick up the password which I had given via UI.
Internally, it was taking blank password to access that hive database resulting into failure
while connecting to that DB.

I changed the password of the "hive" user and that worked for me :)

Thanks for all your support !!

[ Personally, I felt Ambari is not consistent in deployment, because similar blueprint creates
different errors on different nodes in spite of having similar configuration for all of nodes.
This is WEIRD :( ]

Thanks,
Pratik

-----Original Message-----
From: Amith sha [mailto:amithsha92@gmail.com] 
Sent: Wednesday, March 11, 2015 2:31 PM
To: user@hive.apache.org
Subject: Re: FW: Hive error while starting up services using Ambari

Check your mysql Database whether you have hive user & hive database if not create a user
in the name of hive & set privileges to access hive database Thanks & Regards Amithsha


On Wed, Mar 11, 2015 at 2:02 PM, Raunak Jhawar <raunak.jhawar@gmail.com> wrote:
> Can you verify whether you can access hive metastore (hive database 
> created on your mysql instance) with the given credentials.
>
> --
> Thanks,
> Raunak Jhawar
> m: 09820890034
>
>
>
>
>
>
> On Wed, Mar 11, 2015 at 12:52 PM, Pratik Gadiya 
> <pratik_gadiya@persistent.com> wrote:
>>
>> Hi Srinivas,
>>
>>
>>
>> I think that should be created by Ambari, if I have described all the 
>> services to be deployed using my Ambari blueprint  json.
>>
>>
>>
>> Please let me know if you want me to run few commands just to verify 
>> whether Hive Metastore is created or not.
>>
>>
>>
>> Thanks,
>>
>> Pratik
>>
>>
>>
>> From: Srinivas Thunga [mailto:srinivas.thunga@gmail.com]
>> Sent: Thursday, March 05, 2015 3:27 PM
>> To: user@hive.apache.org
>> Subject: Re: FW: Hive error while starting up services using Ambari
>>
>>
>>
>> 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_gadiya@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, 
>> 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’
>> (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:2
>> 370) 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(DelegatingC
>> onstructorAccessorImpl.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.jav
>> a:120)
>> at
>> org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionIm
>> pl.getConnection(ConnectionFactoryImpl.java:501)
>> at
>> org.datanucleus.store.rdbms.RDBMSStoreManager.<init>(RDBMSStoreManage
>> r.java:298) at 
>> sun.reflect.GeneratedConstructorAccessor47.newInstance(Unknown 
>> Source) at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
>> onstructorAccessorImpl.java:45) at 
>> java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>> at
>> org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExten
>> sion(NonManagedPluginRegistry.java:631)
>> at
>> org.datanucleus.plugin.PluginManager.createExecutableExtension(Plugin
>> Manager.java:301)
>> at
>> org.datanucleus.NucleusContext.createStoreManagerForProperties(Nucleu
>> sContext.java:1187) at 
>> org.datanucleus.NucleusContext.initialise(NucleusContext.java:356)
>> at
>> org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfigurat
>> ion(JDOPersistenceManagerFactory.java:775)
>> at
>> org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenc
>> eManagerFactory(JDOPersistenceManagerFactory.java:333)
>> at
>> org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceMa
>> nagerFactory(JDOPersistenceManagerFactory.java:202)
>> at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source) at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.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.invokeGetPersistenceManagerFactoryOnImplementatio
>> n(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(Ob
>> jectStore.java:369)
>> at
>> org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.j
>> ava:266)
>>
>> at
>> org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java
>> :233) at 
>> org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:7
>> 3)
>> at
>> org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.ja
>> va:133)
>> at
>> org.apache.hadoop.hive.metastore.RawStoreProxy.<init>(RawStoreProxy.j
>> ava: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(HiveM
>> etaStore.java:538)
>> at
>> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefau
>> ltDB(HiveMetaStore.java:591)
>> at
>> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMe
>> taStore.java:429)
>> at
>> org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHM
>> SHandler.java:66)
>> at
>> org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(Retrying
>> HMSHandler.java:72)
>> at
>> org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(
>> HiveMetaStore.java:5554)
>> at
>> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaS
>> toreClient.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(DelegatingC
>> onstructorAccessorImpl.java:45) at 
>> java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>> at
>> org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStore
>> Utils.java:1447)
>> at
>> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(Retry
>> ingMetaStoreClient.java:63)
>> at
>> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(Ret
>> ryingMetaStoreClient.java:73)
>> at
>> org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.ja
>> va:2689) at 
>> org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2708)
>> at
>> org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.jav
>> a:425)
>> at
>> org.apache.hive.service.cli.session.SessionManager.applyAuthorization
>> ConfigPolicy(SessionManager.java:124)
>> at
>> org.apache.hive.service.cli.session.SessionManager.init(SessionManage
>> r.java:80) at 
>> org.apache.hive.service.CompositeService.init(CompositeService.java:5
>> 9) at 
>> org.apache.hive.service.cli.CLIService.init(CLIService.java:107)
>> at 
>> org.apache.hive.service.CompositeService.init(CompositeService.java:5
>> 9) at 
>> org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:96)
>> at
>> org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServe
>> r2.java:331)
>> at
>> org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.jav
>> a:70)
>> at
>> org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execut
>> e(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(DelegatingMethodAcces
>> sorImpl.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(DelegatingC
>> onstructorAccessorImpl.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.jav
>> a:120)
>> at
>> org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionIm
>> pl.getConnection(ConnectionFactoryImpl.java:501)
>> at
>> org.datanucleus.store.rdbms.RDBMSStoreManager.<init>(RDBMSStoreManage
>> r.java:298) at 
>> sun.reflect.GeneratedConstructorAccessor47.newInstance(Unknown 
>> Source) at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
>> onstructorAccessorImpl.java:45) at 
>> java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>> at
>> org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExten
>> sion(NonManagedPluginRegistry.java:631)
>> at
>> org.datanucleus.plugin.PluginManager.createExecutableExtension(Plugin
>> Manager.java:301)
>> at
>> org.datanucleus.NucleusContext.createStoreManagerForProperties(Nucleu
>> sContext.java:1187) at 
>> org.datanucleus.NucleusContext.initialise(NucleusContext.java:356)
>> at
>> org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfigurat
>> ion(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:2
>> 370) 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(DelegatingC
>> onstructorAccessorImpl.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.
>>
>>
>>
>> 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.

Mime
View raw message