nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A.B. Srinivasan" <ab.sriniva...@gmail.com>
Subject Capturing stdout *and* stderr of command executed by ExecuteStreamCommandProcessor
Date Tue, 13 Dec 2016 07:14:28 GMT
Hello all,

I have a Java program being invoked within a ExecuteStreamCommand processor.
Prior to the invocation of the ExecuteStreamCommand, I set up the
'filename' property containing the output file into which the
ExecuteStreamCommand processor directs its output stream.

This works pretty well to capture logger messages output by the Java
program. However, on the rare occasion when the Java program dies with
something like an OutOfMemory error, the message is lost and I have no info
on why the program failed.
Additionally, if the Java program dies fairly early in its launch before
the loggers are set up, ExecuteStreamCommand does not even break out and
return an error.
In both of these situations, I have to run the program standalone outside
of the ExecuteStreamCommand to see the errors.

What configuration options do I have for the ExecuteStreamCommand processor
/ its output stream to both capture *all* output directed to stdout and
stderr and reliably be able to break out and return if the Java program has
failed to launch?

Thanks,
A.B.

Mime
View raw message