mysql - hive broke after dropping a table -


i had installed hive 2.0.0 on hadoop cluster using mysql metastore. hive works fine until yesterday when tried dropping table actual .orc file in hdfs had been deleted.

after that, hive broke. first, hive command line hang several minutes before giving hive> prompt. second, if type show databases; on hive command line, again hang long time , gave errors caused by: java.sql.sqlexception: access denied user 'hive'@'namenode01-bi-dev' (using password: yes) tried following command posted on other question , got same problem.

hive --service metastore 

i had searched through stackoverflow error. post setting mysql privileges. don't think case problem. had checked several time on hive-site.xml , mysql user have correct privileges. if it's privilege problem , how can hive worked fine before dropping table. in case,below related hive-site.xml fields:

<property>  <name>javax.jdo.option.connectionpassword</name>  <value>hive</value>  <description>password use against metastore database</description>    </property>  <property>   <name>javax.jdo.option.connectionurl</name>   <value>jdbc:mysql://10.104.90.40:3306/hive?createdatabaseifnotexist=true</value> </property>  <property>  <name>javax.jdo.option.connectiondrivername</name>  <value>com.mysql.jdbc.driver</value>  <description>driver class name jdbc metastore</description> </property>  <property> <name>javax.jdo.option.connectionusername</name> <value>hive</value> <description>username use against metastore database</description> </property> 

and in mysql :

mysql> select user,host,password mysql.user; +------+-------------------+-------------------------------------------+ | user | host              | password                                  | +------+-------------------+-------------------------------------------+ | root | localhost         | *cfbf6f2fb240d9b28dc5d0a313b6baa047368aaf | | root | namenode01-bi-dev |                                           | | root | 127.0.0.1         |                                           | |      | localhost         |                                           | |      | namenode01-bi-dev |                                           | | hive | localhost         | *4df1d66463c18d44e3b001a8fb1bbfbea13e27fc | | hive | namenode01-bi-dev | *4df1d66463c18d44e3b001a8fb1bbfbea13e27fc | | hive | datanode02-bi-dev | *4df1d66463c18d44e3b001a8fb1bbfbea13e27fc | +------+-------------------+-------------------------------------------+ 8 rows in set (0.00 sec) mysql> show grants hive@'namenode01-bi-dev' -> ; +---------------------------------------------------------------------------------------------------------------------+ | grants hive@namenode01-bi-dev                                                                                   | +---------------------------------------------------------------------------------------------------------------------+ | grant usage on *.* 'hive'@'namenode01-bi-dev' identified     password '*4df1d66463c18d44e3b001a8fb1bbfbea13e27fc' | | grant privileges on `hive`.* 'hive'@'namenode01-bi-dev'                                                      | +---------------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec) 

i had tried reinstall mysql , hive on namenode , reboot machine encounter same problem. currently, using datanode run mysql server , hive .with same setting , configuration, hive on datanode works. still can't figure out went wrong hive on namenode. error doesn't make sense.had encounter same problem or know went wrong?

it turned out problem caused mysql. after adding following line /etc/my.cnf, hive works fine before

skip-name-resolve 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -