2 lorry322 lorry322 于 2013.12.05 20:51 提问

mapreduce 运行时候出现的错误,ZipException

用tomcat跑一个web工程,用mapreduce从mysql导入数据时遇到如下问题,求解:

13/12/05 20:39:35 INFO mapred.JobClient: Running job: job_201311251041_0681
13/12/05 20:39:36 INFO mapred.JobClient: map 0% reduce 0%
13/12/05 20:39:40 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_m_000003_0, Status : FAILED
Error initializing attempt_201311251041_0681_m_000003_0:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)

13/12/05 20:39:40 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_0&filter=stdout
13/12/05 20:39:40 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_0&filter=stderr

13/12/05 20:39:43 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_r_000002_0, Status : FAILED
Error initializing attempt_201311251041_0681_r_000002_0:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)

13/12/05 20:39:43 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000002_0&filter=stdout
13/12/05 20:39:43 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000002_0&filter=stderr
13/12/05 20:39:46 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_m_000003_1, Status : FAILED
Error initializing attempt_201311251041_0681_m_000003_1:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)

13/12/05 20:39:46 WARN mapred.JobClient: Error reading task outputhttp://dell1:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_1&filter=stdout
13/12/05 20:39:46 WARN mapred.JobClient: Error reading task outputhttp://dell1:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_1&filter=stderr
13/12/05 20:39:49 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_r_000002_1, Status : FAILED
Error initializing attempt_201311251041_0681_r_000002_1:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)

13/12/05 20:39:49 WARN mapred.JobClient: Error reading task outputhttp://dell1:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000002_1&filter=stdout
13/12/05 20:39:49 WARN mapred.JobClient: Error reading task outputhttp://dell1:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000002_1&filter=stderr
13/12/05 20:39:52 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_m_000003_2, Status : FAILED
Error initializing attempt_201311251041_0681_m_000003_2:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)

13/12/05 20:39:52 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_2&filter=stdout
13/12/05 20:39:52 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000003_2&filter=stderr
13/12/05 20:39:58 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_m_000002_0, Status : FAILED
Error initializing attempt_201311251041_0681_m_000002_0:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)

13/12/05 20:39:58 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000002_0&filter=stdout
13/12/05 20:39:58 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000002_0&filter=stderr
13/12/05 20:40:01 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_r_000001_0, Status : FAILED
Error initializing attempt_201311251041_0681_r_000001_0:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)

13/12/05 20:40:01 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000001_0&filter=stdout
13/12/05 20:40:01 WARN mapred.JobClient: Error reading task outputhttp://dell2:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000001_0&filter=stderr
13/12/05 20:40:07 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_m_000002_1, Status : FAILED
Error initializing attempt_201311251041_0681_m_000002_1:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)

13/12/05 20:40:07 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000002_1&filter=stdout
13/12/05 20:40:07 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_m_000002_1&filter=stderr
13/12/05 20:40:10 INFO mapred.JobClient: Task Id : attempt_201311251041_0681_r_000001_1, Status : FAILED
Error initializing attempt_201311251041_0681_r_000001_1:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:36)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:815)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:1664)
at org.apache.hadoop.mapred.TaskTracker.access$1200(TaskTracker.java:97)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:1629)

13/12/05 20:40:10 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000001_1&filter=stdout
13/12/05 20:40:10 WARN mapred.JobClient: Error reading task outputhttp://dell4:50060/tasklog?plaintext=true&taskid=attempt_201311251041_0681_r_000001_1&filter=stderr

我是调用hadoop中对数据库操作的库,实现把某一个表从mysql数据库并行导入hdfs,我单独写一个java程序可以成功导入,但是放到web工程里边,mapreduce就会出现这个ZipException问题

1个回答

qq2867234
qq2867234   2013.12.19 01:39
已采纳

我也遇到这个问题,应该是web工程启动hadoop的job时出了问题,因为java工程启动的时候可以选择run on hadoop,但是到了web就不受我们控制了,可能是成了run on Application,才出现这些问题。。现在还不知道该怎么解决,解决了吗?可以加我qq交流一下吗。(270104832)

sampanj
sampanj 请问这个具体报错原因有弄清楚么?
接近 4 年之前 回复
lorry322
lorry322 我的解决方法是:把这个mapreduce程序移出web工程单独写一个java程序,写完后打成jar包,然后在web工程里边调用这个后台的jar包跑里边的mapreduce就可以了
4 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!