Expand my Community achievements bar.

SOLVED

AEM SSL By Default

Avatar

Level 3

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(GraniteSslConnectorFactory.java:202)

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

        at org.apache.felix.http.jetty.internal.ConnectorFactoryTracker.addingService(ConnectorFactoryTracker.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(EventDispatcher.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(AbstractComponentManager.java:887)

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

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

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

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

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

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

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

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

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

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

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

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

        at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.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:96)

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

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

        at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.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(AbstractSlingRepositoryManager.java:203)

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

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

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

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

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

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

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

        at com.adobe.granite.jetty.ssl.internal.GraniteSslConnectorFactory.createConnector(GraniteSslConnectorFactory.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(KeyStoreServiceImpl.java:428)

        ... 49 more

1 Accepted Solution

Avatar

Correct answer by
Level 3

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 3

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.