-
Notifications
You must be signed in to change notification settings - Fork 150
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
Service did not respond to the start or control request in a timely fashion #13
Comments
Hey mate. 2 things come to mind afk. Try to omit "." when calling the service. Second thing to try would be running cmd/powershell as administrator. If that doesn't help, give this a read #12 . Tou might find some good points there. If nothing helps, I'll get back to to u tomorrow ;-) |
Yeah tried both of this things with no luck, I have simplified my app down to this, and again working locally not on the server:
|
I looks kinda similar to that issue I've send you previously. Try to get the int that the run method returns. It should be 0 if it works properly. |
Also get the app path this way : PlatformServices.Default.Application.ApplicationBasePath . That's what I use so it's worth trying. |
Updated the path (They seem to be reporting the same path.), the run method is returning a -1. Ill read through the other ticket see if i can find what is causing my issue and report back. The annoying thing is that the only thing in the Start is Console.WriteLine and that is where the exception stack trace is ending. Update: There is a lot to sift through in the other ticket but so far I have discovered:
Alright, thats all the information I have, sorry if I have been spamming you. |
Amazing what a good nights sleep can do, I figured it out in my nightmares. The problem is the path and the command that gets generated. Locally the command thats getting setup for the service is However on the server Is there anyway to fix this, could we wrap the second parameter in quotes in the DotNetCore.WindowsService/Source/PeterKottas.DotNetCore.WindowsService/ServiceRunner.cs Line 149 in 2af90c3
|
Hi Andrew, don't worry, you're not spamming at all. On the contrary, good catch about the error! I'll make the change now and will upload new version so that you can give it a try. Will let you know once it's done |
Ok that's done and uploaded in v1.0.17 Let me know if it helps ;) |
Just tested up on the server works perfect, thank you so much 👍 |
Awesome, glad we fixed it mate. Thanks for making this lib better! Spread the work and let me know if you need anything else ;) |
I am having issues starting my service on Windows Server 2008 R2.
Installed it via
dotnet .\MyWindowsServiceApplication.dll action:install name:MyWindowsServiceApplication displayName:MyWindowsServiceApplication description:"My windows service application."
And it shows up, when i try to start it I instantly get
Error 1053 service did not respond to the start or control request in a timely fashion
When I run in manually through powershell via "dotnet .\MyWindowsServiceApplication.dll action:start" I get the following error through my logging around the
ServiceRunner.Run
:2017-03-23 18:51:16.1887 ERROR Program - System.InvalidOperationException: Cannot start service MyWindowsServiceApplication on computer '.'. ---> System.ComponentModel.Win32Exception: The service did not respond to the start or control request in a timely fashion --- End of inner exception stack trace --- at System.ServiceProcess.ServiceController.Start(String[] args) at PeterKottas.DotNetCore.WindowsService.ServiceRunner
1.StartService(HostConfiguration1 config, ServiceController sc) at PeterKottas.DotNetCore.WindowsService.ServiceRunner
1.ConfigureService(HostConfiguration1 config) at PeterKottas.DotNetCore.WindowsService.ServiceRunner
1.Run(Action1 runAction)
I can't tell what is going on as I get no other exception anywhere, any ideas?
I have managed to get this running locally on my computer which is the annoying part, just not on the server.
The text was updated successfully, but these errors were encountered: