`
guoyunsky
  • 浏览: 854128 次
  • 性别: Icon_minigender_1
  • 来自: 上海
博客专栏
3d3a22a0-f00f-3227-8d03-d2bbe672af75
Heritrix源码分析
浏览量:206217
Group-logo
SQL的MapReduce...
浏览量:0
社区版块
存档分类
最新评论

Hadoop Oozie Error: E0301 : E0301: Invalid resource [hdfs://xxx]问题解决

阅读更多

      本文章为原创文章,转载请注明出处:http://guoyunsky.iteye.com/blog/1698507

   

      今天通过Oozie启动一个定时工作流的时候,控制台发现如下报错:

         Error: E0301 : E0301: Invalid resource [hdfs://localhost:9000/user/guoyun/workflow/apps/workflow],其中hdfs://localhost:9000/user/guoyun/workflow/apps/workflow为我要定时启动的工作流在hdfs上的地址.之前使用oozie定时一直很正常,怎么会发生这种报错,很奇怪。google搜索下,没看到什么解决方案。于是跑去oozie的日志中,默认是$OOZIE_HOME/logs目录下的oozie.log发现如下完整异常:

          org.apache.oozie.servlet.XServletException: E0301: Invalid resource [hdfs://localhost:9000/user/guoyun/workflow/apps/workflow]

at org.apache.oozie.servlet.ServletUtilities.ValidateAppPath(ServletUtilities.java:27)

at org.apache.oozie.servlet.BaseJobServlet.checkAuthorizationForApp(BaseJobServlet.java:168)

at org.apache.oozie.servlet.BaseJobsServlet.doPost(BaseJobsServlet.java:89)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

at org.apache.oozie.servlet.JsonRestServlet.service(JsonRestServlet.java:281)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.oozie.servlet.AuthFilter$2.doFilter(AuthFilter.java:123)

at com.cloudera.alfredo.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:371)

at org.apache.oozie.servlet.AuthFilter.doFilter(AuthFilter.java:128)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

at java.lang.Thread.run(Thread.java:662)

 

       通过这些异常可以发现是在工作流验证的时候所导致,但还是不能直观的告诉我到底是什么原因.无奈,直的看下源码了.于是跑到org.apache.oozie.servlet.ServletUtilities.ValidateAppPath(ServletUtilities.java:27)中.代码如下:

protected static void ValidateAppPath(String wfPath, String coordPath) throws XServletException {
        if (wfPath != null && coordPath != null) {
            throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ErrorCode.E0301, wfPath, coordPath);
        }
        else {
            if (wfPath == null && coordPath == null) {
                throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ErrorCode.E0302);
            }
        }
    }

    这下就恍然大悟了,原来是这个工作流既是一般工作流,又是定时工作流,oozie不允许(里面,wfPath和coordPath都不为空)。于是跑到我的coord.properties中发现:

果真既配置了oozie.coord.application.path=${name_node}/user/${user.name}/workflow/apps/workflow

也配置了oozie.wf.application.path=${name_node}/user/${user.name}/workflow/apps/workflow。

 

    如此的话,如果你是要启动定时工作流,只要注释掉oozie.wf.application.path就可以正常运行了.

 

更多技术文章、感悟、分享、勾搭,请用微信扫描:

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics