[jira] [Commented] (DAEMON-243) Support for Failure Recovery

2020-08-19 Thread Marat Abrarov (Jira)


[ 
https://issues.apache.org/jira/browse/DAEMON-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17180559#comment-17180559
 ] 

Marat Abrarov commented on DAEMON-243:
--

[~markt],

Sorry for the late reply. I don't think it really matters at the moment (at 
least for my case), but here is the thing I had to notice long ago:
 # WildFly project still uses 1.0.15 version of Apache Commons Daemon. I've 
just checked the latest - 20.0.1.Final - version.
 # My pull request was created from trunk (which looks far ahead of 
COMMONS_DAEMON_1_0_15 tag) but changes (diff I attached) should be applicable 
for 1.0.15 version.
 # I think it's responsibility of WildFly project to take care of this 
improvement and I believe that WildFly project is better to migrate to the 
latest version of Apache Commons Daemon instead of taking care of any patches / 
custom builds. I'll take a look if I can report anything (reproduce / test & 
report) to WildFly project soon.

Thank you for your feedback and work!

> Support for Failure Recovery
> 
>
> Key: DAEMON-243
> URL: https://issues.apache.org/jira/browse/DAEMON-243
> Project: Commons Daemon
>  Issue Type: New Feature
>  Components: Procrun
>Affects Versions: 1.0.10
> Environment: MS Windows
>Reporter: Peter Ehrbar
>Priority: Minor
> Fix For: 1.1.0
>
> Attachments: fail_without_stopped_status.diff
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The MS Windows Service Controller provides functionality to perform some 
> basic failure recovery actions: Restart service or execute any command or 
> restart the machine. This can be configured using the Service Controller GUI 
> or in a shell with SC.EXE (commands FAILURE and FAILUREFLAG).
> It would be convenient if this could be configured also using procrun.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (DAEMON-243) Support for Failure Recovery

