Windows Service Deploy - Service Stops after approx 30s


I try to install a windows service and had to put a post deploy step to check the status of the service after 40 seconds and start it up again if in stopped state.

This happens without fail - checking the event viewer Application logs it says the service started successfully and then says service stopped successfully (no errors or warnings).

This seems like a bug to me but could be wrong.

i have a single step that is a “Deploy Package” step.

It gets the Nuget Package from my TeamCity Server, extracts the embedded zip file (deploy custom script) within the nuget and then loads the exe windows service.

Install a windows service Ticked.

Local System Service Account and Start mode Automatic.

Many thanks for the help.



Actually it could be the service itself - im currently trying to get confirmation by development team.



Hi Siôn,

Thanks for reaching out. I can confirm that there’s nothing in Octopus that should be stopping your service that way. It does sound like an environment thing, or something from the service itself.

If you wanna make sure that its not an Octopus thing, send us the deployment log so we can take a look at it.

Best regards,

Hi Dalmiro,

You were spot on - Environment, had to change config file.

Many thanks

All working Now.



This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.