1.org.apache.hadoop.yarn.exceptions.InvalidAuxServiceException: The auxService:mapreduce_shuffle does not exist
问题分析:The auxService:mapreduce_shuffle does not exist;yarn-site.xml配置文件有问题
解决方法:
1)vim /usr/local/hadoop/etc/hadoop/yarn-site.xml
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce_shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
2)重新启动yarn:
/usr/local/hadoop/sbin/stop-yarn.sh
/usr/local/hadoop/sbin/start-yarn.sh
2.ERROR tool.ImportTool: Import failed: org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory hdfs://192.168.15.115:9000/hive/root already exists
解决方法: hadoop fs -rm -r /hive/root
3.ERROR exec.DDLTask: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.ObjectMapper.readerFor(Ljava/lang/Class;)Lcom/fasterxml/jackson/databind/ObjectReader;
造成的原因:sqoop与hive使用的jackson包的版本冲突导致
解决方法:将sqoop的lib目录下jackson*.jar包备份,hive的lib目录下的jackson相关jar包拷贝到sqoop的lib目录下
4. ERROR hive.HiveConfig: Could not load org.apache.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly.
解决方法:
1)/etc/profile最后加入 export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$HIVE_HOME/lib/*
然后刷新配置,source /etc/profile
2)复制hive库文件中hive-exec*到sqoop的库文件中
5. ERROR Could not register mbeans java.security.AccessControlException: access denied (“javax.management.MBeanTrustPermission” “register”)
解决方法:
vim /usr/local/java/jre/lib/security/java.policy
新增语句:
grant {
// JMX Java Management eXtensions
permission javax.management.MBeanTrustPermission “register”;
};
6.创建job的时候报错:
Exception in thread “main” java.lang.NoClassDefFoundError: org/json/JSONObject
造成的原因:这是因为sqoop缺少java-json.jar包.
解决方法:
java-json.jar下载地址:http://www.java2s.com/Code/Jar/j/Downloadjavajsonjar.htm
将java-json.jar放到/usr/local/sqoop/lib
作者:宇晨棒棒的
链接:https://www.jianshu.com/p/2e88edf689c9
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。