Oozie:出错集锦

2018-08-16  本文已影响0人  chengruru

一、mysql 驱动jar包问题

       出错提示如下:

$ ./bin/ooziedb.sh create -sqlfile oozie.sql -run DB Connection
  setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"

Validate DB Connection

Error: Could not connect to the database: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Stack trace for the error was (for debug purposes):
--------------------------------------
java.lang.Exception: Could not connect to the database: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:915)
    at org.apache.oozie.tools.OozieDBCLI.createDB(OozieDBCLI.java:185)
    at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:129)
    at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:80)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.apache.oozie.tools.OozieDBCLI.createConnection(OozieDBCLI.java:904)
    at org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:911)
    ... 3 more
--------------------------------------

处理:
对于在oozie里放置Mysql驱动包,需要在多处放置:

1.  $OOZIE_HOME/libext
2.  $OOZIE_HOME/lib下 
3.  $OOZIE_HOME/oozie-server/lib

将mysql驱动jar包放在这三处,应该就没问题了!

二、hadoop 配置文件路径的配置问题

       出错提示如下:

21-oozie-hado-W] ACTION[0000000-180815195606821-oozie-hado-W@mr-node] Error starting action [mr-node]. ErrorType [FAILED], ErrorCode [It should n
ever happen], Message [File /user/hadoop/share/lib does not exist]
org.apache.oozie.action.ActionExecutorException: File /user/hadoop/share/lib does not exist
    at org.apache.oozie.action.hadoop.JavaActionExecutor.addSystemShareLibForAction(JavaActionExecutor.java:760)
    at org.apache.oozie.action.hadoop.JavaActionExecutor.addAllShareLibs(JavaActionExecutor.java:843)
    at org.apache.oozie.action.hadoop.JavaActionExecutor.setLibFilesArchives(JavaActionExecutor.java:829)
    at org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:1147)
    at org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1410)
    at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:232)
    at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:63)
    at org.apache.oozie.command.XCommand.call(XCommand.java:286)
    at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:332)
    at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:261)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:179)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

解决办法:修改oozie-site.xml文件,添加如下配置:

<property>
        <name>oozie.service.HadoopAccessorService.hadoop.configurations</name>
        <value>*=/opt/cloudera/hadoop/etc/hadoop</value>
</property>
上一篇下一篇

猜你喜欢

热点阅读