hive installation common errors

 hive compilation error

mvn clean package -DskipTests -Phadoop-2 -Pdist

failure log 1

Failed to execute goal on project hive-service: Could not resolve dependencies for project org.apache.hive:hive-service:jar:1.1.0-cdh5.7.0: Failed to collect dependencies at org.apache.directory.server:apacheds-server-integ:jar:1.5.6 -> org.apache.directory.client.ldap:ldap-client-api:jar:0.1-SNAPSHOT: Failed to read artifact descriptor for org.apache.directory.client.ldap:ldap-client-api:jar:0.1-SNAPSHOT: Could not transfer artifact org.apache.directory.client.ldap:ldap-client-api:pom:0.1-SNAPSHOT from/to apache.snapshots (http://repository.apache.org/snapshots): Connect to repository.apache.org:80 [repository.apache.org/207.244.88.140] failed: Connection refused (Connection refused) -> [Help 1]

failure log 2

[ERROR] Failed to execute goal on project hive-service:
Could not resolve dependencies for project org.apache.hive:hive-service:jar:1.1.0-cdh5.7.0:
Failed to collect dependencies at org.apache.directory.server:apacheds-server-integ:jar:1.5.6 -> org.apache.directory.client.ldap:ldap-client-api:jar:0.1-SNAPSHOT:
Failed to read artifact descriptor for org.apache.directory.client.ldap:ldap-client-api:jar:0.1-SNAPSHOT:
Could not transfer artifact org.apache.directory.client.ldap:ldap-client-api:pom:0.1-SNAPSHOT from/to apache.snapshots (http://repository.apache.org/snapshots):
Network is unreachable (connect failed) -> [Help 1]

 

Not yet resolved. . .

Possibly due to the network.


 

Can't start after installation

log:

Caused by: java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://hadoop000:3306/metastore?createDatabaseIfNotExist=true, username = root. 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 'root'@'hadoop000' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)

After checking online, the solution is summarized

1. Check whether hive-site.xml is configured correctly, and the mysql account password cannot be wrongly written.

2. hive is not initialized, initialized

schematool -dbType mysql -initSchema

3. The hive version is too high.

4. The problem of derby-10.11.1.1.jar under HIVE_HOME/lib was solved successfully by replacing derby-10.11.1.1.jar with derby-10.10.2.0.jar

To sum up, my problem is that the mysql password in the hive-site.xml configuration file is wrong.

An essential item before configuring hive, grant permissions to mysql

mysql -uroot -p

>grant all privileges on *.* to root@"%" identified by "123456" with grant option; >grant all privileges on *.* to root@"hadoop000" identified by "123456" with grant option; >grant all privileges on *.* to root@"localhost" identified by "123456" with grant option;
>quit;

解释:

grant permission 1, permission 2, ... permission n on database name. table name to user name@user address identified by 'connection password';)

* By default, the mysql database only allows root users to log in through localhost/127.0.0.1

* In the statement above with grant:

all: indicates all permissions;

*.*: Represents database.data table;

root: Indicates which user is authorized, the user name can be arbitrarily specified, if not, it will be created automatically;

'hadoop000' : which host to authorize to

'123456': The password to authorize the user to log in

If you are not sure if you are successful, you can check mysql.user

mysql >select host,user,password from mysql.user;

  

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325320460&siteId=291194637