XP SP2 Services
Hi All,
Having a bit of an issue with xp services. We have a piece of software which has it's own service. This depends on a few other services.
Throughout the night I have noticed the following mesages in event log.
The World Wide Web Publishing service entered the stopped state.
There are also other services which seem to have stop controls sent to them for no apparent reason.
These seem to be system generated.
Basically, when these stop messages are sent to the world wide publishing service, this causes our 'software service' to stop, and it is isn;t able to restart until we manually restart it.
Does anyone know why these system stop controls are sent to the services, e.g to IIS admin, FTP, SMTP, and WWW Publishing services overnight?
The exact event is below. Basically, I need to stop this from happening.
Event Type: Information
Event Source: Service Control Manager
Event Category: None
Event ID: 7035
Date: 14/09/2007
Time: 01:45:26
User: NT AUTHORITY\SYSTEM
Computer: PC12333
Description:
The World Wide Web Publishing service was successfully sent a stop control.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Many Thanks
Having a bit of an issue with xp services. We have a piece of software which has it's own service. This depends on a few other services.
Throughout the night I have noticed the following mesages in event log.
The World Wide Web Publishing service entered the stopped state.
There are also other services which seem to have stop controls sent to them for no apparent reason.
These seem to be system generated.
Basically, when these stop messages are sent to the world wide publishing service, this causes our 'software service' to stop, and it is isn;t able to restart until we manually restart it.
Does anyone know why these system stop controls are sent to the services, e.g to IIS admin, FTP, SMTP, and WWW Publishing services overnight?
The exact event is below. Basically, I need to stop this from happening.
Event Type: Information
Event Source: Service Control Manager
Event Category: None
Event ID: 7035
Date: 14/09/2007
Time: 01:45:26
User: NT AUTHORITY\SYSTEM
Computer: PC12333
Description:
The World Wide Web Publishing service was successfully sent a stop control.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Many Thanks
Do just once what others say you can't do, and you will never pay attention to their limitations again.
Comments
-
blargoe Member Posts: 4,174 ■■■■■■■■■□What other services are stopping at the same time? When your application services is terminated by whatever is going on, does it stop cleanly or does it crash with an error?
If it's crashing/failing when WWW stops running, a workaround to prevent your software from being down any longer than necessary would be to open the properties of the service and go to the Recovery tab. There you can set an action to restart the service the first time there is a failure. I think think this will work if your service is cleanly shut down because the WWW service sent it a shut down signal.IT guy since 12/00
Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
Working on: RHCE/Ansible
Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands... -
exit12 Member Posts: 30 ■■□□□□□□□□Hi There,
The WWWP service restarts successfully, but when it's stopped, the 'software service' isn;t stopped cleanly, meaning no stop signal is sent.
It still shows as started, but when you highlight the service, it's actually stopped and needs maunal restart.
I even created bacth file to run on failure, but this doesn't run once it fails as I assume a stop signal isn;t being sent.
Anyone any ideas. Seems to trivial but I cannot find a workaround.
Am I able to stop these automatic stop signals to the WWWP service? why would the system do this, as we need this service runninng at all times.
Thank YouDo just once what others say you can't do, and you will never pay attention to their limitations again. -
exit12 Member Posts: 30 ■■□□□□□□□□Also,
If I have a batch file set to run on the failure of a service. Will this batch file run If I manually stop the service? or does some sort of abnormal failure need to occur?
I can't get the batch file to run when I stop the service manually.
ThanksDo just once what others say you can't do, and you will never pay attention to their limitations again. -
sprkymrk Member Posts: 4,884 ■■■□□□□□□□exit12 wrote:Also,
If I have a batch file set to run on the failure of a service. Will this batch file run If I manually stop the service? or does some sort of abnormal failure need to occur?
I can't get the batch file to run when I stop the service manually.
Thanks
Try using the SLEEP command in your batch file combined with cscript and have it run this VBS file:strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colListOfServices = objWMIService.ExecQuery _ ("Select * from Win32_Service Where State = 'Stopped' and StartMode = " _ & "'Auto'") For Each objService in colListOfServices objService.StartService() Next
Save the above as restart_services.vbs, then you can start your batch file on the server to run the it, then sleep for 60 seconds and run it again until you end the batch file manually. So the batch file might look like this:@echo off :script cscript c:\tools\restart_services.vbs sleep 60 goto script
The vb script will check for services that are set to AUTO startup type that are currently stopped and restarts them.All things are possible, only believe. -
exit12 Member Posts: 30 ■■□□□□□□□□Is there a way I can use this with the following batch fot the following services only?
The simple batch file I have that I would like to start upon the any of the following services stopping is.
net start "World Wide Web Publishing"
net start "Simple Mail Transfer Protocol"
net start "FTP Publishing"
net start "IIS Admin"
net start "engine"
When any of these services are stopped, I'm aiming to restart all the above as per the batch file. But it the batch file won't run upon stopping of these services.. I'm not to familiar with VBs.
Can you assist?
ThanksDo just once what others say you can't do, and you will never pay attention to their limitations again. -
sprkymrk Member Posts: 4,884 ■■■□□□□□□□exit12 wrote:Is there a way I can use this with the following batch fot the following services only?
The simple batch file I have that I would like to start upon the any of the following services stopping is.
net start "World Wide Web Publishing"
net start "Simple Mail Transfer Protocol"
net start "FTP Publishing"
net start "IIS Admin"
net start "engine"
When any of these services are stopped, I'm aiming to restart all the above as per the batch file. But it the batch file won't run upon stopping of these services.. I'm not to familiar with VBs.
Can you assist?
Thanks
You can modify the vbscript to only check those services, but I would leave it as is. The way I have recommended will check every minute (until you tell it to stop) for services that are set to Autostart. If they are in the "stopped" state, it will restart them. That would include all your listed services above as long as they are set to autostart.All things are possible, only believe. -
exit12 Member Posts: 30 ■■□□□□□□□□Thanks sprky.
Sorry for sounding 'thick'...but can you let me know exaclty what to do with regards to this? I've never used vbs before, do I need to change anything in the script? and where do I put this file etc...
Sorry!
Thank YoiuDo just once what others say you can't do, and you will never pay attention to their limitations again. -
exit12 Member Posts: 30 ■■□□□□□□□□I figured it out! duh! hehe.
Only issue, I get sleep is not recognised command when running bacth file. The vbs works a treat when I run it manually though.
Any ideas?Do just once what others say you can't do, and you will never pay attention to their limitations again. -
sprkymrk Member Posts: 4,884 ■■■□□□□□□□exit12 wrote:I figured it out! duh! hehe.
Only issue, I get sleep is not recognised command when running bacth file. The vbs works a treat when I run it manually though.
Any ideas?
Sleep is a resourse kit tool. Available here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=enAll things are possible, only believe. -
exit12 Member Posts: 30 ■■□□□□□□□□sprkmrk,
this works perfectly, thank you!!.
Questions..
Will this vbs script running every minute not have a big load on the machine? I wouldn't think so...but..
and finally, the script that runs, it doesn;t restart theh services if they are already started? only if they are stopped and set to'automatic'?
Reason i ask is, that if it restarts a service which is currently started, this will affect out display software.
I assume this will only start services which are stopped, and not restart if they are currently running?
Thank YouDo just once what others say you can't do, and you will never pay attention to their limitations again. -
sprkymrk Member Posts: 4,884 ■■■□□□□□□□exit12 wrote:sprkmrk,
this works perfectly, thank you!!.
Questions..
Will this vbs script running every minute not have a big load on the machine? I wouldn't think so...but..
and finally, the script that runs, it doesn;t restart theh services if they are already started? only if they are stopped and set to'automatic'?
Reason i ask is, that if it restarts a service which is currently started, this will affect out display software.
I assume this will only start services which are stopped, and not restart if they are currently running?
Thank You
No load on the server at all... Just as much as if you clicked the file.
It only restarts the service if two conditions are met:
1. The service is set to Auto for startup AND
2. It is currently stopped.
Your welcome!
Keep in mind though, this should only be a bandaid while you figure out why the services are stopping when they shouldn't. Good luck!All things are possible, only believe. -
exit12 Member Posts: 30 ■■□□□□□□□□Thanks again.
Does anyone know why windows would issue the following stop command?
Event Type: Information
Event Source: Service Control Manager
Event Category: None
Event ID: 7035
Date: 14/09/2007
Time: 01:45:26
User: NT AUTHORITY\SYSTEM
Computer: PC12333
Description:
The World Wide Web Publishing service was successfully sent a stop control.
is this a gp setting maybe? it seemd to be early hours of the morning this happens. The machines is never switched off, and in locked state throughout the night.Do just once what others say you can't do, and you will never pay attention to their limitations again. -
blargoe Member Posts: 4,174 ■■■■■■■■■□What else is happening in the event log during that time?IT guy since 12/00
Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
Working on: RHCE/Ansible
Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands...