JBoss ON server running on Windows takes more then 3 minutes to shutdown due to a failure in the AWT-Windows thread

Solution Verified - Updated -

Issue

  • Server does not stop completely with Windows service
  • When stopping the server the process hangs at the end of the shutdown process.
  • Shutdown hangs with the following error message in the server log:

    INFO  [org.jboss.system.server.Server] JBoss SHUTDOWN: Undeploying all packages
    INFO  [org.jboss.web.tomcat.service.TomcatDeployer] undeploy, ctxPath=/rest, warUrl=.../deploy/rhq.ear/rhq-rest.war/
    INFO  [org.rhq.helpers.rtfilter.filter.RtFilter] -- Filter destroy: 0 requests processed (hashCode=25454583).
    INFO  [org.jboss.web.tomcat.service.TomcatDeployer] undeploy, ctxPath=/, warUrl=.../deploy/rhq.ear/rhq-portal.war/
    INFO  [org.rhq.helpers.rtfilter.filter.RtFilter] -- Filter destroy: 0 requests processed (hashCode=5126077).
    ERROR [STDERR] Exception in thread "AWT-Windows" 
    ERROR [STDERR] java.lang.IllegalStateException: Shutdown in progress
    ERROR [STDERR]  at java.lang.ApplicationShutdownHooks.add(Unknown Source)
    ERROR [STDERR]  at java.lang.Runtime.addShutdownHook(Unknown Source)
    ERROR [STDERR]  at sun.awt.windows.WToolkit$2.run(Unknown Source)
    ERROR [STDERR]  at java.security.AccessController.doPrivileged(Native Method)
    ERROR [STDERR]  at sun.awt.windows.WToolkit.run(Unknown Source)
    ERROR [STDERR]  at java.lang.Thread.run(Unknown Source)
    
  • Server wrapper logs the following failure in rhq-server-wrapper.log:

    ERROR  | wrapper  | 2012/12/20 03:45:57 | Shutdown failed: Timed out waiting for the JVM to terminate.
    ERROR  | wrapper  | 2012/12/20 03:45:57 | JVM did not exit on request, terminated
    

Environment

  • JBoss Operations Network (ON) 3.1.1
  • Microsoft Windows Server 2008 6.0, R2 6.1
  • Oracle Java Runtime Environment (JRE) 1.6.0_37, 1.6.0_38
  • Issuing JBoss ON server shutdown command
    • For example: rhq-server stop
    • For example: CTRL+C when running in console mode

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content