-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A WinRM timeout causes a HTTP 500 but is not notified to OverthereProcessOutputHandler #57
Comments
Hi zerikv, Well, I don't think developers that use the Overthere library would expect exceptions to be mixed with the stdout and stderr information that is sent to the OverthereProcessOutputHandler. Then again, I do understand the use case. If the users of your application can only see the logs sent to the OverthereProcessOutputHandler, they would not see exceptions like these while you want to let hem know that the target host could not be reached. We solved that in Deployit, the deployment automation product for which we built Overthere, by catching the exception and then invoking logError explicitly so that the error does show up in the logs in our user interface. For example:
Hope this helps! Regards, Vincent. |
Hi Vincent, Thank you for your reply. Unfortunately, catch the exception on the call My understanding of the issue is the following:
Maybe the exception could be propagated by the What do you think about the following changes into
final List<RuntimeIOException> exceptionWrapper = new ArrayList<RuntimeIOException>(1);
catch (Exception exc) {
exceptionWrapper.add(new RuntimeIOException("Cannot start process " + commandLine, exc));
return;
}
if(exceptionWrapper.size() != 0) {
throw exceptionWrapper.get(0);
} Thank you for your help, Eric |
Hi Eric, Aha, like that! Yeah, I guess you'd want to have a way to get at that exception. But Hmm, lemme have a think on this one... Regards, Vincent. |
Hi Vincent, Just a little precision: In fact I use the method The method It is this last method which I was referring in my message above. Thanks, Eric. |
Hello,
With OverThere 2.1.0-beta-1 (from Maven), I open a WinRM connection (
CifsConnectionBuilder.CIFS_PROTOCOL
) configured with a timeout to 10 secondes:With this connection, a command line is requested, to execute a PowerShell which sleeps for 12 secondes.
Therefore the SOAP request falls in timeout.
I can see in the logs this timeout causes an HTTP response from the WinRM service with a HTTP code 500 (please, see logs below).
But the
WinRMRuntimeIOException
is catched and no handler ofOverthereProcessOutputHandler
is called.I would need to intercept this kind of error.
What do you think about this issue?
Thank you for your advices.
The text was updated successfully, but these errors were encountered: