The Service Is Starting or Stopping. Please Try Again Later.

How to manually kill a Windows service process that is stack at "Stopping" or "Starting" country? Most Windows administrators have faced a problem when they try to first/stop/restart a service, only it gets stuck with the Stopping (or Starting) condition. You won't exist able to cease this service from the Service management console (services.msc), since all control buttons for this service go inactive (grayed out). The easiest fashion is to restart Windows, simply it is not always acceptable. Let's take a await at alternative ways, which allows to forcefully kill a stuck Windows service or process without system reboot.

windows service stopping, starting, not responding

If within thirty seconds after trying to stop the service, it doesn't stop, Windows displays this message:

Windows Could non cease the xxxxxx service on Local Computer Error 1053: The service did not reply in a timely manner.

The timeout that the Service Command Manager waits for a service to start or finish can be changed by using the ServicesPipeTimeout registry parameter. If the service doesn't offset within the specified timeout, Windows sends an fault to the Effect Viewer (Event ID: 7000, 7009, 7011, a timeout was reached 30000 milliseconds). You can increase this timeout to 60 seconds, for example:

reg add together HKLM\SYSTEM\CurrentControlSet\Control /v ServicesPipeTimeout /t REG_SZ /d 600000 /f

This is useful when starting/stopping heavy services that practise not accept enough time to properly finish all processes and shut the files (for example, MS SQL Server).

If you attempt to finish such a service from the command prompt: cyberspace end wuauserv, a message appears:

The service is starting or stopping. Delight try over again after.

The service is starting or stopping. Please try again letter.

or:

Windows could not cease the Service on Local Figurer. [SC] ControlService Error 1061: The service cannot take control letters at this time.

Contents:

  • How to Force Kill a Stuck Windows Service Using TaskKill?
  • Force Stop a Stuck Windows Service with PowerShell
  • Analyzing the Expect Chains on Hung Services Using ResMon
  • Killing a Hung Service Using Process Explorer

How to Strength Impale a Stuck Windows Service Using TaskKill?

The easiest way to stop a stuck service is to apply the built-in taskkill command-line tool. First of all, you lot need to find the PID (process identifier) of the service. Every bit an example, let's have the Windows Update service. Its system name is wuauserv (you can check the proper noun in the service properties in the services.msc console).

Important. Exist attentive. Forced termination of disquisitional Windows services can effect in BSOD or an unexpected system restart.

Run this command in the elevated command prompt (it is of import, or access denied error will appear):
sc queryex wuauserv
In our case, the PID of the wuauserv service is 9186.
To force kill a stuck process with the PID 9186, run the control:

taskkill /PID 9168 /F

stopping stuck windows service in cmd using taskkill

SUCCESS: The process with PID 9168 has been terminated.

This command will forcibly terminate the service process. Now you can kickoff the service with the sc start servicename control or through the service management panel

You lot tin can stop a hung service more elegantly without manually checking the PID of the service process. The taskkill tool has the /FI option, which allows you to use a filter to select the necessary services or processes. Y'all can kill a specific service with the control:

taskkill /F /FI "SERVICES eq wuauserv"

Or you can skip the service name at all and killing all services in a hung state with the control:

taskkill /F /FI "condition eq not responding"

After that, the service that is stack in the Stopping status should stop.

You lot tin can also use the taskkill utility to strength stop the hang services on a remote computer:

taskkill /S mun-fs01 /F /FI "SERVICES eq wuauserv"

Force Stop a Stuck Windows Service with PowerShell

You lot can also use PowerShell to force the service to stop. Using the following command, you tin can become a list of services in the Stopping state:

Get-WmiObject -Course win32_service | Where-Object {$_.state -eq 'stop awaiting'}

Or in the Starting state:

Get-WmiObject -Class win32_service | Where-Object {$_.state -eq 'showtime pending'}

list of services with "Stop pending" status

The Terminate-Procedure cmdlet allows terminating the processes of all found services. The following PowerShell script will stop all stuck service processes on Windows:

$Services = Get-WmiObject -Class win32_service -Filter "land = 'finish pending'"
if ($Services) {
foreach ($service in $Services) {
try {
Stop-Process -Id $service.processid -Force -PassThru -ErrorAction Cease
}
catch {
Write-Warning -Message "Error. Error details: $_.Exception.Bulletin"
}
}
}
else {
Write-Output "No services with 'Stopping'.status"
}

powershell script to kill stuck service process

Y'all must apply the Go-CimInstance instead of the Get-WmiObject cmdlet in the new PowerShell Cadre 6.x/7.ten. Supersede the first command of the script with:

$Services = Get-CimInstance -Class win32_service | where-Object state -eq 'stop pending'

Analyzing the Wait Chains on Hung Services Using ResMon

Yous tin can detect the process that caused the service to hang using the resmon.exe (Resource Monitor).

  1. In the Resource Monitor window, become to the CPU tab and find the hung service process;
  2. Select the item Analyze Await Chain from the context menu;Resource Monito analyze wait chain
  3. In the new window, you will about likely see that your procedure is waiting for some other process. End the process. If you are waiting for the svchost.exe or some other organisation procedure, you don't demand to terminate it. Try to analyze the wait chain for this procedure. Detect the PID of the process that your svchost.exe is waiting for and kill it.

Killing a Hung Service Using Process Explorer

Even the local administrator cannot terminate some processes that run nether the SYSTEM business relationship. The fact is that the admin account simply hasn't permissions on some processes or services. To cease such a process (service), you need to grant permissions to the service (process) to the local Administrators group and then kill them. To do this, we will need two modest tools: psexec.exe and ProcessExplorer (available on the Microsoft website).

  1. To start the ProcessExplorer with the system privileges (runas SYSTEM), use the control: PSExec -s -i ProcExp.exe
  2. In the Procedure Explorer process list, observe the stuck service process and open its properties;
  3. Get to the Services tab, find your service and click the Permissions push;proccess explorer service permissions
  4. Grant the Full Control correct in the service permissions for the Administrators grouping. Salve the changes;granting full control permissions on windows service for admin
  5. Now try to terminate the service process.

    Please note, that the permission on the service is granted temporarily until it is restarted. To grant permanent permissions on service follow the article Set permissions on a Windows service.

fieldsittries.blogspot.com

Source: http://woshub.com/killing-windows-services-that-hang-on-stopping/

0 Response to "The Service Is Starting or Stopping. Please Try Again Later."

Postar um comentário

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel