qoollo / Concierge

Make a console app work as an self-installable interactive WindowsService with debug mode and commands
Apache License 2.0
8 stars 0 forks source link

If service fail to start concierge still ruining showing service as Running #15

Closed agend closed 8 years ago

slmjy commented 9 years ago

I guess Concierge is showing, that service is INSTALLED. And it's failing and trying to start again - that's a WindowsService behaviour. Or is Service really running, event Start method has crashed ?! Anyway, we can do 3 things: 1) Show, that service is Installed, but trying to start. 2) Add some diagnostics - a background task, that is monitoring service and detecting it's problems 3) Open WCF only when service succesfully started. But then you won't be able to connect remotely and reinstall it for example.

So, please, specify the problem and tell us, what you think about my suggetions.

agend commented 9 years ago

I will test is the really doing "And it's failing and trying to start again" 1) How exactly? in service panel it's just state: Running 2) Not following you 3) Bad idea in case we can perform management I expect that concierge is as part of App and if App fail concierge fail as well. If Concierge is a level live service supervisor it will break existing scenarios for monitoring (zabbix, etc.) You will need to do special moves for monitoring concierge, which will be specific and not common neither for Window nor for Unix.

slmjy commented 9 years ago

I got it, then it's a bug, that Concierge is keeping Service alive.

agend commented 9 years ago

Service not restarting after fail

ikopylov commented 8 years ago

:up: Concierge swallow all exceptions during asyncronous service start.

This is happened due to usage of Task.Factory.StartNew to perform asynchronous start. Task siliently swallows all exceptions and rethrows them on Wait or Result access. But this methods is never used in the code.

Suggestions:

UPD Or an easier way: just use Thread instead of Task

nmenshov commented 8 years ago

Use thread instead of Task