Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8027407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:48:07+00:00 2026-06-04T23:48:07+00:00

My custom security manager currently blocks graceful closing due to SIGTERMs. The follow message

  • 0

My custom security manager currently blocks graceful closing due to SIGTERMs. The follow message is displayed:

Java HotSpot(TM) 64-Bit Server VM warning: Exception java.lang.SecurityException occurred dispatching signal SIGTERM to handler- the VM may need to be forcibly terminated

What should I do to enable shutting down due to SIGTERMS but nothing more?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T23:48:10+00:00Added an answer on June 4, 2026 at 11:48 pm

    Your implementation has probably disabled the full debugging information from -Djava.security.debug=all if you omit to call super.checkAccess. If you write first in your SecurityManager implementation

      public void checkAccess(ThreadGroup g) {
          System.out.println("Access for " + g);
          super.checkAccess(g);
      }
      public void checkAccess(Thread t) {
          System.out.println("Access for " + t);
          super.checkAccess(t);
      }
    

    and run with -Djava.security.debug=all, you get information about checkAccess calls to allow and permissions to add to your policy file. I sum up:

    Access for java.lang.ThreadGroup[name=system,maxpri=10]
    Permission (java.lang.RuntimePermission modifyThreadGroup)
    [...]
    Access for Thread[SIGTERM handler,9,system]
    Permission (java.lang.RuntimePermission modifyThread)
    [...]
     java.security.Permissions@133c5982 (
     (java.lang.RuntimePermission exitVM)
     (java.io.FilePermission /path/to/current/working/directory/- read)
    )
    

    As a result, you enable SIGTERM signal handling the stricter way with the following code in your SecurityManager:

      public void checkAccess(ThreadGroup g) {
          System.out.println("Access for " + g);
          if ("system".equals(g.getName()))  {
             // will checkPermission java.lang.RuntimePermission "modifyThreadGroup"
             super.checkAccess(g);
          } else {
             throw new SecurityException("Access denied to " + g);
          }
      }
    
      public void checkAccess(Thread t) {
          System.out.println("Access for " + t);
          if ("SIGTERM handler".equals(t.getName())) {
             // will checkPermission java.lang.RuntimePermission "modifyThread"
             super.checkAccess(t);
          } else {
             throw new SecurityException("Access denied to " + t);
          }
      }
    

    And also these permissions granting in your java.security.policy file:

    grant {
      permission java.lang.RuntimePermission "modifyThreadGroup";
      permission java.lang.RuntimePermission "modifyThread";
      permission java.lang.RuntimePermission "exitVM";
    };
    

    The full information is available here but it is really not obvious to do it right, the try-and-fix method is still the fastest way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My WCF Service uses a custom credentials validator for custom Message-based security, because I
I need to create a custom security manager for a hosted WebBrowser control in
I'm using IBM's Tivoli Security Policy Manager with a custom PIP (implementing com.ibm.tscc.rtss.authz.api.IExternalFinder ).
I'm trying to disable/enable controls based on user permission using a custom security framework
I'm using spring MVC, and I have a custom authentication/security system that I had
I am new to Spring Security. I have been working on creating a custom
Custom string format to xml help needed. Java and C#. [Node(X)][CHILD0(Y)][OBJECT1(A)][Key1(1)][Key2(2)] [Node(X)][CHILD0(Y)][OBJECT1(B)][Key1(1)][Key2(2)][Key3(3)] [Node(X)][CHILD0(Y)][OBJECT1(C)][Key1(4)] [Node(X)][CHILD0(Y)][OBJECT2(A)][Key1(1)][Key2(2)][Key3(3)]
I'm trying to write a custom method security interceptor. However, it isn't using the
I'm using Spring Security and I would like to know which users are currently
I have written and deployed a custom security extension for SSRS 2008r2 and it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.