Expand my Community achievements bar.

Problem configuring FileDataStore with AEM 6.1

Avatar

Level 2

Hi,

I am facing problem configuring AEM 6.1 to use a SegmentNodeStore and use FileDataStore as Data store. I followed instructions at this page to create a new instance with SegmentNodeStore and a separate FileDataStore but i am seeing 2 unexpected behaviors

Here are the steps that i performed

1. Copied crx quickstart jar into C:\AEM\Trial\Author.
2. Created crx-quickstart folder parallel to crx quickstart jar
3. Created install folder under crx-quickstart folder.

4. Created following config files in crx-quickstart\install folder(also attached with this post, renamed to txt)

org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config
    #The minimum size of an object that should be stored in this data store.
    minRecordLength=2048
    repository.home=crx-quickstart\repository
    #cache for storing small binaries in-memory
    cacheSizeInMB=128

 

org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService
    repository.home=crx-quickstart\repository
    customBlobStore=True

5. Started crx-quickstart jar file.
6. Uploaded a 4MB file under Assets.

Expected result

1. segmentstore and datastore folders should get created under crx-quickstart\repository folder. 
2. some content to be available under crx-quickstart\repository\datastore folder

Actual result

1. I get a warning in startup logs

12.04.2016 13:20:57.277 *WARN* [FelixStartLevel] org.apache.sling.installer.core.impl.OsgiInstallerImpl Cannot create InternalResource (resource will be ignored):InstallableResource, priority=100, id=C:\AEM\Trial\Author\crx-quickstart\install\org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config

java.io.IOException: Unable to read dictionary from input stream: C:\AEM\Trial\Author\crx-quickstart\install\org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config
    at org.apache.sling.installer.core.impl.InternalResource.create(InternalResource.java:100)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.createResources(OsgiInstallerImpl.java:349)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.registerResources(OsgiInstallerImpl.java:440)
    at org.apache.sling.installer.provider.file.impl.Installer.initialSet(Installer.java:90)
    at org.apache.sling.installer.provider.file.impl.FileMonitor.<init>(FileMonitor.java:57)
    at org.apache.sling.installer.provider.file.impl.FileInstaller.start(FileInstaller.java:81)
    at org.apache.sling.installer.provider.file.impl.ServicesListener.startScanner(ServicesListener.java:114)
    at org.apache.sling.installer.provider.file.impl.ServicesListener.notifyChange(ServicesListener.java:93)
    at org.apache.sling.installer.provider.file.impl.ServicesListener$Listener.retainService(ServicesListener.java:174)
    at org.apache.sling.installer.provider.file.impl.ServicesListener$Listener.serviceChanged(ServicesListener.java:194)
    at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:987)
    at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
    at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
    at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4547)
    at org.apache.felix.framework.Felix.registerService(Felix.java:3521)
    at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
    at org.apache.sling.settings.impl.ServicesListener.activate(ServicesListener.java:86)
    at org.apache.sling.settings.impl.ServicesListener.notifyChange(ServicesListener.java:75)
    at org.apache.sling.settings.impl.ServicesListener$Listener.serviceChanged(ServicesListener.java:230)
    at org.apache.sling.settings.impl.ServicesListener$AbstractListener.retainService(ServicesListener.java:184)
    at org.apache.sling.settings.impl.ServicesListener$AbstractListener.start(ServicesListener.java:156)
    at org.apache.sling.settings.impl.ServicesListener.<init>(ServicesListener.java:63)
    at org.apache.sling.settings.impl.Activator.start(Activator.java:38)
    at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
    at org.apache.felix.framework.Felix.activateBundle(Felix.java:2223)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2141)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1368)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Unexpected token 78; expected: 61 (line=3, pos=23)
    at org.apache.felix.cm.file.ConfigurationHandler.readFailure(ConfigurationHandler.java:650)
    at org.apache.felix.cm.file.ConfigurationHandler.readInternal(ConfigurationHandler.java:274)
    at org.apache.felix.cm.file.ConfigurationHandler.read(ConfigurationHandler.java:237)
    at org.apache.sling.installer.core.impl.InternalResource.readDictionary(InternalResource.java:256)
    at org.apache.sling.installer.core.impl.InternalResource.create(InternalResource.java:98)
    ... 28 common frames omitted
