hiveのメタデータをmysqlに初期化中にエラーorgを報告する.apache.hadoop.hive.metastore.HiveMetaException

1617 ワード

この問題は本当に穴があいている!!!
仮想マシンはhiveを構成し、メタデータをmysqlに初期化する際にorgをエラーする.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version
[root@centos01 bin]# ./schematool -initSchema -dbType mysql
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hive/apache-hive-2.3.3-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hadoop/hadoop-2.7.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Metastore connection URL:	 jdbc:mysql://localhost:3306/hive?useSSL=true
Metastore Connection Driver :	 com.mysql.jdbc.Driver
Metastore connection User:	 root
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
Underlying cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException : Communications link failure

The last packet successfully received from the server was 1,206 milliseconds ago.  The last packet sent successfully to the server was 1,200 milliseconds ago.
SQL Error code: 0
Use --verbose for detailed stacktrace.
*** schemaTool failed ***

プロファイルをチェックしてもエラーがない場合は、mysqlのバージョン番号を見てください.私のmysqlのバージョン番号は5.7.25です.交換したいくつかのバージョンの駆動jarパッケージは、hive/libのmysql駆動jarパッケージを5.1.24に変更します.これ以上初期化すれば問題ありません.具体的な理由は不明ですが、バージョンが互換性がない可能性があります.
 
JArパッケージ:https://download.csdn.net/download/qq_42454244/10967268
mavenで自分でダウンロードすることもできます.