How to shutdown Domino server gracefully when OS is being restarted?
When running Domino server on Windows 2008/2012, server was shutdown quickly but not all processes can be shutdown within 5 seconds.
Domino 8.5.3 FP6 running on Windows 2012
Started as Windows service:
Name: Lotus Domino Server (CDominodata)
Executable: "C:\Domino\nservice.exe" "=C:\Domino\notes.ini" "-jc" "-c"
Not all processes had been shutdown, as seen in console.log:
Quiting06/16/2016 03:46:41 PM Starting Server shutdown
[0D94:0002-0C28] 06/16/2016 03:46:41 PM Index update process shutdown
[0E94:0002-0D1C] 06/16/2016 03:46:41 PM Database Replicator shutdown
[0DD4:0002-0E1C] 06/16/2016 03:46:41 PM LDAP Server: All tasks have completed
[0DD4:0002-0E1C] 06/16/2016 03:46:41 PM LDAP Server: Shutdown
[02AC:0002-0D08] 06/16/2016 03:46:42 PM Administration Process shutdown
[0CEC:0002-0F94] 06/16/2016 03:46:42 PM Event Monitor shutdown
[0BDC:0002-0F2C] 06/16/2016 03:46:42 PM Domino Off-Line Services HTTP extension unloaded.
[0BDC:0002-0F2C] 06/16/2016 03:46:42 PM XSP Command Manager terminated
[0BDC:0002-0F2C] 06/16/2016 03:46:44 PM HTTP Server: Shutdown
Domino server should print “Server shutdown complete” if being shutdown gracefully.
[0EEC:0002-0F14] 2016/06/16 16:28:12 SMTP Server: All tasks have completed
[0EEC:0002-0F14] 2016/06/16 16:28:12 SMTP Server: Shutdown
[0B58:0002-0AAC] 2016/06/16 16:28:12 Server shutdown complete
The key is to stop Domino service before shutdown Windows OS.
To do this, follow steps below:
1. Create a batch file like ShutdownDomino.bat and add one line
net stop "Lotus Domino Server (CDominodata)"
2. Save the file in C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown
3. Run gpedit.msc
Expand Computer Configuration -> Windows Settings -> Scripts (Startup/Shutdown)
Click Add button
For Shutdown select your batch file you created earlier.
4. Now Domino will be shutdown gracefully when OS get restarted for
a variety of reasons including but not limited to UPS shutdown event,
Windows patching and Windows server engineers with no knowledge
or understanding of Domino.