12.04.2016 13:20:57.279 *WARN* [FelixStartLevel] org.apache.sling.installer.core.impl.OsgiInstallerImpl Cannot create InternalResource (resource will be ignored):InstallableResource, priority=100, id=C:\AEM\Trial\Author\crx-quickstart\install\org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.config
java.io.IOException: Unable to read dictionary from input stream: C:\AEM\Trial\Author\crx-quickstart\install\org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.config
    at org.apache.sling.installer.core.impl.InternalResource.create(InternalResource.java:100)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.createResources(OsgiInstallerImpl.java:349)
    at org.apache.sling.installer.core.impl.OsgiInstallerImpl.registerResources(OsgiInstallerImpl.java:440)
    at org.apache.sling.installer.provider.file.impl.Installer.initialSet(Installer.java:90)
    at org.apache.sling.installer.provider.file.impl.FileMonitor.<init>(FileMonitor.java:57)
    at org.apache.sling.installer.provider.file.impl.FileInstaller.start(FileInstaller.java:81)
    at org.apache.sling.installer.provider.file.impl.ServicesListener.startScanner(ServicesListener.java:114)
    at org.apache.sling.installer.provider.file.impl.ServicesListener.notifyChange(ServicesListener.java:93)
    at org.apache.sling.installer.provider.file.impl.ServicesListener$Listener.retainService(ServicesListener.java:174)
    at org.apache.sling.installer.provider.file.impl.ServicesListener$Listener.serviceChanged(ServicesListener.java:194)
    at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:987)
    at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
    at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
    at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4547)
    at org.apache.felix.framework.Felix.registerService(Felix.java:3521)
    at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
    at org.apache.sling.settings.impl.ServicesListener.activate(ServicesListener.java:86)
    at org.apache.sling.settings.impl.ServicesListener.notifyChange(ServicesListener.java:75)
    at org.apache.sling.settings.impl.ServicesListener$Listener.serviceChanged(ServicesListener.java:230)
    at org.apache.sling.settings.impl.ServicesListener$AbstractListener.retainService(ServicesListener.java:184)
    at org.apache.sling.settings.impl.ServicesListener$AbstractListener.start(ServicesListener.java:156)
    at org.apache.sling.settings.impl.ServicesListener.<init>(ServicesListener.java:63)
    at org.apache.sling.settings.impl.Activator.start(Activator.java:38)
    at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
    at org.apache.felix.framework.Felix.activateBundle(Felix.java:2223)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2141)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1368)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Unexpected token 78; expected: 61 (line=2, pos=4)
    at org.apache.felix.cm.file.ConfigurationHandler.readFailure(ConfigurationHandler.java:650)
    at org.apache.felix.cm.file.ConfigurationHandler.readInternal(ConfigurationHandler.java:274)
    at org.apache.felix.cm.file.ConfigurationHandler.read(ConfigurationHandler.java:237)
    at org.apache.sling.installer.core.impl.InternalResource.readDictionary(InternalResource.java:256)
    at org.apache.sling.installer.core.impl.InternalResource.create(InternalResource.java:98)
    ... 28 common frames omitted

2. A segmentstore folder is created under crx-quickstart\repository however there is no datastore folder under crx-quickstart\repository

Please let me know what am i doing wrong here.

Thanks

6 Replies

Avatar

Level 2

Hi Guys,

Trying my luck again. Has anyone configured filedatastore as an external data store for binaries. If yes please share configurations for Segment and FileDataStore PIDs.

Thanks

Avatar

Employee

If you look at the documentation[0] the section you have copied is for changing the repository home, but if you view the section titled, "File Data Store" you will see it talks about the options in the file and the one you should be using is "path".

I use [1], place the files in crx-quickstart/install

Sample of org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.config

org.apache.sling.installer.configuration.persist=false
customBlobStore=B"true"
pauseCompaction=B"true"

 

org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config

org.apache.sling.installer.configuration.persist=false
path="<your custom path>/datastore"
minRecordLength=I"4096"

 

Once you have set up your file datastore, you can check the settings in "system/console/osgi-installer" or "system/console/status-configurations"

Regards,

Opkar

[0]https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/data-store-config.html

[1] https://docs.adobe.com/docs/en/aem/6-1/deploy/recommended-deploys/tarmk-cold-standby.html

Avatar

Level 1

If there is a syntax error in the properties config file (.config), all you get is this:

org.apache.sling.installer.core.impl.OsgiInstallerImpl Cannot create internal resource (resource will be ignored):InstallableResource, priority=100

 

Make sure that your syntax is correct in the config files you create under the install directory ( from what I see , you haven't out quotes for the values to the variables)

Avatar

Community Advisor

I also faced the similar issue. Using correct syntax for config file resolved the issue.

Refer this link for correct syntax : Apache Sling :: The Apache Sling Provisioning Model and Apache SlingStart

I checked the config files you have attached, both have syntax issue. For example string fields should be like :

repository.home="crx-quickstart\repository" instead of repository.home=crx-quickstart\repository.

Avatar

Community Advisor

I also faced the similar issue. Using correct syntax for config file resolved the issue.

Refer this link for correct syntax : Apache Sling :: The Apache Sling Provisioning Model and Apache SlingStart

I checked the config files you have attached, both have syntax issue. For example string fields should be like :

repository.home="crx-quickstart\repository" instead of repository.home=crx-quickstart\repository.