Notifications

24 views

Symptoms

MID Server Windows Service stops after 30 seconds or more instead of within a few seconds

Wrapper.log shows the following:

2019/06/13 10:42:02 | Stopping the ServiceNow MID Server_ACME MID Server 1 service...
2019/06/13 10:42:07 | Waiting to stop...
2019/06/13 10:42:12 | Waiting to stop...
2019/06/13 10:42:18 | Waiting to stop...
2019/06/13 10:42:23 | Waiting to stop...
2019/06/13 10:42:28 | Waiting to stop...
2019/06/13 10:42:33 | Waiting to stop...
2019/06/13 10:42:38 | Waiting to stop...
2019/06/13 10:42:43 | Waiting to stop...
2019/06/13 10:42:48 | Waiting to stop...
2019/06/13 10:42:53 | Waiting to stop...
2019/06/13 10:42:58 | Waiting to stop...
2019/06/13 10:43:03 | Waiting to stop...
2019/06/13 10:43:08 | Waiting to stop...
2019/06/13 10:43:13 | Waiting to stop...
2019/06/13 10:43:18 | Waiting to stop...
2019/06/13 10:43:23 | Waiting to stop...
2019/06/13 10:43:28 | Waiting to stop...
2019/06/13 10:43:33 | Waiting to stop...
2019/06/13 10:43:38 | Waiting to stop...
2019/06/13 10:43:43 | Waiting to stop...
2019/06/13 10:43:48 | Waiting to stop...
2019/06/13 10:43:53 | Waiting to stop...
2019/06/13 10:43:58 | Waiting to stop...
2019/06/13 10:44:03 | Waiting to stop...
2019/06/13 10:44:08 | Waiting to stop...
2019/06/13 10:44:13 | Waiting to stop...
2019/06/13 10:44:14 | Shutdown failed: Timed out waiting for signal from JVM.
2019/06/13 10:44:15 | JVM did not exit on request, termination requested.
2019/06/13 10:44:15 | JVM exited after being requested to terminate.
2019/06/13 10:44:15 | <-- Wrapper Stopped

Release

All

Cause

This is normal behavior for Java and the Java Service Wrapper on Windows

Resolution

You may try adding the following in your wrapper-override.conf file:

wrapper.shutdown.timeout

The default value is 30 seconds and you might want to change this value based on the behavior you see on your Windows server.

  1. Fine the wrapper-override.conf file. You'll find the file in a typical install location like C:\ServiceNow\MID Server1\agent\conf
  2. Add the line above
  3. Restart the MID Server Windows Service

Warning: The wrapper.conf file should be left alone. Only make changes to wrapper-override.conf

 


A usual startup of the MID Server Windows Service would show this in the wrapper.log

 
2019/06/26 07:58:55 | --> Wrapper Started as Service
2019/06/26 07:58:55 | Java Service Wrapper Standard Edition 32-bit 3.5.34
2019/06/26 07:58:55 |   Copyright (C) 1999-2017 Tanuki Software, Ltd. All Rights Reserved.
2019/06/26 07:58:55 |     http://wrapper.tanukisoftware.com
2019/06/26 07:58:55 |   Licensed to ServiceNow, Inc. for MID
2019/06/26 07:58:55 | 
2019/06/26 07:58:56 | Launching a JVM...
2019/06/26 07:58:58 | WrapperManager: Initializing...
2019/06/26 07:59:02 | Logger for 'glide' has not been configured by the container, configuring now:
2019/06/26 07:59:02 | Configuring log handler: java.util.logging.FileHandler
2019/06/26 07:59:02 | Setting useParentHandlers=false for Logger 'glide'
2019/06/26 07:59:02 | Overriding formatter to: com.glide.util.DefaultLogFormatter (for handler: java.util.logging.FileHandler)
 
A usual stop of the MID Server Windows Service would show this single line in the wrapper.log
 
2019/06/26 08:01:18 | <-- Wrapper Stopped

 

 

Additional Information

You can read about the wrapper.shutdown.timeout property here:

https://wrapper.tanukisoftware.com/doc/english/prop-shutdown-timeout.html.

You can also read about the "wrapper.jvm_exit.timeout" here:

https://wrapper.tanukisoftware.com/doc/english/prop-jvm-exit-timeout.html

Article Information

Last Updated:2019-07-01 05:51:12
Published:2019-06-26