question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows service start error 1053 : The service did not respond to the start or control request in timely fashion while starting simple worker service template

See original GitHub issue

Describe the bug

Problem occurs after publishing and creating simple worker service template. Windows service gives Error 1053 : The service did not respond to the start or control request in timely fashion when starting service. Problem occurs only if publishing with target WinX86,WinX64 modes. Problem does no occur if publishing made using Portable mode. I have not tried with linux deamons

To Reproduce

Steps to reproduce the behavior:

  1. Using simple worker service template for .net core 3.0.0
  2. It also occurs after adding Microsoft.Extensions.Hosting.WindowsServices:3.0.0
  3. Publish using target mode either winx64 or winx86
  4. register service using sc create command. For instance sc.exe create WorkerService3 binPath=C:\Users\cahit.beyaz\source\repos\WorkerService1\WorkerService1\bin\Release\netcoreapp3.0\publish\WorkerService1.exe

Expected behavior

Windows service should start service normally for both targetruntime portable, x86,x64 when using simple Worker Service Template

Screenshots

image

Additional context

Add any other context about the problem here. Include the output of dotnet --info

C:\Users\cahit.beyaz>dotnet --info .NET Core SDK (reflecting any global.json): Version: 3.0.100 Commit: 04339c3a26

Runtime Environment: OS Name: Windows OS Version: 10.0.18362 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\3.0.100\

Host (useful for support): Version: 3.0.0 Commit: 7d57652f33

.NET Core SDKs installed: 2.1.700 [C:\Program Files\dotnet\sdk] 2.1.801 [C:\Program Files\dotnet\sdk] 2.1.802 [C:\Program Files\dotnet\sdk] 2.2.202 [C:\Program Files\dotnet\sdk] 2.2.301 [C:\Program Files\dotnet\sdk] 3.0.100 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cahitbeyazcommented, Oct 25, 2019

@gerardo-lijs adding <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="3.0.0" /> package

and changing host builder as public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureLogging((hostingContext,config) => { config.AddLog4Net(); }) .UseWindowsService() .ConfigureServices((hostContext, services) => { services.AddHostedService<Worker>(); });

solves the issue. We can close the issue. I will after you verify.

0reactions
cahitbeyazcommented, Oct 30, 2019

@gerardo-lijs happy seeing things work

Read more comments on GitHub >

github_iconTop Results From Across the Web

.NET Core Error 1053 the service did not respond to ...
NET Core Error 1053 the service did not respond to the start or control request in a timely fashion · Ask Question. Asked...
Read more >
[6 Solutions] 'Error: 1053. Service didn't respond in a timely ...
What causes Error 1053 in Windows? · Solution 1: Change Timeout Settings through Registry · Solution 2: Check for System File Corruptions.
Read more >
Error 1053: Service did not respond to the start or control ...
1] Modify timeout settings via Windows Registry · 2] Run System File Checker · 3] Uninstall and Reinstall the Application · 4] Troubleshoot...
Read more >
Fixed: Error 1053: The service did not respond to the start ...
Causes of Error 1053 · Insufficient system resources: If your computer is low on resources such as memory or processing power, services may ......
Read more >
How to Fix Error 1053: The Service Did Not ... - YouTube
How to Fix Error 1053 : The Service Did Not Respond to the Start or Control Request in a Timely Fashion. When attempting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found