HDP3.1 很新没错, 可出现问题让你怀疑人生,特别是像本人原来安装的是CDH,删除后遇到问题特别多, 在此记录一下踩坑历程.
安装采用的是Ansible自动安装脚本,可参考:Ansible 一键安装HDP 3.1
问题1: ERROR namenode.NameNode (NameNode.java:main(1715)) – Failed to start namenode
2019-06-23 13:26:24,611 ERROR namenode.NameNode (NameNode.java:main(1715)) - Failed to start namenode.
java.io.IOException: NameNode is not formatted.
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:237)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:1090)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:714)
at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:632)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:694)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:937)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:910)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1643)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1710)
2019-06-23 13:26:24,613 INFO util.ExitUtil (ExitUtil.java:terminate(210)) - Exiting with status 1: java.io.IOException: NameNode is not formatted.
2019-06-23 13:26:24,614 INFO namenode.NameNode (LogAdapter.java:info(51)) - SHUTDOWN_MSG:
//启动过程Ambari提示:
2019-06-23 21:48:54,010 - NameNode HA states: active_namenodes = [(u'nn1', 'dosercn60001.lts.local:50070')], standby_namenodes = [], unknown_namenodes = [(u'nn2', 'dosercn60002.lts.local:50070')]
2019-06-23 21:48:54,012 - Will retry 116 time(s), caught exception: The NameNode nn2 is not listed as Active or Standby, waiting.... Sleeping for 5 sec(s)
解决方法:
(1) 在name node 1 执行:
$ sudo -u hdfs hdfs namenode -format
(2) 在Ambari启动namde node 1
(3) 在name node 1 已成功启动的情况下, 在name node 2 执行以下语句:
$ hdfs namenode -bootstrapStandby
$ chown -R hdfs:hadoop namenode/ –name node存储路径
(4) 在Ambari启动name node 2
(5) 重启 ZKFailoverController
问题2: Run with -formatZK flag to initialize ZooKeeper
Run with -formatZK flag to initialize ZooKeeper.
2019-06-23 20:03:04,886 INFO ha.ActiveStandbyElector (ActiveStandbyElector.java:processWatchEvent(637)) - Successfully authenticated to ZooKeeper using SASL.
2019-06-23 20:03:04,905 INFO zookeeper.ZooKeeper (ZooKeeper.java:close(684)) - Session: 0x26b84378ae60001 closed
2019-06-23 20:03:04,905 INFO zookeeper.ClientCnxn (ClientCnxn.java:run(524)) - EventThread shut down
2019-06-23 20:03:04,909 INFO tools.DFSZKFailoverController (LogAdapter.java:info(49)) - SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down DFSZKFailoverController at dosercn60001.lts.local/192.168.19.55
解决方法:
在报错信息的服务器执行:
$ hdfs zkfc -formatZK
问题3: aught exception: ZooKeeper node /hiveserver2 is not ready yet. Sleeping for 10 sec(s)
解决方法:
重启 ZooKeeper 服务
问题4: LLAP无法启动,提示:Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
Caused by: java.lang.RuntimeException: Error applying authorization policy on hive configuration: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
Caused by: org.apache.hadoop.hive.metastore.api.MetaException: Metrics source hiveserver2 already exists!
解决方法:
To resolve this issue, disable hive.server2.metrics.enabled in Ambari Hive Advanced config.
Note: Disabling this property will affect only metrics shown in Grafana.
问题5:
resource_management.core.exceptions.ExecutionFailed: Execution of ‘ambari-python-wrap /usr/bin/hdp-select set oozie-client
3.1.0.0-78′ returned 1. symlink target /usr/hdp/current/oozie-client for oozie already exists and it is not a symlink.
resource_management.core.exceptions.ExecutionFailed: Execution of ‘tar -xvf /usr/hdp/current/oozie-server/oozie-sharelib.tar.gz -C /usr/hdp/current/oozie-server’ returned 2. tar: /usr/hdp/current/oozie-server/oozie-sharelib.tar.gz: Cannot open: No such file or directory
解决方法:
安装过程出错, 缺少太多文件, 最好的方法是重装.
Leave a Reply