1 Reply Latest reply on Apr 17, 2018 5:08 AM by kabelol26243436

    AEM SSL By Default

    kabelol26243436 Level 1

      Hi all

       

      To enable SSL, I followed instructions on [1], which  worked as expected.

      But after I restart my VM, then attempt to start AEM, AEM start up fails with exception: java.security.NoSuchProviderException: no such provider: AdobeGraniteSecurityProvider

       

      After this exception AEM is now no longer accessible on localhost:4502 or localhost:8443.

      Command used to set SSL config:

      curl -u user:password -F "keystorePassword=password" -F "keystorePasswordConfirm=password" -F "truststorePassword=password" -F "truststorePasswordConfirm=password" -F "privatekeyFile=@<path>/localhostprivate.der" -F "certificateFile=@<path>/localhost.crt" -F "httpsPort=8443" http://host:port/libs/granite/security/post/sslSetup.html

       

       

      Any ideas?

       

       

      [1] SSL By Default

       

       

      15.04.2018 12:30:40.277 *ERROR* [Apache Sling Repository Startup Thread] ERROR: Bundle '40' EventDispatcher: Error during dispatch. (java.lang.RuntimeException: Exception while creating connector)

      java.lang.RuntimeException: Exception while creating connector

              at com.adobe.granite.jetty.ssl.internal.GraniteSslConnectorFactory.createConnector(GraniteSs lConnectorFactory.java:202)

              at org.apache.felix.http.jetty.internal.ConnectorFactoryTracker.addingService(ConnectorFacto ryTracker.java:54)

              at org.apache.felix.http.jetty.internal.ConnectorFactoryTracker.addingService(ConnectorFacto ryTracker.java:29)

              at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)

              at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)

              at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)

              at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)

              at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)

              at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispat cher.java:991)

              at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java :839)

              at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546 )

              at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4558)

              at org.apache.felix.framework.Felix.registerService(Felix.java:3550)

              at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)

              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentMa nager.java:887)

              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentMa nager.java:874)

              at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationMana ger.java:132)

              at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractCompon entManager.java:941)

              at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractCompo nentManager.java:741)

              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(D ependencyManager.java:1012)

              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(D ependencyManager.java:968)

              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.j ava:1215)

              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.j ava:1136)

              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTrack er.java:945)

              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.jav a:881)

              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.ja va:1167)

              at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComp onentActivator.java:127)

              at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispat cher.java:991)

              at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java :839)

              at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546 )

              at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4558)

              at org.apache.felix.framework.Felix.registerService(Felix.java:3550)

              at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)

              at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:355)

              at com.adobe.granite.keystore.internal.ServicesListener.notifyChange(ServicesListener.java:9 6)

              at com.adobe.granite.keystore.internal.ServicesListener$Listener.retainService(ServicesListe ner.java:243)

              at com.adobe.granite.keystore.internal.ServicesListener$Listener.serviceChanged(ServicesList ener.java:267)

              at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispat cher.java:991)

              at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java :839)

              at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546 )

              at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4558)

              at org.apache.felix.framework.Felix.registerService(Felix.java:3550)

              at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)

              at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.registerService(AbstractSlingRep ositoryManager.java:203)

              at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryS ervice(AbstractSlingRepositoryManager.java:492)

              at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingReposito ryManager.java:85)

              at org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlingRepositoryMan ager.java:455)

      Caused by: java.lang.SecurityException: java.security.NoSuchProviderException: no such provider: AdobeGraniteSecurityProvider

              at com.adobe.granite.keystore.internal.KeyStoreServiceImpl.internalGetKeyStore(KeyStoreServi ceImpl.java:434)

              at com.adobe.granite.keystore.internal.KeyStoreServiceImpl.getKeyStore(KeyStoreServiceImpl.j ava:124)

              at com.adobe.granite.keystore.internal.KeyStoreServiceImpl.getKeyStore(KeyStoreServiceImpl.j ava:118)

              at com.adobe.granite.jetty.ssl.internal.GraniteSslConnectorFactory.createConnector(GraniteSs lConnectorFactory.java:186)

              ... 46 more

      Caused by: java.security.NoSuchProviderException: no such provider: AdobeGraniteSecurityProvider

              at sun.security.jca.GetInstance.getService(GetInstance.java:83)

              at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)

              at java.security.Security.getImpl(Security.java:698)

              at java.security.KeyStore.getInstance(KeyStore.java:896)

              at com.adobe.granite.keystore.internal.KeyStoreServiceImpl.internalGetKeyStore(KeyStoreServi ceImpl.java:428)

              ... 49 more

        • 1. Re: AEM SSL By Default
          kabelol26243436 Level 1

          The above exception does not occur when I gracefully shutdown AEM. It only happens when AEM is stopped abruptly (VM shuts down, java process is killed etc).

          Anyone know what happens during AEM service stop that avoids the above issue?

           

          Resolution, after abrupt stop: start aem service > stop aem service > start aem service (on this start exception is gone).

           

          Don't know of a better fix.