2018-05-15 Thread Marat Abrarov (JIRA)

 [ 
https://issues.apache.org/jira/browse/DAEMON-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marat Abrarov updated DAEMON-243:
-
Attachment: (was: fail_without_stopped_status.diff)

> Support for Failure Recovery
> 
>
> Key: DAEMON-243
> URL: https://issues.apache.org/jira/browse/DAEMON-243
> Project: Commons Daemon
>  Issue Type: New Feature
>  Components: Procrun
>Affects Versions: 1.0.10
> Environment: MS Windows
>Reporter: Peter Ehrbar
>Priority: Minor
> Attachments: fail_without_stopped_status.diff
>
>
> The MS Windows Service Controller provides functionality to perform some 
> basic failure recovery actions: Restart service or execute any command or 
> restart the machine. This can be configured using the Service Controller GUI 
> or in a shell with SC.EXE (commands FAILURE and FAILUREFLAG).
> It would be convenient if this could be configured also using procrun.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (DAEMON-243) Support for Failure Recovery

2018-05-15 Thread Marat Abrarov (JIRA)

 [ 
https://issues.apache.org/jira/browse/DAEMON-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marat Abrarov updated DAEMON-243:
-
Attachment: fail_without_stopped_status.diff

> Support for Failure Recovery
> 
>
> Key: DAEMON-243
> URL: https://issues.apache.org/jira/browse/DAEMON-243
> Project: Commons Daemon
>  Issue Type: New Feature
>  Components: Procrun
>Affects Versions: 1.0.10
> Environment: MS Windows
>Reporter: Peter Ehrbar
>Priority: Minor
> Attachments: fail_without_stopped_status.diff
>
>
> The MS Windows Service Controller provides functionality to perform some 
> basic failure recovery actions: Restart service or execute any command or 
> restart the machine. This can be configured using the Service Controller GUI 
> or in a shell with SC.EXE (commands FAILURE and FAILUREFLAG).
> It would be convenient if this could be configured also using procrun.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (DAEMON-243) Support for Failure Recovery

2018-05-06 Thread Marat Abrarov (JIRA)

[ 
https://issues.apache.org/jira/browse/DAEMON-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16465292#comment-16465292
 ] 

Marat Abrarov edited comment on DAEMON-243 at 5/6/18 8:57 PM:
--

[~mt...@apache.org],

Regarding
{quote}So if you wish to have this supported better write some code
{quote}
I created [pull request #5|https://github.com/apache/commons-daemon/pull/6] at 
[apache/commons-daemon|https://github.com/apache/commons-daemon] with changes 
in prunsrv for better support of standard Windows service recovery actions (for 
better reporting about failure of service).

Patch for trunk version is attached as [^fail_without_stopped_status.diff].

Could you please take a look?


was (Author: abrarovm):
[~mt...@apache.org],

Regarding
{quote}
So if you wish to have this supported better write some code
{quote}

I created [pull request #5|https://github.com/apache/commons-daemon/pull/6] at 
[apache/commons-daemon|https://github.com/apache/commons-daemon] with changes 
in prunsrv for better support of standard Windows service recovery actions (for 
better reporting about failure of service).

Patch for trunk version is attached as [^fail_without_stopped_status.diff].

Could you lease take a look?

> Support for Failure Recovery
> 
>
> Key: DAEMON-243
> URL: https://issues.apache.org/jira/browse/DAEMON-243
> Project: Commons Daemon
>  Issue Type: New Feature
>  Components: Procrun
>Affects Versions: 1.0.10
> Environment: MS Windows
>Reporter: Peter Ehrbar
>Priority: Minor
> Attachments: fail_without_stopped_status.diff
>
>
> The MS Windows Service Controller provides functionality to perform some 
> basic failure recovery actions: Restart service or execute any command or 
> restart the machine. This can be configured using the Service Controller GUI 
> or in a shell with SC.EXE (commands FAILURE and FAILUREFLAG).
> It would be convenient if this could be configured also using procrun.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (DAEMON-243) Support for Failure Recovery

2018-05-06 Thread Marat Abrarov (JIRA)

[ 
https://issues.apache.org/jira/browse/DAEMON-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16465292#comment-16465292
 ] 

Marat Abrarov edited comment on DAEMON-243 at 5/6/18 8:53 PM:
--

[~mt...@apache.org],

Regarding
{quote}
So if you wish to have this supported better write some code
{quote}

I created [pull request #5|https://github.com/apache/commons-daemon/pull/6] at 
[apache/commons-daemon|https://github.com/apache/commons-daemon] with changes 
in prunsrv for better support of standard Windows service recovery actions (for 
better reporting about failure of service).

Patch for trunk version is attached as [^fail_without_stopped_status.diff].

Could you lease take a look?


was (Author: abrarovm):
[~mt...@apache.org],

Regarding
{quote}
So if you wish to have this supported better write some code
{quote}

I created [pull request #5|https://github.com/apache/commons-daemon/pull/6] at 
[apache/commons-daemon|https://github.com/apache/commons-daemon] with changes 
in prunsrv for better support of standard Windows service recovery actions (for 
better reporting about failure of service).

Could you lease take a look?

> Support for Failure Recovery
> 
>
> Key: DAEMON-243
> URL: https://issues.apache.org/jira/browse/DAEMON-243
> Project: Commons Daemon
>  Issue Type: New Feature
>  Components: Procrun
>Affects Versions: 1.0.10
> Environment: MS Windows
>Reporter: Peter Ehrbar
>Priority: Minor
> Attachments: fail_without_stopped_status.diff
>
>
> The MS Windows Service Controller provides functionality to perform some 
> basic failure recovery actions: Restart service or execute any command or 
> restart the machine. This can be configured using the Service Controller GUI 
> or in a shell with SC.EXE (commands FAILURE and FAILUREFLAG).
> It would be convenient if this could be configured also using procrun.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (DAEMON-243) Support for Failure Recovery

2018-05-06 Thread Marat Abrarov (JIRA)

[ 
https://issues.apache.org/jira/browse/DAEMON-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16465292#comment-16465292
 ] 

Marat Abrarov edited comment on DAEMON-243 at 5/6/18 8:52 PM:
--

[~mt...@apache.org],

Regarding
{quote}
So if you wish to have this supported better write some code
{quote}

I created [pull request #5|https://github.com/apache/commons-daemon/pull/6] at 
[apache/commons-daemon|https://github.com/apache/commons-daemon] with changes 
in prunsrv for better support of standard Windows service recovery actions (for 
better reporting about failure of service).

Could you lease take a look?


was (Author: abrarovm):
 [~mt...@apache.org],

Regarding
{quote}
So if you wish to have this supported better write some code
{quote}

I created [pull request #5|https://github.com/apache/commons-daemon/pull/6] at 
[apache/commons-daemon|https://github.com/apache/commons-daemon] with changes 
in prunsrv for better support of standard Windows service recovery actions (for 
better reporting about failure of service).

Could you lease take a look?

> Support for Failure Recovery
> 
>
> Key: DAEMON-243
> URL: https://issues.apache.org/jira/browse/DAEMON-243
> Project: Commons Daemon
>  Issue Type: New Feature
>  Components: Procrun
>Affects Versions: 1.0.10
> Environment: MS Windows
>Reporter: Peter Ehrbar
>Priority: Minor
> Attachments: fail_without_stopped_status.diff
>
>
> The MS Windows Service Controller provides functionality to perform some 
> basic failure recovery actions: Restart service or execute any command or 
> restart the machine. This can be configured using the Service Controller GUI 
> or in a shell with SC.EXE (commands FAILURE and FAILUREFLAG).
> It would be convenient if this could be configured also using procrun.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (DAEMON-243) Support for Failure Recovery

2018-05-06 Thread Marat Abrarov (JIRA)

 [ 
https://issues.apache.org/jira/browse/DAEMON-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marat Abrarov updated DAEMON-243:
-
Attachment: fail_without_stopped_status.diff

> Support for Failure Recovery
> 
>
> Key: DAEMON-243
> URL: https://issues.apache.org/jira/browse/DAEMON-243
> Project: Commons Daemon
>  Issue Type: New Feature
>  Components: Procrun
>Affects Versions: 1.0.10
> Environment: MS Windows
>Reporter: Peter Ehrbar
>Priority: Minor
> Attachments: fail_without_stopped_status.diff
>
>
> The MS Windows Service Controller provides functionality to perform some 
> basic failure recovery actions: Restart service or execute any command or 
> restart the machine. This can be configured using the Service Controller GUI 
> or in a shell with SC.EXE (commands FAILURE and FAILUREFLAG).
> It would be convenient if this could be configured also using procrun.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (DAEMON-243) Support for Failure Recovery

2018-05-06 Thread Marat Abrarov (JIRA)

[ 
https://issues.apache.org/jira/browse/DAEMON-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16465292#comment-16465292
 ] 

Marat Abrarov commented on DAEMON-243:
--

 [~mt...@apache.org],

Regarding
{quote}
So if you wish to have this supported better write some code
{quote}

I created [pull request #5|https://github.com/apache/commons-daemon/pull/6] at 
[apache/commons-daemon|https://github.com/apache/commons-daemon] with changes 
in prunsrv for better support of standard Windows service recovery actions (for 
better reporting about failure of service).

Could you lease take a look?

> Support for Failure Recovery
> 
>
> Key: DAEMON-243
> URL: https://issues.apache.org/jira/browse/DAEMON-243
> Project: Commons Daemon
>  Issue Type: New Feature
>  Components: Procrun
>Affects Versions: 1.0.10
> Environment: MS Windows
>Reporter: Peter Ehrbar
>Priority: Minor
> Attachments: fail_without_stopped_status.diff
>
>
> The MS Windows Service Controller provides functionality to perform some 
> basic failure recovery actions: Restart service or execute any command or 
> restart the machine. This can be configured using the Service Controller GUI 
> or in a shell with SC.EXE (commands FAILURE and FAILUREFLAG).
> It would be convenient if this could be configured also using procrun.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (DAEMON-243) Support for Failure Recovery

2018-05-03 Thread Marat Abrarov (JIRA)

[ 
https://issues.apache.org/jira/browse/DAEMON-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16462803#comment-16462803
 ] 

Marat Abrarov commented on DAEMON-243:
--

I was a little bit wrong in my previous comment - there is one more option 
named "failure flag" ("Enable actions for stops with errors" checkbox on 
"Recovery" tab of Windows service view at "Services" MMC snap-in). Refer to 
[https://serverfault.com/questions/72318/set-up-recovery-actions-to-take-place-when-a-service-fails]
 for details. This flag can be used with existing Commons Daemon (tested on 
1.0.15.0 version) to make recovery actions working, but I'm wondering why 
doesn't prunsrv turn on this flag by default (this looks like an opportunity 
for enhancement) or doesn't provide some command option for installing service 
with this flag?

> Support for Failure Recovery
> 
>
> Key: DAEMON-243
> URL: https://issues.apache.org/jira/browse/DAEMON-243
> Project: Commons Daemon
>  Issue Type: New Feature
>  Components: Procrun
>Affects Versions: 1.0.10
> Environment: MS Windows
>Reporter: Peter Ehrbar
>Priority: Minor
>
> The MS Windows Service Controller provides functionality to perform some 
> basic failure recovery actions: Restart service or execute any command or 
> restart the machine. This can be configured using the Service Controller GUI 
> or in a shell with SC.EXE (commands FAILURE and FAILUREFLAG).
> It would be convenient if this could be configured also using procrun.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (DAEMON-243) Support for Failure Recovery

2018-04-26 Thread Marat Abrarov (JIRA)

[ 
https://issues.apache.org/jira/browse/DAEMON-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16455451#comment-16455451
 ] 

Marat Abrarov commented on DAEMON-243:
--

[~mt...@apache.org], it looks like there is no solution actually - I played 
with procrun and recovery actions recently and found below:

 # When my process exits with non-zero exit code, then procrun just *stops* 
Windows service with non-zero return code.
 # Windows service controller doesn't apply recovery actions for services which 
are stopped (no matter what is return code) - refer to "[Using the Automatic 
Recovery Features of Windows 
Services|https://mdenomy.wordpress.com/2008/02/28/using-the-automatic-recovery-features-of-windows-services/];
 for details.

I guess, procrun can be extended with some option - like {{ExitMode}} - which 
could specify if procrun should stop service without reporting 
{{SERVICE_STOPPED}} status (refer to "[MSDN: SERVICE_FAILURE_ACTIONS 
structure|https://msdn.microsoft.com/en-us/library/ms685939(VS.85).aspx]") when 
child process finishes with non-zero exit code, or if procrun should handle 
non-zero exit code of child process the same way as it does today (default 
configuration for compatibility with existing installations).

What do you think about this?

The only way I found to make Windows service recovery actions working is to 
kill prunsrv.exe process. Unfortunately it doesn't work for me because:

# It's more complicated comparing to application which just exits with non-zero 
exit code and assumes that admin can configure recovery actions by means of OS.
# I want to use application (JBoss) in both ways - as Windows service and as 
console application. If I configure Java out-of-memory action to kill not Java 
process (with non-zero exit code) but to kill prunsrv.exe process then such 
solution will work only when application is launched as Windows service, while 
making procrun able to terminate service by non-zero exit code of child process 
will cover both cases I need.

> Support for Failure Recovery
> 
>
> Key: DAEMON-243
> URL: https://issues.apache.org/jira/browse/DAEMON-243
> Project: Commons Daemon
>  Issue Type: New Feature
>  Components: Procrun
>Affects Versions: 1.0.10
> Environment: MS Windows
>Reporter: Peter Ehrbar
>Priority: Minor
>
> The MS Windows Service Controller provides functionality to perform some 
> basic failure recovery actions: Restart service or execute any command or 
> restart the machine. This can be configured using the Service Controller GUI 
> or in a shell with SC.EXE (commands FAILURE and FAILUREFLAG).
> It would be convenient if this could be configured also using procrun.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)