You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by Tobin Baker <td...@cs.washington.edu> on 2016/05/13 22:52:34 UTC

[Java] ClientConfiguration.ON_RUNTIME_ERROR handler not being run when Driver submission fails

Hi, I just had the YARN ResourceManager fail to launch my Driver
application because of a file permissions error, but my handler registered
with ClientConfiguration.ON_RUNTIME_ERROR was never called (nor was
ClientConfiguration.ON_JOB_FAILED). I assumed that any YARN runtime errors
launching the Driver should trigger this handler; was I mistaken? If this
is not the proper place to handle a runtime error when submitting the
Driver, where should I register such a handler?

Thanks,
Tobin

Re: [Java] ClientConfiguration.ON_RUNTIME_ERROR handler not being run when Driver submission fails

Posted by Tobin Baker <td...@cs.washington.edu>.
As I mentioned, I didn't save the logs, so unfortunately I can't verify
details. I know the error message in the RM log was that a job resources
directory (under `yarn.nodemanager.local-dirs`) couldn't be created because
of a file permissions issue, but I think this must have been an NM error
that was remoted to the RM and ended up in the RM log as the reason for
Driver submission failure. I thought that since the RM detected this error
and failed the job submission, somehow it could have propagated the error
to REEF, but I haven't looked closely at `YarnJobSubmissionHandler` yet.

The other job submission failure message appeared in the REEF client log
(the Driver never started since job submission failed).



On Mon, May 16, 2016 at 10:52 AM, Markus Weimer <ma...@weimo.de> wrote:

> On 2016-05-16 8:58 AM, Tobin Baker wrote:
>
>> Thanks for the clarification. I didn't get any exception at all in
>> this scenario.
>>
>
> Interesting. So neither the upload of the resources nor the submission
> to the RM threw any exceptions? In this case, the error could have been
> on the Driver side, or that machines node manager. If the files uploaded
> have permissions such that the NM can't download them, the job
> submission would fail on that remote machine. We don't have code in the
> REEF Client to detect that.
>
>
> My client program just kept running after the Driver submission
>> failed (which was noted in a REEF log message)
>>
>
> In which log? Driver or Client?
>
> Thanks,
>
> Markus
>

Re: [Java] ClientConfiguration.ON_RUNTIME_ERROR handler not being run when Driver submission fails

Posted by Markus Weimer <ma...@weimo.de>.
On 2016-05-16 8:58 AM, Tobin Baker wrote:
> Thanks for the clarification. I didn't get any exception at all in
> this scenario.

Interesting. So neither the upload of the resources nor the submission
to the RM threw any exceptions? In this case, the error could have been
on the Driver side, or that machines node manager. If the files uploaded
have permissions such that the NM can't download them, the job
submission would fail on that remote machine. We don't have code in the
REEF Client to detect that.


> My client program just kept running after the Driver submission
> failed (which was noted in a REEF log message)

In which log? Driver or Client?

Thanks,

Markus

Re: [Java] ClientConfiguration.ON_RUNTIME_ERROR handler not being run when Driver submission fails

Posted by Tobin Baker <td...@cs.washington.edu>.
Thanks for the clarification. I didn't get any exception at all in this
scenario. My client program just kept running after the Driver submission
failed (which was noted in a REEF log message), and no handlers were
called. The RM log indicated that the RM had failed to create a job
submission directory for the application (actually that may have been a NM
error that was remoted to the RM; logs are gone so I'm not sure).

On Sun, May 15, 2016 at 9:15 AM, Markus Weimer <ma...@weimo.de> wrote:

> On 2016-05-13 15:52, Tobin Baker wrote:
>
>> Hi, I just had the YARN ResourceManager fail to launch my Driver
>> application because of a file permissions error, but my handler registered
>> with ClientConfiguration.ON_RUNTIME_ERROR was never called (nor was
>> ClientConfiguration.ON_JOB_FAILED). I assumed that any YARN runtime errors
>> launching the Driver should trigger this handler; was I mistaken?
>>
>
> We don't have a test case for when the actual submission fails, so this
> might be a bug in REEF.
>
> The `ON_JOB_FAILED` handler is actually fed from the Driver via the
> network, so it can't be called here. However, it is the logical place to do
> it. `ON_RUNTIME_ERROR` is meant for when the RM itself becomes unavailable
> or such. However, that is fed by the YARN client and thus more accessible
> to us in the case you face above.
>
> Speaking of which: Do you get the exception thrown by
> org.apache.reef.runtime.yarn.client.YarnJobSubmissionHandler.onNext() in
> line 121? If so, that is the place where we can grab it and route it into
> one of the above event handlers.
>
> Markus
>
>

Re: [Java] ClientConfiguration.ON_RUNTIME_ERROR handler not being run when Driver submission fails

Posted by Markus Weimer <ma...@weimo.de>.
On 2016-05-13 15:52, Tobin Baker wrote:
> Hi, I just had the YARN ResourceManager fail to launch my Driver
> application because of a file permissions error, but my handler registered
> with ClientConfiguration.ON_RUNTIME_ERROR was never called (nor was
> ClientConfiguration.ON_JOB_FAILED). I assumed that any YARN runtime errors
> launching the Driver should trigger this handler; was I mistaken?

We don't have a test case for when the actual submission fails, so this 
might be a bug in REEF.

The `ON_JOB_FAILED` handler is actually fed from the Driver via the 
network, so it can't be called here. However, it is the logical place to 
do it. `ON_RUNTIME_ERROR` is meant for when the RM itself becomes 
unavailable or such. However, that is fed by the YARN client and thus 
more accessible to us in the case you face above.

Speaking of which: Do you get the exception thrown by 
org.apache.reef.runtime.yarn.client.YarnJobSubmissionHandler.onNext() in 
line 121? If so, that is the place where we can grab it and route it 
into one of the above event handlers.

Markus