Unable to register shutdown hook because JVM is shutting down

Unable to register shutdown hook because JVM is shutting down

If you are using log4j2 in your project and has been added this one in your classpath and getting below exception while stopping the applicaiton:

Unable to register shutdown hook because JVM is shutting down

  • Solution: This happens if you are using ShutDownHook as example below but in your application ShutDownHook machanism could be different don’t take below example seriously it’s just an example:

How to fix it:

  • Go to your log4j2.xml file and specify shutdownHook=”disable” as below:

For more information please visit log4j documentation here

One thought on “Unable to register shutdown hook because JVM is shutting down

  1. Hello ,

    Where do I find log4j2.xml, I am getting this as error as above : “2016-06-15 17:14:18,216 FATAL Unable to register shutdown hook because JVM is shutting down.” .

    While running yahoo benchmark for storm.

Leave a Reply

Your email address will not be published. Required fields are marked *