2

In my SP2010 environment app server, I have a scheduled task that restarts timer and search service using a batch file.

net stop SPTimerV4 >> %logfilename_sp_fix% 2>&1
if ERRORLEVEL 0 (
    echo %date% %time% - WORKED - Stopped timer service >> %logfilename_sp_fix%
) ELSE (
    echo %date% %time% - FAILED - Stopped timer service >> %logfilename_sp_fix%
    exit
)

timeout %waittimeseconds_sp_fix%

net stop osearch14 >> %logfilename_sp_fix% 2>&1
if ERRORLEVEL 0 (
    echo %date% %time% - WORKED - Stopped search service >> %logfilename_sp_fix%
) ELSE (
    echo %date% %time% - FAILED - Stopped search service >> %logfilename_sp_fix%
    exit
)    

timeout %waittimeseconds_sp_fix%

net start SPTimerV4 >> %logfilename_sp_fix% 2>&1
if ERRORLEVEL 0 (
    echo %date% %time% - WORKED - Started timer service >> %logfilename_sp_fix%
) ELSE (
    echo %date% %time% - FAILED - Started timer service >> %logfilename_sp_fix%
    exit
)

timeout %waittimeseconds_sp_fix%

net start osearch14 >> %logfilename_sp_fix% 2>&1
if ERRORLEVEL 0 (
    echo %date% %time% - WORKED - Started search service >> %logfilename_sp_fix%
) ELSE (
    echo %date% %time% - FAILED - Started search service >> %logfilename_sp_fix%
    exit
)

I wait 15 seconds in between each one. Sometimes the log looks like

Wed 01/27/2016  3:00:01.36 - Restart starting 
The SharePoint 2010 Timer service is stopping.
The SharePoint 2010 Timer service was stopped successfully.

Wed 01/27/2016  3:00:04.09 - WORKED - Stopped timer service 
The SharePoint Server Search 14 service is stopping...
The SharePoint Server Search 14 service was stopped successfully.

Wed 01/27/2016  3:00:26.68 - WORKED - Stopped search service 
The SharePoint 2010 Timer service is starting.
The SharePoint 2010 Timer service was started successfully.

Wed 01/27/2016  3:00:43.36 - WORKED - Started timer service 
The SharePoint Server Search 14 service is starting...
The SharePoint Server Search 14 service was started successfully.

Wed 01/27/2016  3:01:05.45 - WORKED - Started search service 
Wed 01/27/2016  3:01:20.17 - Restart completed 

So it seems it went all fine. But sometimes it looks like

Thu 01/28/2016  3:00:01.86 - Restart starting 
The SharePoint 2010 Timer service is stopping.
The SharePoint 2010 Timer service was stopped successfully.

Thu 01/28/2016  3:00:04.81 - WORKED - Stopped timer service 
The SharePoint Server Search 14 service is stopping.....
The SharePoint Server Search 14 service was stopped successfully.

Thu 01/28/2016  3:00:31.75 - WORKED - Stopped search service 
The SharePoint 2010 Timer service is starting.
The SharePoint 2010 Timer service was started successfully.

Thu 01/28/2016  3:00:48.23 - WORKED - Started timer service 
The requested service has already been started.

More help is available by typing NET HELPMSG 2182.

Thu 01/28/2016  3:01:03.58 - WORKED - Started search service 
Thu 01/28/2016  3:01:18.12 - Restart completed 

And this suggests that, after I start my timer service, and then when I start the search service, it says its already started. As it somehow the timer service is starting the search service on it's own.

Does anyone know why this is happening and if its normal?

Thanks

1
  • Could it be related to the service recovery plan to auto restart?
    – omega
    Commented Jan 28, 2016 at 14:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.