You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@oozie.apache.org by Ahmed Kamal <ah...@badrit.com> on 2015/09/06 20:47:42 UTC
java.net.ConnectExceptionappears after running java-main example in Oozie
Dears ,
I just have built and setup Oozie 4.1.0. I'm trying to run the examples
bundled with the source code.
Checking the status of oozie returns normal
I uploaded examples folder to hdfs
I tried to submit two of the examples bundled (map reduce , java main) but
they both failed for different reasons.
The java main example was run through this command
oozie job -config apps/java-main/job.properties -run
*Job properties :*
nameNode=hdfs://localhost:9000
jobTracker=localhost:9001
queueName=default
examplesRoot=examples
oozie.wf.application.path=${nameNode}/user/${user.name
}/${examplesRoot}/apps/java-main
*Workflow :*
*<workflow-app xmlns="uri:oozie:workflow:0.2" name="java-main-wf">
<start to="java-node"/> <action name="java-node"> <java>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node> <configuration>
<property> <name>mapred.job.queue.name
<http://mapred.job.queue.name></name>
<value>${queueName}</value> </property>
</configuration>
<main-class>org.apache.oozie.example.DemoJavaMain</main-class>
<arg>Hello</arg> <arg>Oozie!</arg> </java> <ok
to="end"/> <error to="fail"/> </action> <kill name="fail">
<message>Java failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill>
<end name="end"/></workflow-app>*
but I got this exception in the logs after waiting for some time.
2015-09-06 20:16:27,965 WARN ActionStartXCommand:544 -
SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
JOB[0000004-150906115439360-oozie-hdus-W]
ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Error starting
action [java-node]. ErrorType [TRANSIENT], ErrorCode [ JA006], Message [
JA006: Call From akamal-laptop/127.0.1.1 to localhost:9001 failed on
connection exception: java.net.ConnectException: Connection refused; For
more details see: http://wiki.apache.org/hadoop/ConnectionRefused]
org.apache.oozie.action.ActionExecutorException: JA006: Call From
akamal-laptop/127.0.1.1 to localhost:9001 failed on connection exception:
java.net.ConnectException: Connection refused; For more details see:
http://wiki.apache.org/hadoop/ConnectionRefused
at
org.apache.oozie.action.ActionExecutor.convertExceptionHelper(ActionExecutor.java:412)
at
org.apache.oozie.action.ActionExecutor.convertException(ActionExecutor.java:392)
at
org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:979)
at
org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1134)
at
org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:228)
at
org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:63)
at org.apache.oozie.command.XCommand.call(XCommand.java:281)
at
org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
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)
Caused by: java.net.ConnectException: Call From akamal-laptop/127.0.1.1 to
localhost:9001 failed on connection exception: java.net.ConnectException:
Connection refused; For more details see:
http://wiki.apache.org/hadoop/ConnectionRefused
at sun.reflect.GeneratedConstructorAccessor73.newInstance(Unknown Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:783)
at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:730)
at org.apache.hadoop.ipc.Client.call(Client.java:1410)
at org.apache.hadoop.ipc.Client.call(Client.java:1359)
at
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
at com.sun.proxy.$Proxy27.getDelegationToken(Unknown Source)
at
org.apache.hadoop.yarn.api.impl.pb.client.ApplicationClientProtocolPBClientImpl.getDelegationToken(ApplicationClientProtocolPBClientImpl.java:256)
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
at
org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
at com.sun.proxy.$Proxy28.getDelegationToken(Unknown Source)
at
org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.getRMDelegationToken(YarnClientImpl.java:319)
at
org.apache.hadoop.mapred.ResourceMgrDelegate.getDelegationToken(ResourceMgrDelegate.java:162)
at
org.apache.hadoop.mapred.YARNRunner.getDelegationToken(YARNRunner.java:219)
at org.apache.hadoop.mapreduce.Cluster.getDelegationToken(Cluster.java:400)
at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1203)
at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1200)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
at
org.apache.hadoop.mapred.JobClient.getDelegationToken(JobClient.java:1199)
at
org.apache.oozie.service.HadoopAccessorService.createJobClient(HadoopAccessorService.java:375)
at
org.apache.oozie.action.hadoop.JavaActionExecutor.createJobClient(JavaActionExecutor.java:1177)
at
org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:927)
... 8 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:740)
at
org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:601)
at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:696)
at org.apache.hadoop.ipc.Client$Connection.access$2700(Client.java:367)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1458)
at org.apache.hadoop.ipc.Client.call(Client.java:1377)
... 31 more
2015-09-06 20:16:27,970 INFO ActionStartXCommand:541 -
SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
JOB[0000004-150906115439360-oozie-hdus-W]
ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Next Retry, Attempt
Number [2] in [60,000] milliseconds
2015-09-06 20:16:28,022 INFO ActionStartXCommand:541 -
SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
JOB[0000004-150906115439360-oozie-hdus-W]
ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Start action
[0000004-150906115439360-oozie-hdus-W@java-node] with user-retry state :
userRetryCount [0], userRetryMax [0], userRetryInterval [10]
--
JAK ,
Ahmed Kamal
Junior Big Data Engineer , BadrIT
Re: java.net.ConnectExceptionappears after running java-main example
in Oozie
Posted by Ahmed Kamal <ah...@badrit.com>.
Combining these two great answers solved my problem :)
1- I started the hadoop job history server
mr-jobhistory-daemon.sh start historyserver
2- I changed the job tracker url from localhost:9001 to localhost:8032
Thanks a lot.
On Mon, Sep 7, 2015 at 12:24 PM, Jain, Saurabh <sa...@alethelabs.com>
wrote:
> Hi Ahmed,
>
> As per this error, oozie is not able to connect to localhost:9001 which
> you have specified as job-tracker (or ResourceManager) in job.properties.
> Try changing it to 8032 or the actual ResourceManager port.
>
> Regards,
> Saurabh
>
> On 09/07/2015 12:17 AM, Ahmed Kamal wrote:
>
>> Dears ,
>>
>> I just have built and setup Oozie 4.1.0. I'm trying to run the examples
>> bundled with the source code.
>>
>> Checking the status of oozie returns normal
>>
>> I uploaded examples folder to hdfs
>>
>> I tried to submit two of the examples bundled (map reduce , java main) but
>> they both failed for different reasons.
>>
>> The java main example was run through this command
>> oozie job -config apps/java-main/job.properties -run
>>
>> *Job properties :*
>>
>> nameNode=hdfs://localhost:9000
>> jobTracker=localhost:9001
>> queueName=default
>> examplesRoot=examples
>>
>> oozie.wf.application.path=${nameNode}/user/${user.name
>> }/${examplesRoot}/apps/java-main
>>
>>
>> *Workflow :*
>>
>>
>> *<workflow-app xmlns="uri:oozie:workflow:0.2" name="java-main-wf">
>> <start to="java-node"/> <action name="java-node"> <java>
>> <job-tracker>${jobTracker}</job-tracker>
>> <name-node>${nameNode}</name-node> <configuration>
>> <property> <name>mapred.job.queue.name
>> <http://mapred.job.queue.name></name>
>> <value>${queueName}</value> </property>
>> </configuration>
>> <main-class>org.apache.oozie.example.DemoJavaMain</main-class>
>> <arg>Hello</arg> <arg>Oozie!</arg> </java> <ok
>> to="end"/> <error to="fail"/> </action> <kill name="fail">
>> <message>Java failed, error
>> message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill>
>> <end name="end"/></workflow-app>*
>>
>>
>> but I got this exception in the logs after waiting for some time.
>>
>> 2015-09-06 20:16:27,965 WARN ActionStartXCommand:544 -
>> SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
>> JOB[0000004-150906115439360-oozie-hdus-W]
>> ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Error starting
>> action [java-node]. ErrorType [TRANSIENT], ErrorCode [ JA006], Message [
>> JA006: Call From akamal-laptop/127.0.1.1 to localhost:9001 failed on
>> connection exception: java.net.ConnectException: Connection refused; For
>> more details see: http://wiki.apache.org/hadoop/ConnectionRefused]
>> org.apache.oozie.action.ActionExecutorException: JA006: Call From
>> akamal-laptop/127.0.1.1 to localhost:9001 failed on connection exception:
>> java.net.ConnectException: Connection refused; For more details see:
>> http://wiki.apache.org/hadoop/ConnectionRefused
>> at
>>
>> org.apache.oozie.action.ActionExecutor.convertExceptionHelper(ActionExecutor.java:412)
>> at
>>
>> org.apache.oozie.action.ActionExecutor.convertException(ActionExecutor.java:392)
>> at
>>
>> org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:979)
>> at
>>
>> org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1134)
>> at
>> org.apache.oozie.command.wf
>> .ActionStartXCommand.execute(ActionStartXCommand.java:228)
>> at
>> org.apache.oozie.command.wf
>> .ActionStartXCommand.execute(ActionStartXCommand.java:63)
>> at org.apache.oozie.command.XCommand.call(XCommand.java:281)
>> at
>>
>> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>> 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)
>> Caused by: java.net.ConnectException: Call From akamal-laptop/127.0.1.1
>> to
>> localhost:9001 failed on connection exception: java.net.ConnectException:
>> Connection refused; For more details see:
>> http://wiki.apache.org/hadoop/ConnectionRefused
>> at sun.reflect.GeneratedConstructorAccessor73.newInstance(Unknown Source)
>> at
>>
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>> at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:783)
>> at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:730)
>> at org.apache.hadoop.ipc.Client.call(Client.java:1410)
>> at org.apache.hadoop.ipc.Client.call(Client.java:1359)
>> at
>>
>> org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
>> at com.sun.proxy.$Proxy27.getDelegationToken(Unknown Source)
>> at
>>
>> org.apache.hadoop.yarn.api.impl.pb.client.ApplicationClientProtocolPBClientImpl.getDelegationToken(ApplicationClientProtocolPBClientImpl.java:256)
>> at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
>> at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:606)
>> at
>>
>> org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
>> at
>>
>> org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
>> at com.sun.proxy.$Proxy28.getDelegationToken(Unknown Source)
>> at
>>
>> org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.getRMDelegationToken(YarnClientImpl.java:319)
>> at
>>
>> org.apache.hadoop.mapred.ResourceMgrDelegate.getDelegationToken(ResourceMgrDelegate.java:162)
>> at
>>
>> org.apache.hadoop.mapred.YARNRunner.getDelegationToken(YARNRunner.java:219)
>> at
>> org.apache.hadoop.mapreduce.Cluster.getDelegationToken(Cluster.java:400)
>> at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1203)
>> at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1200)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at javax.security.auth.Subject.doAs(Subject.java:415)
>> at
>>
>> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
>> at
>> org.apache.hadoop.mapred.JobClient.getDelegationToken(JobClient.java:1199)
>> at
>>
>> org.apache.oozie.service.HadoopAccessorService.createJobClient(HadoopAccessorService.java:375)
>> at
>>
>> org.apache.oozie.action.hadoop.JavaActionExecutor.createJobClient(JavaActionExecutor.java:1177)
>> at
>>
>> org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:927)
>> ... 8 more
>> Caused by: java.net.ConnectException: Connection refused
>> at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>> at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:740)
>> at
>> org.apache.hadoop.net
>> .SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
>> at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
>> at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
>> at
>> org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:601)
>> at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:696)
>> at org.apache.hadoop.ipc.Client$Connection.access$2700(Client.java:367)
>> at org.apache.hadoop.ipc.Client.getConnection(Client.java:1458)
>> at org.apache.hadoop.ipc.Client.call(Client.java:1377)
>> ... 31 more
>> 2015-09-06 20:16:27,970 INFO ActionStartXCommand:541 -
>> SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
>> JOB[0000004-150906115439360-oozie-hdus-W]
>> ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Next Retry,
>> Attempt
>> Number [2] in [60,000] milliseconds
>> 2015-09-06 20:16:28,022 INFO ActionStartXCommand:541 -
>> SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
>> JOB[0000004-150906115439360-oozie-hdus-W]
>> ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Start action
>> [0000004-150906115439360-oozie-hdus-W@java-node] with user-retry state :
>> userRetryCount [0], userRetryMax [0], userRetryInterval [10]
>>
>>
> Disclaimer: The information contained in this message is intended only and
> solely for the addressed individual or entity indicated in this message and
> for the exclusive use of the said addressed individual or entity indicated
> in this message (or responsible for delivery of the message to such person)
> and may contain legally privileged and confidential information belonging
> to Alethe Labs. It must not be reprinted, read, copied, disclosed,
> forwarded, distributed or used (in any manner whatsoever) by any person
> other than the addressee. Unauthorized use, disclosure or copying of the
> contents of this message is strictly prohibited and may constitute unlawful
> act and can possibly attract legal action, civil and/or criminal. The
> contents of this message need not necessarily reflect or endorse the views
> of Alethe Labs on any subject matter. Any action taken or omitted to be
> taken based on this message is not entirely at your risk and the originator
> of this message nor does Alethe Labs take any responsibility or liability
> towards the same. Opinions, conclusions and any other information contained
> in this message that do not relate to the official business of Alethe Labs
> shall be understood as neither given nor endorsed by Alethe Labs. If you
> have received this message in error, you should destroy this message and
> may please notify the sender by e-mail. Our official web site is
> http://www.alethelabs.com. Thank you.
>
--
JAK ,
Ahmed Kamal
Junior Big Data Engineer , BadrIT
Re: java.net.ConnectExceptionappears after running java-main example
in Oozie
Posted by "Jain, Saurabh" <sa...@alethelabs.com>.
Hi Ahmed,
As per this error, oozie is not able to connect to localhost:9001 which
you have specified as job-tracker (or ResourceManager) in job.properties.
Try changing it to 8032 or the actual ResourceManager port.
Regards,
Saurabh
On 09/07/2015 12:17 AM, Ahmed Kamal wrote:
> Dears ,
>
> I just have built and setup Oozie 4.1.0. I'm trying to run the examples
> bundled with the source code.
>
> Checking the status of oozie returns normal
>
> I uploaded examples folder to hdfs
>
> I tried to submit two of the examples bundled (map reduce , java main) but
> they both failed for different reasons.
>
> The java main example was run through this command
> oozie job -config apps/java-main/job.properties -run
>
> *Job properties :*
>
> nameNode=hdfs://localhost:9000
> jobTracker=localhost:9001
> queueName=default
> examplesRoot=examples
>
> oozie.wf.application.path=${nameNode}/user/${user.name
> }/${examplesRoot}/apps/java-main
>
>
> *Workflow :*
>
>
> *<workflow-app xmlns="uri:oozie:workflow:0.2" name="java-main-wf">
> <start to="java-node"/> <action name="java-node"> <java>
> <job-tracker>${jobTracker}</job-tracker>
> <name-node>${nameNode}</name-node> <configuration>
> <property> <name>mapred.job.queue.name
> <http://mapred.job.queue.name></name>
> <value>${queueName}</value> </property>
> </configuration>
> <main-class>org.apache.oozie.example.DemoJavaMain</main-class>
> <arg>Hello</arg> <arg>Oozie!</arg> </java> <ok
> to="end"/> <error to="fail"/> </action> <kill name="fail">
> <message>Java failed, error
> message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill>
> <end name="end"/></workflow-app>*
>
> but I got this exception in the logs after waiting for some time.
>
> 2015-09-06 20:16:27,965 WARN ActionStartXCommand:544 -
> SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> JOB[0000004-150906115439360-oozie-hdus-W]
> ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Error starting
> action [java-node]. ErrorType [TRANSIENT], ErrorCode [ JA006], Message [
> JA006: Call From akamal-laptop/127.0.1.1 to localhost:9001 failed on
> connection exception: java.net.ConnectException: Connection refused; For
> more details see: http://wiki.apache.org/hadoop/ConnectionRefused]
> org.apache.oozie.action.ActionExecutorException: JA006: Call From
> akamal-laptop/127.0.1.1 to localhost:9001 failed on connection exception:
> java.net.ConnectException: Connection refused; For more details see:
> http://wiki.apache.org/hadoop/ConnectionRefused
> at
> org.apache.oozie.action.ActionExecutor.convertExceptionHelper(ActionExecutor.java:412)
> at
> org.apache.oozie.action.ActionExecutor.convertException(ActionExecutor.java:392)
> at
> org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:979)
> at
> org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1134)
> at
> org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:228)
> at
> org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:63)
> at org.apache.oozie.command.XCommand.call(XCommand.java:281)
> at
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
> 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)
> Caused by: java.net.ConnectException: Call From akamal-laptop/127.0.1.1 to
> localhost:9001 failed on connection exception: java.net.ConnectException:
> Connection refused; For more details see:
> http://wiki.apache.org/hadoop/ConnectionRefused
> at sun.reflect.GeneratedConstructorAccessor73.newInstance(Unknown Source)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:783)
> at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:730)
> at org.apache.hadoop.ipc.Client.call(Client.java:1410)
> at org.apache.hadoop.ipc.Client.call(Client.java:1359)
> at
> org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
> at com.sun.proxy.$Proxy27.getDelegationToken(Unknown Source)
> at
> org.apache.hadoop.yarn.api.impl.pb.client.ApplicationClientProtocolPBClientImpl.getDelegationToken(ApplicationClientProtocolPBClientImpl.java:256)
> at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
> at
> org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
> at com.sun.proxy.$Proxy28.getDelegationToken(Unknown Source)
> at
> org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.getRMDelegationToken(YarnClientImpl.java:319)
> at
> org.apache.hadoop.mapred.ResourceMgrDelegate.getDelegationToken(ResourceMgrDelegate.java:162)
> at
> org.apache.hadoop.mapred.YARNRunner.getDelegationToken(YARNRunner.java:219)
> at org.apache.hadoop.mapreduce.Cluster.getDelegationToken(Cluster.java:400)
> at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1203)
> at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1200)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:415)
> at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
> at
> org.apache.hadoop.mapred.JobClient.getDelegationToken(JobClient.java:1199)
> at
> org.apache.oozie.service.HadoopAccessorService.createJobClient(HadoopAccessorService.java:375)
> at
> org.apache.oozie.action.hadoop.JavaActionExecutor.createJobClient(JavaActionExecutor.java:1177)
> at
> org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:927)
> ... 8 more
> Caused by: java.net.ConnectException: Connection refused
> at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:740)
> at
> org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
> at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
> at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
> at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:601)
> at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:696)
> at org.apache.hadoop.ipc.Client$Connection.access$2700(Client.java:367)
> at org.apache.hadoop.ipc.Client.getConnection(Client.java:1458)
> at org.apache.hadoop.ipc.Client.call(Client.java:1377)
> ... 31 more
> 2015-09-06 20:16:27,970 INFO ActionStartXCommand:541 -
> SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> JOB[0000004-150906115439360-oozie-hdus-W]
> ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Next Retry, Attempt
> Number [2] in [60,000] milliseconds
> 2015-09-06 20:16:28,022 INFO ActionStartXCommand:541 -
> SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> JOB[0000004-150906115439360-oozie-hdus-W]
> ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Start action
> [0000004-150906115439360-oozie-hdus-W@java-node] with user-retry state :
> userRetryCount [0], userRetryMax [0], userRetryInterval [10]
>
Disclaimer: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Alethe Labs. It must not be reprinted, read, copied, disclosed, forwarded, distributed or used (in any manner whatsoever) by any person other than the addressee. Unauthorized use, disclosure or copying of the contents of this message is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Alethe Labs on any subject matter. Any action taken or omitted to be taken based on this message is not entirely at your risk and the originator of this message nor does Alethe Labs take any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Alethe Labs shall be understood as neither given nor endorsed by Alethe Labs. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Our official web site is http://www.alethelabs.com. Thank you.
RE: java.net.ConnectExceptionappears after running java-main
example in Oozie
Posted by Oussama Chougna <ou...@hotmail.com>.
Hi Ahmed, I'm not sure about the reason, but what i think is that Oozie keeps track of the progress of its actions (which are executed on top of YARN/MRv2 ) by consulting the Job history server's REST API.
Cheers,
Oussama Chougna
> Date: Mon, 7 Sep 2015 14:58:58 +0200
> Subject: Re: java.net.ConnectExceptionappears after running java-main example in Oozie
> From: ahmed.kamal@badrit.com
> To: user@oozie.apache.org
>
> Firstly , thanks for your help. I just would like to ask why is it
> important to start the hadoop job history server for the oozie jobs to run
> successfully ?
>
>
> On Mon, Sep 7, 2015 at 11:22 AM, Oussama Chougna <ou...@hotmail.com>
> wrote:
>
> > You can get this error if your Hadoop Job History server is not running.
> > Start the Job History server on hadoop and try again.
> >
> > Cheers,
> > Oussama Chougna
> >
> > > Date: Sun, 6 Sep 2015 20:47:42 +0200
> > > Subject: java.net.ConnectExceptionappears after running java-main
> > example in Oozie
> > > From: ahmed.kamal@badrit.com
> > > To: user@oozie.apache.org
> > >
> > > Dears ,
> > >
> > > I just have built and setup Oozie 4.1.0. I'm trying to run the examples
> > > bundled with the source code.
> > >
> > > Checking the status of oozie returns normal
> > >
> > > I uploaded examples folder to hdfs
> > >
> > > I tried to submit two of the examples bundled (map reduce , java main)
> > but
> > > they both failed for different reasons.
> > >
> > > The java main example was run through this command
> > > oozie job -config apps/java-main/job.properties -run
> > >
> > > *Job properties :*
> > >
> > > nameNode=hdfs://localhost:9000
> > > jobTracker=localhost:9001
> > > queueName=default
> > > examplesRoot=examples
> > >
> > > oozie.wf.application.path=${nameNode}/user/${user.name
> > > }/${examplesRoot}/apps/java-main
> > >
> > >
> > > *Workflow :*
> > >
> > >
> > > *<workflow-app xmlns="uri:oozie:workflow:0.2" name="java-main-wf">
> > > <start to="java-node"/> <action name="java-node"> <java>
> > > <job-tracker>${jobTracker}</job-tracker>
> > > <name-node>${nameNode}</name-node> <configuration>
> > > <property> <name>mapred.job.queue.name
> > > <http://mapred.job.queue.name></name>
> > > <value>${queueName}</value> </property>
> > > </configuration>
> > > <main-class>org.apache.oozie.example.DemoJavaMain</main-class>
> > > <arg>Hello</arg> <arg>Oozie!</arg> </java> <ok
> > > to="end"/> <error to="fail"/> </action> <kill name="fail">
> > > <message>Java failed, error
> > > message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill>
> > > <end name="end"/></workflow-app>*
> > >
> > > but I got this exception in the logs after waiting for some time.
> > >
> > > 2015-09-06 20:16:27,965 WARN ActionStartXCommand:544 -
> > > SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> > > JOB[0000004-150906115439360-oozie-hdus-W]
> > > ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Error starting
> > > action [java-node]. ErrorType [TRANSIENT], ErrorCode [ JA006], Message [
> > > JA006: Call From akamal-laptop/127.0.1.1 to localhost:9001 failed on
> > > connection exception: java.net.ConnectException: Connection refused; For
> > > more details see: http://wiki.apache.org/hadoop/ConnectionRefused]
> > > org.apache.oozie.action.ActionExecutorException: JA006: Call From
> > > akamal-laptop/127.0.1.1 to localhost:9001 failed on connection
> > exception:
> > > java.net.ConnectException: Connection refused; For more details see:
> > > http://wiki.apache.org/hadoop/ConnectionRefused
> > > at
> > >
> > org.apache.oozie.action.ActionExecutor.convertExceptionHelper(ActionExecutor.java:412)
> > > at
> > >
> > org.apache.oozie.action.ActionExecutor.convertException(ActionExecutor.java:392)
> > > at
> > >
> > org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:979)
> > > at
> > >
> > org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1134)
> > > at
> > >
> > org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:228)
> > > at
> > >
> > org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:63)
> > > at org.apache.oozie.command.XCommand.call(XCommand.java:281)
> > > at
> > >
> > org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
> > > 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)
> > > Caused by: java.net.ConnectException: Call From akamal-laptop/127.0.1.1
> > to
> > > localhost:9001 failed on connection exception: java.net.ConnectException:
> > > Connection refused; For more details see:
> > > http://wiki.apache.org/hadoop/ConnectionRefused
> > > at sun.reflect.GeneratedConstructorAccessor73.newInstance(Unknown Source)
> > > at
> > >
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> > > at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> > > at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:783)
> > > at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:730)
> > > at org.apache.hadoop.ipc.Client.call(Client.java:1410)
> > > at org.apache.hadoop.ipc.Client.call(Client.java:1359)
> > > at
> > >
> > org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
> > > at com.sun.proxy.$Proxy27.getDelegationToken(Unknown Source)
> > > at
> > >
> > org.apache.hadoop.yarn.api.impl.pb.client.ApplicationClientProtocolPBClientImpl.getDelegationToken(ApplicationClientProtocolPBClientImpl.java:256)
> > > at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
> > > at
> > >
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > at java.lang.reflect.Method.invoke(Method.java:606)
> > > at
> > >
> > org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
> > > at
> > >
> > org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
> > > at com.sun.proxy.$Proxy28.getDelegationToken(Unknown Source)
> > > at
> > >
> > org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.getRMDelegationToken(YarnClientImpl.java:319)
> > > at
> > >
> > org.apache.hadoop.mapred.ResourceMgrDelegate.getDelegationToken(ResourceMgrDelegate.java:162)
> > > at
> > >
> > org.apache.hadoop.mapred.YARNRunner.getDelegationToken(YARNRunner.java:219)
> > > at
> > org.apache.hadoop.mapreduce.Cluster.getDelegationToken(Cluster.java:400)
> > > at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1203)
> > > at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1200)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at javax.security.auth.Subject.doAs(Subject.java:415)
> > > at
> > >
> > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
> > > at
> > >
> > org.apache.hadoop.mapred.JobClient.getDelegationToken(JobClient.java:1199)
> > > at
> > >
> > org.apache.oozie.service.HadoopAccessorService.createJobClient(HadoopAccessorService.java:375)
> > > at
> > >
> > org.apache.oozie.action.hadoop.JavaActionExecutor.createJobClient(JavaActionExecutor.java:1177)
> > > at
> > >
> > org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:927)
> > > ... 8 more
> > > Caused by: java.net.ConnectException: Connection refused
> > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> > > at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:740)
> > > at
> > >
> > org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
> > > at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
> > > at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
> > > at
> > org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:601)
> > > at
> > org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:696)
> > > at org.apache.hadoop.ipc.Client$Connection.access$2700(Client.java:367)
> > > at org.apache.hadoop.ipc.Client.getConnection(Client.java:1458)
> > > at org.apache.hadoop.ipc.Client.call(Client.java:1377)
> > > ... 31 more
> > > 2015-09-06 20:16:27,970 INFO ActionStartXCommand:541 -
> > > SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> > > JOB[0000004-150906115439360-oozie-hdus-W]
> > > ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Next Retry,
> > Attempt
> > > Number [2] in [60,000] milliseconds
> > > 2015-09-06 20:16:28,022 INFO ActionStartXCommand:541 -
> > > SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> > > JOB[0000004-150906115439360-oozie-hdus-W]
> > > ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Start action
> > > [0000004-150906115439360-oozie-hdus-W@java-node] with user-retry state :
> > > userRetryCount [0], userRetryMax [0], userRetryInterval [10]
> > >
> > > --
> > > JAK ,
> > >
> > > Ahmed Kamal
> > > Junior Big Data Engineer , BadrIT
> >
> >
>
>
>
> --
> JAK ,
>
> Ahmed Kamal
> Junior Big Data Engineer , BadrIT
Re: java.net.ConnectExceptionappears after running java-main example
in Oozie
Posted by Ahmed Kamal <ah...@badrit.com>.
Firstly , thanks for your help. I just would like to ask why is it
important to start the hadoop job history server for the oozie jobs to run
successfully ?
On Mon, Sep 7, 2015 at 11:22 AM, Oussama Chougna <ou...@hotmail.com>
wrote:
> You can get this error if your Hadoop Job History server is not running.
> Start the Job History server on hadoop and try again.
>
> Cheers,
> Oussama Chougna
>
> > Date: Sun, 6 Sep 2015 20:47:42 +0200
> > Subject: java.net.ConnectExceptionappears after running java-main
> example in Oozie
> > From: ahmed.kamal@badrit.com
> > To: user@oozie.apache.org
> >
> > Dears ,
> >
> > I just have built and setup Oozie 4.1.0. I'm trying to run the examples
> > bundled with the source code.
> >
> > Checking the status of oozie returns normal
> >
> > I uploaded examples folder to hdfs
> >
> > I tried to submit two of the examples bundled (map reduce , java main)
> but
> > they both failed for different reasons.
> >
> > The java main example was run through this command
> > oozie job -config apps/java-main/job.properties -run
> >
> > *Job properties :*
> >
> > nameNode=hdfs://localhost:9000
> > jobTracker=localhost:9001
> > queueName=default
> > examplesRoot=examples
> >
> > oozie.wf.application.path=${nameNode}/user/${user.name
> > }/${examplesRoot}/apps/java-main
> >
> >
> > *Workflow :*
> >
> >
> > *<workflow-app xmlns="uri:oozie:workflow:0.2" name="java-main-wf">
> > <start to="java-node"/> <action name="java-node"> <java>
> > <job-tracker>${jobTracker}</job-tracker>
> > <name-node>${nameNode}</name-node> <configuration>
> > <property> <name>mapred.job.queue.name
> > <http://mapred.job.queue.name></name>
> > <value>${queueName}</value> </property>
> > </configuration>
> > <main-class>org.apache.oozie.example.DemoJavaMain</main-class>
> > <arg>Hello</arg> <arg>Oozie!</arg> </java> <ok
> > to="end"/> <error to="fail"/> </action> <kill name="fail">
> > <message>Java failed, error
> > message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill>
> > <end name="end"/></workflow-app>*
> >
> > but I got this exception in the logs after waiting for some time.
> >
> > 2015-09-06 20:16:27,965 WARN ActionStartXCommand:544 -
> > SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> > JOB[0000004-150906115439360-oozie-hdus-W]
> > ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Error starting
> > action [java-node]. ErrorType [TRANSIENT], ErrorCode [ JA006], Message [
> > JA006: Call From akamal-laptop/127.0.1.1 to localhost:9001 failed on
> > connection exception: java.net.ConnectException: Connection refused; For
> > more details see: http://wiki.apache.org/hadoop/ConnectionRefused]
> > org.apache.oozie.action.ActionExecutorException: JA006: Call From
> > akamal-laptop/127.0.1.1 to localhost:9001 failed on connection
> exception:
> > java.net.ConnectException: Connection refused; For more details see:
> > http://wiki.apache.org/hadoop/ConnectionRefused
> > at
> >
> org.apache.oozie.action.ActionExecutor.convertExceptionHelper(ActionExecutor.java:412)
> > at
> >
> org.apache.oozie.action.ActionExecutor.convertException(ActionExecutor.java:392)
> > at
> >
> org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:979)
> > at
> >
> org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1134)
> > at
> >
> org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:228)
> > at
> >
> org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:63)
> > at org.apache.oozie.command.XCommand.call(XCommand.java:281)
> > at
> >
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
> > 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)
> > Caused by: java.net.ConnectException: Call From akamal-laptop/127.0.1.1
> to
> > localhost:9001 failed on connection exception: java.net.ConnectException:
> > Connection refused; For more details see:
> > http://wiki.apache.org/hadoop/ConnectionRefused
> > at sun.reflect.GeneratedConstructorAccessor73.newInstance(Unknown Source)
> > at
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> > at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> > at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:783)
> > at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:730)
> > at org.apache.hadoop.ipc.Client.call(Client.java:1410)
> > at org.apache.hadoop.ipc.Client.call(Client.java:1359)
> > at
> >
> org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
> > at com.sun.proxy.$Proxy27.getDelegationToken(Unknown Source)
> > at
> >
> org.apache.hadoop.yarn.api.impl.pb.client.ApplicationClientProtocolPBClientImpl.getDelegationToken(ApplicationClientProtocolPBClientImpl.java:256)
> > at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:606)
> > at
> >
> org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
> > at
> >
> org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
> > at com.sun.proxy.$Proxy28.getDelegationToken(Unknown Source)
> > at
> >
> org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.getRMDelegationToken(YarnClientImpl.java:319)
> > at
> >
> org.apache.hadoop.mapred.ResourceMgrDelegate.getDelegationToken(ResourceMgrDelegate.java:162)
> > at
> >
> org.apache.hadoop.mapred.YARNRunner.getDelegationToken(YARNRunner.java:219)
> > at
> org.apache.hadoop.mapreduce.Cluster.getDelegationToken(Cluster.java:400)
> > at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1203)
> > at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1200)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at javax.security.auth.Subject.doAs(Subject.java:415)
> > at
> >
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
> > at
> >
> org.apache.hadoop.mapred.JobClient.getDelegationToken(JobClient.java:1199)
> > at
> >
> org.apache.oozie.service.HadoopAccessorService.createJobClient(HadoopAccessorService.java:375)
> > at
> >
> org.apache.oozie.action.hadoop.JavaActionExecutor.createJobClient(JavaActionExecutor.java:1177)
> > at
> >
> org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:927)
> > ... 8 more
> > Caused by: java.net.ConnectException: Connection refused
> > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> > at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:740)
> > at
> >
> org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
> > at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
> > at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
> > at
> org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:601)
> > at
> org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:696)
> > at org.apache.hadoop.ipc.Client$Connection.access$2700(Client.java:367)
> > at org.apache.hadoop.ipc.Client.getConnection(Client.java:1458)
> > at org.apache.hadoop.ipc.Client.call(Client.java:1377)
> > ... 31 more
> > 2015-09-06 20:16:27,970 INFO ActionStartXCommand:541 -
> > SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> > JOB[0000004-150906115439360-oozie-hdus-W]
> > ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Next Retry,
> Attempt
> > Number [2] in [60,000] milliseconds
> > 2015-09-06 20:16:28,022 INFO ActionStartXCommand:541 -
> > SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> > JOB[0000004-150906115439360-oozie-hdus-W]
> > ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Start action
> > [0000004-150906115439360-oozie-hdus-W@java-node] with user-retry state :
> > userRetryCount [0], userRetryMax [0], userRetryInterval [10]
> >
> > --
> > JAK ,
> >
> > Ahmed Kamal
> > Junior Big Data Engineer , BadrIT
>
>
--
JAK ,
Ahmed Kamal
Junior Big Data Engineer , BadrIT
RE: java.net.ConnectExceptionappears after running java-main
example in Oozie
Posted by Oussama Chougna <ou...@hotmail.com>.
You can get this error if your Hadoop Job History server is not running. Start the Job History server on hadoop and try again.
Cheers,
Oussama Chougna
> Date: Sun, 6 Sep 2015 20:47:42 +0200
> Subject: java.net.ConnectExceptionappears after running java-main example in Oozie
> From: ahmed.kamal@badrit.com
> To: user@oozie.apache.org
>
> Dears ,
>
> I just have built and setup Oozie 4.1.0. I'm trying to run the examples
> bundled with the source code.
>
> Checking the status of oozie returns normal
>
> I uploaded examples folder to hdfs
>
> I tried to submit two of the examples bundled (map reduce , java main) but
> they both failed for different reasons.
>
> The java main example was run through this command
> oozie job -config apps/java-main/job.properties -run
>
> *Job properties :*
>
> nameNode=hdfs://localhost:9000
> jobTracker=localhost:9001
> queueName=default
> examplesRoot=examples
>
> oozie.wf.application.path=${nameNode}/user/${user.name
> }/${examplesRoot}/apps/java-main
>
>
> *Workflow :*
>
>
> *<workflow-app xmlns="uri:oozie:workflow:0.2" name="java-main-wf">
> <start to="java-node"/> <action name="java-node"> <java>
> <job-tracker>${jobTracker}</job-tracker>
> <name-node>${nameNode}</name-node> <configuration>
> <property> <name>mapred.job.queue.name
> <http://mapred.job.queue.name></name>
> <value>${queueName}</value> </property>
> </configuration>
> <main-class>org.apache.oozie.example.DemoJavaMain</main-class>
> <arg>Hello</arg> <arg>Oozie!</arg> </java> <ok
> to="end"/> <error to="fail"/> </action> <kill name="fail">
> <message>Java failed, error
> message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill>
> <end name="end"/></workflow-app>*
>
> but I got this exception in the logs after waiting for some time.
>
> 2015-09-06 20:16:27,965 WARN ActionStartXCommand:544 -
> SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> JOB[0000004-150906115439360-oozie-hdus-W]
> ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Error starting
> action [java-node]. ErrorType [TRANSIENT], ErrorCode [ JA006], Message [
> JA006: Call From akamal-laptop/127.0.1.1 to localhost:9001 failed on
> connection exception: java.net.ConnectException: Connection refused; For
> more details see: http://wiki.apache.org/hadoop/ConnectionRefused]
> org.apache.oozie.action.ActionExecutorException: JA006: Call From
> akamal-laptop/127.0.1.1 to localhost:9001 failed on connection exception:
> java.net.ConnectException: Connection refused; For more details see:
> http://wiki.apache.org/hadoop/ConnectionRefused
> at
> org.apache.oozie.action.ActionExecutor.convertExceptionHelper(ActionExecutor.java:412)
> at
> org.apache.oozie.action.ActionExecutor.convertException(ActionExecutor.java:392)
> at
> org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:979)
> at
> org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1134)
> at
> org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:228)
> at
> org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:63)
> at org.apache.oozie.command.XCommand.call(XCommand.java:281)
> at
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
> 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)
> Caused by: java.net.ConnectException: Call From akamal-laptop/127.0.1.1 to
> localhost:9001 failed on connection exception: java.net.ConnectException:
> Connection refused; For more details see:
> http://wiki.apache.org/hadoop/ConnectionRefused
> at sun.reflect.GeneratedConstructorAccessor73.newInstance(Unknown Source)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:783)
> at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:730)
> at org.apache.hadoop.ipc.Client.call(Client.java:1410)
> at org.apache.hadoop.ipc.Client.call(Client.java:1359)
> at
> org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
> at com.sun.proxy.$Proxy27.getDelegationToken(Unknown Source)
> at
> org.apache.hadoop.yarn.api.impl.pb.client.ApplicationClientProtocolPBClientImpl.getDelegationToken(ApplicationClientProtocolPBClientImpl.java:256)
> at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
> at
> org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
> at com.sun.proxy.$Proxy28.getDelegationToken(Unknown Source)
> at
> org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.getRMDelegationToken(YarnClientImpl.java:319)
> at
> org.apache.hadoop.mapred.ResourceMgrDelegate.getDelegationToken(ResourceMgrDelegate.java:162)
> at
> org.apache.hadoop.mapred.YARNRunner.getDelegationToken(YARNRunner.java:219)
> at org.apache.hadoop.mapreduce.Cluster.getDelegationToken(Cluster.java:400)
> at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1203)
> at org.apache.hadoop.mapred.JobClient$16.run(JobClient.java:1200)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:415)
> at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
> at
> org.apache.hadoop.mapred.JobClient.getDelegationToken(JobClient.java:1199)
> at
> org.apache.oozie.service.HadoopAccessorService.createJobClient(HadoopAccessorService.java:375)
> at
> org.apache.oozie.action.hadoop.JavaActionExecutor.createJobClient(JavaActionExecutor.java:1177)
> at
> org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:927)
> ... 8 more
> Caused by: java.net.ConnectException: Connection refused
> at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:740)
> at
> org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
> at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
> at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
> at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:601)
> at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:696)
> at org.apache.hadoop.ipc.Client$Connection.access$2700(Client.java:367)
> at org.apache.hadoop.ipc.Client.getConnection(Client.java:1458)
> at org.apache.hadoop.ipc.Client.call(Client.java:1377)
> ... 31 more
> 2015-09-06 20:16:27,970 INFO ActionStartXCommand:541 -
> SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> JOB[0000004-150906115439360-oozie-hdus-W]
> ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Next Retry, Attempt
> Number [2] in [60,000] milliseconds
> 2015-09-06 20:16:28,022 INFO ActionStartXCommand:541 -
> SERVER[akamal-laptop] USER[hduser] GROUP[-] TOKEN[] APP[java-main-wf]
> JOB[0000004-150906115439360-oozie-hdus-W]
> ACTION[0000004-150906115439360-oozie-hdus-W@java-node] Start action
> [0000004-150906115439360-oozie-hdus-W@java-node] with user-retry state :
> userRetryCount [0], userRetryMax [0], userRetryInterval [10]
>
> --
> JAK ,
>
> Ahmed Kamal
> Junior Big Data Engineer , BadrIT