#1 2026-01-03 21:47:09

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 495

angel does not start a windows service if stopped

I have the angel app and a windows service it should monitor (I kept only needed from its config):
       {
                "Start":
                [
                        "service:pchrd",
                        "sleep:3000"
                ],
                "Stop":
                [
                        "service:pchrd"
                ],
                "Watch":
                [
                        "service:pchrd"
                ],
                "WatchDelaySec": 60,
                "WatchCountRestart": 3,

        }
I am getting in the log:
20260103 21315748  $ trace mormot.core.os.TServiceController(026b64e52640) GetState(pchrd)=Stopped
20260103 21315748  $ trace angel.pchr.tmyAngelconfig(026b652d8fc0) SetState(Stopped) [As Windows Service "pchrd"]
20260103 21325722  $ trace mormot.core.os.TServiceController(026b64e52640) GetState(pchrd)=Stopped
20260103 21325722  $ trace angel.pchr.tmyAngelconfig(026b652d8fc0) SetState(Stopped) [As Windows Service "pchrd"]
20260103 21335748  $ trace mormot.core.os.TServiceController(026b64e52640) GetState(pchrd)=Stopped
20260103 21335748  $ trace angel.pchr.tmyAngelconfig(026b652d8fc0) SetState(Stopped) [As Windows Service "pchrd"]
20260103 21345819  $ trace mormot.core.os.TServiceController(026b64e52640) GetState(pchrd)=Stopped
20260103 21345819  $ trace angel.pchr.tmyAngelconfig(026b652d8fc0) SetState(Stopped) [As Windows Service "pchrd"]
20260103 21355755  $ trace mormot.core.os.TServiceController(026b64e52640) GetState(pchrd)=Stopped
20260103 21355755  $ trace angel.pchr.tmyAngelconfig(026b652d8fc0) SetState(Stopped) [As Windows Service "pchrd"]

and if I understand well in the source mormot.app.agl lines: 1613-6128 it never calls the StatusFailed to restart the service
Is there something I do wrong?
Thank you in advance

Offline

#2 2026-01-04 07:00:57

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 495

Re: angel does not start a windows service if stopped

I notice that with http watches, the service restarts. I am not sure if this is a bug or feature.
Is it possible for the "notify" to call a procedure of angel object with an rawutf8 argument defined in notify?

Last edited by dcoun (2026-01-04 08:44:54)

Offline

#3 2026-01-04 12:55:01

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,364
Website

Re: angel does not start a windows service if stopped

I didn't use it to check an external service yet, only for service hosted by angelize itself.
I will look into it.

Offline

#4 2026-01-05 09:08:06

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,364
Website

Re: angel does not start a windows service if stopped

Please try with
https://github.com/synopse/mORMot2/commit/06381f2aa

There was indeed some missing logic.

Offline

#5 2026-01-05 13:07:50

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 495

Re: angel does not start a windows service if stopped

thank @ab, I will test it

Offline

Board footer

Powered by FluxBB