Hadoop Oozie学习笔记 使用OOZIE,通过命令行运行exa

Oozie下面有很多例子,提供测试.也可以将源码放入Eclipse中启动提交.这里就一起试下.但发现有些问题,一一解决吧.

运行Oozie例子map-reduce,命令:

$OOZIE_HOME/bin/oozie job -oozie :11000/oozie -config /home/guoyun/Hadoop/oozie-3.0.2/examples/apps/map-reduce/job.properties -run

本以为会很顺利,但控制台报以下错误:

Error: E0902 : E0902: Exception occured: [java.net.ConnectException: Call to localhost/127.0.0.1:8020 failed on connection exception: java.net.ConnectException: Connection refused]

跑到日志中$OOZIE_HOME/logs/oozie.log发现有以下报错:

2011-11-09 10:42:30,721  WARN V1JobsServlet:539 - USER[?] GROUP[users] TOKEN[-] APP[-] JOB[-] ACTION[-] URL[POST :11000/oozie/v1/jobs?action=start] error[E0902], E0902: Exception occured: [java.net.ConnectException: Call to localhost/127.0.0.1:8020 failed on connection exception: java.net.ConnectException: Connection refused]

org.apache.oozie.servlet.XServletException: E0902: Exception occured: [java.net.ConnectException: Call to localhost/127.0.0.1:8020 failed on connection exception: java.net.ConnectException: Connection refused]        at org.apache.oozie.servlet.BaseJobServlet.checkAuthorizationForApp(BaseJobServlet.java:196)        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.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:859)        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)    Caused by: org.apache.oozie.service.AuthorizationException: E0902: Exception occured: [java.net.ConnectException: Call to localhost/127.0.0.1:8020 failed on connection exception: java.net.ConnectException: Connection refused]        at org.apache.oozie.service.AuthorizationService.authorizeForApp(AuthorizationService.java:320)        at org.apache.oozie.servlet.BaseJobServlet.checkAuthorizationForApp(BaseJobServlet.java:185)        ... 16 more    Caused by: org.apache.oozie.service.HadoopAccessorException: E0902: Exception occured: [java.net.ConnectException: Call to localhost/127.0.0.1:8020 failed on connection exception: java.net.ConnectException: Connection refused]        at org.apache.oozie.service.KerberosHadoopAccessorService.createFileSystem(KerberosHadoopAccessorService.java:208)        at org.apache.oozie.service.AuthorizationService.authorizeForApp(AuthorizationService.java:285)        ... 17 more    Caused by: java.net.ConnectException: Call to localhost/127.0.0.1:8020 failed on connection exception: java.net.ConnectException: Connection refused        at org.apache.hadoop.ipc.Client.wrapException(Client.java:1131)        at org.apache.hadoop.ipc.Client.call(Client.java:1107)        at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:226)        at $Proxy22.getProtocolVersion(Unknown Source)        at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:398)        at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:384)        at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:111)        at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:213)        at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:180)        at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:89)        at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1514)        at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:67)        at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:1548)        at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1530)        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:228)        at org.apache.oozie.service.KerberosHadoopAccessorService$3.run(KerberosHadoopAccessorService.java:200)        at org.apache.oozie.service.KerberosHadoopAccessorService$3.run(KerberosHadoopAccessorService.java:192)        at java.security.AccessController.doPrivileged(Native Method)        at javax.security.auth.Subject.doAs(Subject.java:396)        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1115)        at org.apache.oozie.service.KerberosHadoopAccessorService.createFileSystem(KerberosHadoopAccessorService.java:192)        ... 18 more    Caused by: java.net.ConnectException: Connection refused        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)        at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:408)        at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:425)        at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:532)        at org.apache.hadoop.ipc.Client$Connection.access$2300(Client.java:210)        at org.apache.hadoop.ipc.Client.getConnection(Client.java:1244)        at org.apache.hadoop.ipc.Client.call(Client.java:1075)        ... 37 more

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/4cf99258734e2f1355ad4ed2c9801c91.html