cancel
Showing results for 
Search instead for 
Did you mean: 

ReplicatingContentStore doesn't work [SOLVED]

smiconrad
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to setup an environment in which Alfresco 1.4 community is installed on two servers (primary and secondary). The primary is to service all requests and if it dies we should failover to the secondary. The secondary is a hot standby, always running and should be able to handle requests at any time.

To do this I configured primary Alfresco and secondary in the same way as far as content store replication is concerned.

Primary Alfresco:
- Has its own content store
- The following is my configurations:
custom-services-context.xml

<bean id="contentService" class="org.alfresco.repo.content.RoutingContentService" init-method="init">
      <property name="transactionService">
          <ref bean="transactionComponent" />
      </property>
      <property name="dictionaryService">
          <ref bean="dictionaryService" />
      </property>
      <property name="nodeService">
          <ref bean="nodeService" />
      </property>
      <property name="transformerRegistry">
          <ref bean="contentTransformerRegistry" />
      </property>
      <property name="store">
          <ref bean="replicatingContentStore" />
      </property>
      <property name="policyComponent">
          <ref bean="policyComponent" />
      </property>
   </bean>
replicating-content-services-context.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
   <!–
    This file is not included in the application context by default.
    If you include this file, please ensure that you review the sample
    beans contained here.
    –>
   
   <bean id="backupContentStore"
         class="org.alfresco.repo.content.filestore.FileContentStore">
      <constructor-arg>
         <value>alf_bkup_store/backups/alfresco</value>
      </constructor-arg>
   </bean>

   <bean id="replicatingContentStore"
         class="org.alfresco.repo.content.replication.ReplicatingContentStore" >
      <!– the preferred store for reads and writes –>
      <property name="primaryStore">
         <ref bean="fileContentStore" />
      </property>
      <!– example of possible secondary store configuration –>
      <property name="secondaryStores">
         <list>
            <ref bean="backupContentStore" />
         </list>
      </property>
      <!– enable content missing from the primary store to be pulled in from the secondary stores –>
      <property name="inbound">
         <value>true</value>
      </property>
      <!– enable replication from the primary to the secondary stores –>
      <property name="outbound">
         <value>true</value>
      </property>
      <!– this is required if outbound replication is active, otherwise not –>
      <property name="transactionService">
         <ref bean="transactionComponent" />
      </property>
      <!– set this to force outbound replication to be asynchronous –>
      <property name="outboundThreadPoolExecutor">
         <ref bean="threadPoolExecutor" />
      </property>
   </bean>

</beans>
Secondary Alfresco configuration is the same as the Primary.

If I run both primary and secondary servers with this config, no replication happens. i.e. If I create content using the primary web-client I don't see it in the secondary server's web-client.

I also noticed that there was nothing showing up in my backupContentStore folder. So I copied the contents of the primary content store into the backup by hand (starting from the folder called 2006).

Doing that got me one step further, I was able to see the nodes that I create on one server show up on the other. But if I click on a node using the web-client of the server that is NOT the one that created that node, I get this error:
The node's content is missing: 
   node: workspace://SpacesStore/d34a41ce-690a-11db-bc00-f55e839525e8
   reader: ContentAccessor[ contentUrl=store://2006/10/31/13/9/02780c00-690b-11db-bc00-f55e839525e8.bin, mimetype=text/plain, size=0, encoding=UTF-8] 
Please contact your system administrator.

I have no idea what's going on here. Shouldn't the outbound replication make a copy of the content from the creating store to the backup?

Help?

conrad
1 REPLY 1

smiconrad
Champ in-the-making
Champ in-the-making
I found the problem. I simply wasn't declaring the replicatingContentStore correctly in the spring bean.

Sorry and thanks for the help.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.