Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-3659

shutdown of karaf throws NullPointerException if jmx ssl keystore is not configured properly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.0.M2
    • Fix Version/s: 2.4.2, 3.0.4, 4.0.0.M3
    • Component/s: karaf
    • Labels:
      None
    • Environment:

      All

      Description

      If the "keystore" is not configured propertly inside the "etc/org.apache.karaf.management.cfg" file then while doing a "shutdown" (either usign "shutdown" command or using ctrl+d) the karaf throws the following error.

      2015-04-12 11:25:42,242 | WARN  | FelixStartLevel  | core                             | 15 - org.apache.aries.jmx.core - 1.1.3 | Task rejected for JMX Notification dispatch of event [org.osgi.framework.ServiceEvent[source=[javax.management.MBeanServer]]] - Dispatcher may have been shutdown
      2015-04-12 11:25:42,243 | WARN  | FelixStartLevel  | Activator                        | 36 - org.apache.karaf.management.server - 4.0.0.SNAPSHOT | Error destroying ConnectorServerFactory
      java.lang.NullPointerException
      	at org.apache.karaf.management.ConnectorServerFactory.destroy(ConnectorServerFactory.java:276)[36:org.apache.karaf.management.server:4.0.0.SNAPSHOT]
      	at org.apache.karaf.management.internal.Activator.doStop(Activator.java:178)[36:org.apache.karaf.management.server:4.0.0.SNAPSHOT]
      	at org.apache.karaf.util.tracker.BaseActivator.stop(BaseActivator.java:90)[36:org.apache.karaf.management.server:4.0.0.SNAPSHOT]
      	at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:719)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:]
      	at org.apache.felix.framework.Felix.stopBundle(Felix.java:2608)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:]
      	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1387)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:]
      	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:]
      	at java.lang.Thread.run(Thread.java:745)[:1.7.0_71]
      

      ===================
      Steps to Reproduce
      ===================
      Step-1) Edit the "etc/org.apache.karaf.management.cfg" file and add the following entry in it. Notice that the "" does not exist as we hav not created any such keystore. And then start the karaf.

      #####################   ADDING THE FOLLOWING NON_EXISTING SSL KEYSTORE INTENTIONALLY #############
      secured = true
      secureProtocol = SSL
      keyAlias = jbossalias
      keyStore = sample_keystore
      trustStore = sample_keystore
      

      Step-2) Try stopping the karaf either usign "shutdown" command or using ctrl+d :

      Step-3) Check the karaf.log to find the "java.lang.NullPointerException"

        Attachments

          Activity

            People

            • Assignee:
              jbonofre Jean-Baptiste Onofré
              Reporter:
              JaySenSharma JaySenSharma
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: