1.Starting Hive Metastore Server 出現 com.mysql.cj.core.exceptions.CJCommunicationsException: Communications link failure
1.當然,你首先要檢查你的網絡是否連通,或者防火牆有沒有關閉,然後你要考慮到你的mysql服務啓動沒有,你可以輸入mysql -uroot -p試一下進得去你的mysql沒有,來驗證mysql啓動沒有,或者輸入netstat -ano | grep 3306 看下你的3306端口被監聽沒有,如果沒有,則要啓動mysql服務。
2.還有許多人是前一天用的好好的,第二天突然就出現了這個錯誤,原因是連接超時,我們只需要修改mysql的配置文件my.cnf(Linux下輸入命令whereis mysql查看mysql配置文件在哪裏)修改如下
wait_timeout=1814400 interactive_timeout=1814400
3.如果以上兩種方法都不行,那就再試試最後一種,還是打開MySql配置文件
把這個localhost改成你本機的ip地址或者你的域名,當然你的域名要已經映射。然後restart你的mysql服務
打開你的hive目錄下的hive-site.xml,將所有的system:java.io.tmpdir全部替換爲/hive/tmp(這個目錄是你自己創建的,什麼樣的都可以),一定要全部替換掉。我記得是有3個還是4個,一定要替換全。3. NestedThrowablesStackTrace:
Could not create "increment"/"table" value-generation container `SEQUENCE_TABLE` since autoCreate flags do not allow it.
org.datanucleus.exceptions.NucleusUserException: Could not create "increment"/"table" value-generation container `SEQUENCE_TABLE` since autoCreate flags do not allow it.
打開你的mysql配置文件,my.cnf,加入binlog_format=MIXED配置即可4. Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User:fzy is not allowed to impersonate 1 (state=08S01,code=0)
打開你的hadoop配置文件core-site.xml,追加如下配置項
5.Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.) (state=08S01,code=1)
我畫出紅色框框的是自己的用戶名,要根據你自己的狀況改變
打開你的Hive配置文件,hive-site.xml,修改以下配置剩下的一些錯誤,比如jdbc驅動的問題或者mysql中的權限問題,網上已經有很詳細的解決方案,所以我在這裏就不一一贅述了,最後,如果我有說得不好的地方或者不對的地方,也請大家指出來,我可以更好地加以修改。
保存,然後重啓你的hiveserver2
歡迎大家轉載,但是轉載是請註明出處,十分感謝。