Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

run oozie job error

avatar
Contributor

When I run the job,I got a error:

2016-08-25 10:34:31,351  WARN ActionStartXCommand:523 - SERVER[hdp-m2] USER[oozie] GROUP[-] TOKEN[] APP[sqoop-wf] JOB[0000002-160825102604568-oozie-root-W] ACTION[0000002-160825102604568-oozie-root-W@sqoop-node] Error starting action [sqoop-node]. ErrorType [FAILED], ErrorCode [EJ001], Message [Could not locate Oozie sharelib]
org.apache.oozie.action.ActionExecutorException: Could not locate Oozie sharelib
	at org.apache.oozie.action.hadoop.JavaActionExecutor.addSystemShareLibForAction(JavaActionExecutor.java:730)
	at org.apache.oozie.action.hadoop.JavaActionExecutor.addAllShareLibs(JavaActionExecutor.java:825)
	at org.apache.oozie.action.hadoop.JavaActionExecutor.setLibFilesArchives(JavaActionExecutor.java:816)
	at org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:1044)
	at org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1293)
	at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:250)
	at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:64)
	at org.apache.oozie.command.XCommand.call(XCommand.java:286)
	at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:321)
	at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:250)
	at org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:175)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

then, I check the sharelib like this

[root@hdp-m2 bin]# oozie admin -oozie http://hdp-m2:11000/oozie -shareliblist
[Available ShareLib]

so, I create sharelib like this

./oozie-setup.sh sharelib create -fs http://hdp-m2:8020 -locallib /usr/hdp/2.4.0.0-169/oozie/lib/*

then, I got the other error

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Error: tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

Stack trace for the error was (for debug purposes):
--------------------------------------
ExitCodeException exitCode=2: tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
 at org.apache.hadoop.util.Shell.runCommand(Shell.java:576)
 at org.apache.hadoop.util.Shell.run(Shell.java:487)
 at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:753)
 at org.apache.hadoop.fs.FileUtil.unTarUsingTar(FileUtil.java:675)
 at org.apache.hadoop.fs.FileUtil.unTar(FileUtil.java:651)
 at org.apache.oozie.tools.OozieSharelibCLI.run(OozieSharelibCLI.java:131)
 at org.apache.oozie.tools.OozieSharelibCLI.main(OozieSharelibCLI.java:57)
--------------------------------------

I don't konw why, Can somebody help me please.

Thank you very much!

1 ACCEPTED SOLUTION

avatar
Super Collaborator

@da li

As @Predrag Minovic mentioned for sharelib setup create, use following Oozie sharelib setup create command through 'oozie' user.

/usr/hdp/current/oozie-server/bin/oozie-setup.sh sharelib create -fs hdfs://<hdfs hostname>:<hdfs port> -locallib /usr/hdp/current/oozie-server/oozie-sharelib.tar.gz

Above command will create timestamp based oozie share lib directory to HDFS directory /user/oozie/share/lib .

Hope this help you.

View solution in original post

2 REPLIES 2

avatar
Master Guru

Oozie share lib was supposed to be created during installation and start-up of the Oozie server, and the default location in HDFS is set by:

oozie.service.WorkflowAppService.system.libpath=/user/${user.name}/share/lib

In your case it's /user/oozie/share/lib. Check do you have anything there. If yes, use "oozie admin ... -sharelibupdate, if not, restart Oozie server, it's supposed to recreate it. Check logs (output in Ambari) after server restart for any errors, and try to fix them. Finally, if there is a need to run "oozie-setup.sh sharelib create" use /usr/hdp/current/oozie-server/oozie-sharelib.tar.gz as the argument to "-locallib". Or you can just untar the tar-ball, "-put share" to /user/oozie/, and run sharelibupdate.

avatar
Super Collaborator

@da li

As @Predrag Minovic mentioned for sharelib setup create, use following Oozie sharelib setup create command through 'oozie' user.

/usr/hdp/current/oozie-server/bin/oozie-setup.sh sharelib create -fs hdfs://<hdfs hostname>:<hdfs port> -locallib /usr/hdp/current/oozie-server/oozie-sharelib.tar.gz

Above command will create timestamp based oozie share lib directory to HDFS directory /user/oozie/share/lib .

Hope this help you.