作者:手机用户2502880481 | 来源:互联网 | 2023-09-17 11:22
1.org.apache.hadoop.yarn.exceptions.InvalidAuxServiceException:TheauxService:mapreduce_shu
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
yarn.nodemanager.aux-services
mapreduce_shuffle
yarn.nodemanager.aux-services.mapreduce_shuffle.class
org.apache.hadoop.mapred.ShuffleHandler
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