Wdindows 2012r2 Taskkill not working
-
- New to forums
- Posts: 10
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Sat Feb 15, 2014 2:32 am
Wdindows 2012r2 Taskkill not working
Using taskkill sometimes fails to end certain proccesses. This has never been a problem on 2008r2.
This is annoying with SRCDS.exe hanging as it not only uses memory, but hogs the port.
There's a KB article for it here: http://support.microsoft.com/kb/2798040
However, the update does not seem to fix the problem, which usually happens when the server is under a lot of load.
I run the task as a seperate user, and using taskkill to kill all of that user's proccesses used to ensure that the proccess would end. If I use proccess explorer (http://technet.microsoft.com/en-us/sysi ... 96653.aspx) I am able to end the task manually. However, I use a batch script that queries the server and issues a taskkill to restart it, which obviously won't work in this case. Is there a fix for this, or some command line application that will work to replace taskkill, which I can use to kill all of a user's proccesses?
This is annoying with SRCDS.exe hanging as it not only uses memory, but hogs the port.
There's a KB article for it here: http://support.microsoft.com/kb/2798040
However, the update does not seem to fix the problem, which usually happens when the server is under a lot of load.
I run the task as a seperate user, and using taskkill to kill all of that user's proccesses used to ensure that the proccess would end. If I use proccess explorer (http://technet.microsoft.com/en-us/sysi ... 96653.aspx) I am able to end the task manually. However, I use a batch script that queries the server and issues a taskkill to restart it, which obviously won't work in this case. Is there a fix for this, or some command line application that will work to replace taskkill, which I can use to kill all of a user's proccesses?
Re: Wdindows 2012r2 Taskkill not working
Also, it seems to crash often after updates/restarts. I don't know if this is due to the hypervisor, but it's pretty much just a stock install with updates. Never had this problem with 2008r2 on my other VDS.
Re: Wdindows 2012r2 Taskkill not working
Please right-click on the Windows start icon then choose System. Select the Advanced tab and then click Environment Variables. At the system variables panel, choose Path then click the Edit button. Ensure that the following is listed:
%SystemRoot%\system32;
%SystemRoot%\system32;
Re: Wdindows 2012r2 Taskkill not working
That was one of the things I checked first, my path is set to:Spray wrote:Please right-click on the Windows start icon then choose System. Select the Advanced tab and then click Environment Variables. At the system variables panel, choose Path then click the Edit button. Ensure that the following is listed:
%SystemRoot%\system32;
Code: Select all
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
Re: Wdindows 2012r2 Taskkill not working
Do you get any error output from the script when you run it?
Re: Wdindows 2012r2 Taskkill not working
When I use taskkill, it doesn't find anything or the image name filter (using user /im * to kill all of that users proccesses), or it says the PID doesn't exist.
I could try like PSKILL or something, but most of those utilities don't let me specify the user, so it will just kill all of my SRCDS instances.
I could try like PSKILL or something, but most of those utilities don't let me specify the user, so it will just kill all of my SRCDS instances.
Re: Wdindows 2012r2 Taskkill not working
Seems this is still happening. I can use PSkill on all the image names, but it nukes all of the srcds processes, which isn't good since I have multiple. I tried to use a limited account to execute the kill command with runas, and also with the command switches, but it still kills all of them.
Would you guys happen to know another command line utility that can kill proccesses owned by a specific user?
I don't know why taskkill is failing here, but it's still killing all of the user's tasks except for SRCDS.EXE, and it will sit there trying for hours to kill it, but cannot. I'm pretty sure it's a bug with windows 2012, since other people have reported it on the MS forums, and they have a patch for it (which doesn't work). It might be some service that's enabled that shouldn't be or something with error reporting that is causing it to lock up and not accept normal kill signals. I don't know. Seems like a bad solution to just switch to 2008r2.
Would you guys happen to know another command line utility that can kill proccesses owned by a specific user?
I don't know why taskkill is failing here, but it's still killing all of the user's tasks except for SRCDS.EXE, and it will sit there trying for hours to kill it, but cannot. I'm pretty sure it's a bug with windows 2012, since other people have reported it on the MS forums, and they have a patch for it (which doesn't work). It might be some service that's enabled that shouldn't be or something with error reporting that is causing it to lock up and not accept normal kill signals. I don't know. Seems like a bad solution to just switch to 2008r2.
Re: Wdindows 2012r2 Taskkill not working
Does using the /F option for taskkill make any difference?
Does it work when you specify the specific PID using /PID?
Does it work when you specify the specific PID using /PID?
Re: Wdindows 2012r2 Taskkill not working
I've always used:
taskkill /t /f /fi "USERNAME eq DOMAIN\USER" /im *
The only thing that user account does is run a batch file via runas that launches /restarts SRCDS. There's an administrator account that issues that taskkill command, and checks if the instance is hung or not.
if I specify the PID using taskkill, it says no proccess with that PID exists if I recall correctly. It will not end it, or even try to. It also dissapears from the task bar, and stops having any kind of visible window. It still uses some 400 megs of memory, but no CPU/Disk activity, and it doesn't respond to anything.
If I go into sysinternals process explorer, I can see the instance of SRCDS.EXE running, i'ts parent/hierarchy cmd.exe, the batch that runs it, etc are all gone. I can end it from there just fine, or from task manager, but not with taskkill.
taskkill /t /f /fi "USERNAME eq DOMAIN\USER" /im *
The only thing that user account does is run a batch file via runas that launches /restarts SRCDS. There's an administrator account that issues that taskkill command, and checks if the instance is hung or not.
if I specify the PID using taskkill, it says no proccess with that PID exists if I recall correctly. It will not end it, or even try to. It also dissapears from the task bar, and stops having any kind of visible window. It still uses some 400 megs of memory, but no CPU/Disk activity, and it doesn't respond to anything.
If I go into sysinternals process explorer, I can see the instance of SRCDS.EXE running, i'ts parent/hierarchy cmd.exe, the batch that runs it, etc are all gone. I can end it from there just fine, or from task manager, but not with taskkill.
Re: Wdindows 2012r2 Taskkill not working
Ok, this has been happening for a while, and this is what happens each time:
taskkill /t /f /fi "USERNAME eq xx\yy" /im *
ERROR: The process with PID 2088 (child process of PID 1088) could not be terminated.
Reason: There is no running instance of the task.
When I look at the image, for parent it says: <Non-existant Process>(1088)
if I leave out the /f switch, I just get
SUCCESS: Sent termination signal to process with PID 2088, child of PID 1088.
Either way, the process doesn't end.
taskkill /t /f /fi "USERNAME eq xx\yy" /im *
ERROR: The process with PID 2088 (child process of PID 1088) could not be terminated.
Reason: There is no running instance of the task.
When I look at the image, for parent it says: <Non-existant Process>(1088)
if I leave out the /f switch, I just get
SUCCESS: Sent termination signal to process with PID 2088, child of PID 1088.
Either way, the process doesn't end.