Failure on installing S3 connector for AEM 6.3


Keywords:amazon  s3 


Question: 

I am trying to connect S3 data store following this instructions. I am getting exact error described in this SOF question. Steps:

  1. Created a vanilla AEM 6.3 instance and able to upload images to DAM
  2. Downloaded S3 connector and copied all .jar files into crx-quickstart/install folder
  3. Copied org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.config file and set customBlobStore=B"true"
  4. Copied org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore.config file and looks like this:

accessKey="scribed" connectionTimeout="120000" maxConnections="40" maxErrorRetry="10" s3Bucket="myproj-s3bucket" s3Region="ap-southeast-1" s3EndPoint="https://scribed.signin.aws.amazon.com/console" secretKey="scribed" socketTimeout="120000" writeThreads="30" cacheSize="16GB" cachePurgeTrigFactory="1"

(have scribed the key and secret)

  1. When I restart my AEM none of consoles start. It throws

HTTP ERROR: 503 Problem accessing /. Reason: AuthenticationSupport service missing. Cannot authenticate request.

This is the exception trace:


15.05.2017 07:42:56.156 *INFO* [FelixStartLevel] org.apache.jackrabbit.oak.blob.cloud.s3.Utils Configuring Amazon Client from property file.
15.05.2017 07:42:59.401 *INFO* [FelixStartLevel] org.apache.jackrabbit.oak.blob.cloud.s3.Utils S3 service endpoint [https://170564245278.signin.aws.amazon.com/console] 
15.05.2017 07:43:04.292 *ERROR* [FelixStartLevel] org.apache.jackrabbit.oak-blob-cloud [org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore(2946)] The activate method has thrown an exception (java.lang.NullPointerException: null value in entry: component.id=null) java.lang.NullPointerException: null value in entry: component.id=null     at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:33)   at com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:135)    at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:206)    at com.google.common.collect.Maps.fromProperties(Maps.java:1187)    at org.apache.jackrabbit.oak.blob.cloud.s3.S3Backend.init(S3Backend.java:166)   at org.apache.jackrabbit.oak.plugins.blob.AbstractSharedCachingDataStore.init(AbstractSharedCachingDataStore.java:163)  at org.apache.jackrabbit.oak.plugins.blob.datastore.AbstractDataStoreService.activate(AbstractDataStoreService.java:87)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    at java.lang.reflect.Method.invoke(Method.java:498)     at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:224)    at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)   at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:617)     at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:501)  at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:302)  at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:294)  at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:298)     at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:109)    at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906)     at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879)     at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:749)   at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:675)     at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:430)     at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:657)     at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:341)  at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:390)   at org.apache.felix.scr.impl.Activator.access$200(Activator.java:54)    at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:265)   at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)  at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)   at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)   at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)   at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)    at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)    at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)   at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)   at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517)    at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4542)    at org.apache.felix.framework.Felix.startBundle(Felix.java:2173)    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1372)    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)     at java.lang.Thread.run(Thread.java:745)
15.05.2017 07:43:04.308 *INFO* [FelixStartLevel] com.day.cq.cq-compat-codeupgrade BundleEvent RESOLVED
15.05.2017 07:43:04.310 *INFO* [FelixStartLevel] com.day.cq.cq-compat-codeupgrade BundleEvent STARTING
15.05.2017 07:43:04.310 *INFO* [FelixStartLevel] com.day.cq.cq-compat-codeupgrade BundleEvent STARTED

Am I missing any steps or config? Please help out


1 Answer: 

I got the answer to my question with help of my lead comparing the working config against failed. This parameter was incorrect:

s3EndPoint="https://scribed.signin.aws.amazon.com/console"

This can be blank as the connector will rebuild using s3Region. or it is . Since the error logs were throwing irrelevant errors, I was misguided. Removing this one parameter made difference.

Second observation was, while starting AEM, initially it does throw the error. But eventually it starts up. Need to wait for 3-4 mins. On logs I see connection refused during startup. But on subsequent request once all config is loaded, it is able to connect and upload successfully.