cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with clustered alfresco 1.4

ps
Champ in-the-making
Champ in-the-making
Hi, I have been trying to get a clustered environment setup with two servers connecting to a single oracle database on Solaris following the 1.4 clustering Wiki, but have been having some problems. We have spent a considerable amount of time trying to get 1.3 work for us, but didnt fully succeed with that. For etting alfresco 1.4, I am not sure if I am missing something in the configuration or setup.

Also see: http://forums.alfresco.com/viewtopic.php?p=18955#18955

I have my config listed below.

custom-cache-strategies.properties:
#
# The cache strategy
#
cache.strategy=transactional


custom-hibernate-dialect.properties:
#
# Hibernate configuration
#
hibernate.jdbc.use_streams_for_binary=true
#hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
hibernate.show_sql=false
hibernate.hbm2ddl.auto=update
hibernate.cache.use_query_cache=true
hibernate.max_fetch_depth=10
hibernate.cache.provider_class=org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean
hibernate.cache.use_second_level_cache=true
hibernate.default_batch_fetch_size=1
hibernate.jdbc.batch_size=32
hibernate.connection.release_mode=auto
hibernate.connection.isolation=4

#
# Oracle dialect
#
hibernate.dialect=org.hibernate.dialect.Oracle9Dialect

#
# Hibernate configuration
#
#hibernate.cache.provider_class=org.hibernate.cache.TreeCacheProvider

custom-data-location.properties on node1:
#
# Sample custom content and index data location
#

dir.root=/dev/alfresco/node1


custom-data-location.properties on node2:
#
# Sample custom content and index data location
#

dir.root=/dev/alfresco/node2


ehcache-custom.xml:
<ehcache>
    <diskStore
      path="java.io.tmpdir"/>

<!– ================================================================= –>

    <cacheManagerPeerProviderFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
            properties="peerDiscovery=automatic,
                        multicastGroupAddress=230.0.0.1,
                        multicastGroupPort=4446"/>

<!–
    <cacheManagerPeerProviderFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
            properties="peerDiscovery=manual,
                        rmiUrls=//server1:40000/sampleCache1|//server2:40000/sampleCache1|
                                //server1:40000/sampleCache2|//server2:40000/sampleCache2"/>
–>

<!– ================================================================= –>
<!–
    <cacheManagerPeerListenerFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/>

    <cacheManagerPeerListenerFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
            properties="port=40001, socketTimeoutMillis=2000"/>
–>


<cacheManagerPeerListenerFactory

class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
            properties="socketTimeoutMillis=120000"/>



<!– ================================================================= –>

    <defaultCache
        maxElementsInMemory="5000"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>

    </defaultCache>

    <cache
        name="org.hibernate.cache.StandardQueryCache"
        maxElementsInMemory="50"
        eternal="true"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.hibernate.cache.UpdateTimestampsCache"
        maxElementsInMemory="2000"
        eternal="true"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.NodeImpl"
        maxElementsInMemory="10000"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = true,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.QNameEntityImpl"
        maxElementsInMemory="100"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.NodeStatusImpl"
        maxElementsInMemory="10000"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.NodeImpl.aspects"
        maxElementsInMemory="10000"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.NodeImpl.properties"
        maxElementsInMemory="10000"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.NodeImpl.parentAssocs"
        maxElementsInMemory="10000"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>
                               

    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.ChildAssocImpl"
        maxElementsInMemory="200000"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>
                               

    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.NodeImpl.sourceNodeAssocs"
        maxElementsInMemory="10000"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>
                               

    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.NodeImpl.targetNodeAssocs"
        maxElementsInMemory="10000"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>
                               

    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.NodeAssocImpl"
        maxElementsInMemory="1000"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>
                               

    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.StoreImpl"
        maxElementsInMemory="100"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>
                               

    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.VersionCountImpl"
        maxElementsInMemory="100"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>
                               

    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.AppliedPatchImpl"
        maxElementsInMemory="100"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="60"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.DbAccessControlListImpl"
        maxElementsInMemory="1000"
        eternal="true"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.DbAccessControlListImpl.entries"
        maxElementsInMemory="1000"
        eternal="true"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.DbAccessControlEntryImpl"
        maxElementsInMemory="5000"
        eternal="true"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.DbPermissionImpl"
        maxElementsInMemory="500"
        eternal="true"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.DbAuthorityImpl"
        maxElementsInMemory="10000"
        eternal="true"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.repo.domain.hibernate.DbAuthorityImpl.externalKeys"
        maxElementsInMemory="5000"
        eternal="true"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <!– Non-Hibernate –>
   
    <cache
        name="org.alfresco.cache.userToAuthorityCache"
        maxElementsInMemory="10000"
        eternal="true"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.cache.permissionsAccessCache"
        maxElementsInMemory="50000"
        eternal="true"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.cache.nodeOwnerCache"
        maxElementsInMemory="20000"
        eternal="true"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

    <cache
        name="org.alfresco.cache.ticketsCache"
        maxElementsInMemory="1000"
        eternal="true"
        overflowToDisk="false">

            <cacheEventListenerFactory
                    class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                    properties="replicatePuts = false,
                                replicateUpdates = true,
                                replicateRemovals = true,
                                replicateUpdatesViaCopy = false,
                                replicateAsynchronously = false"/>


    </cache>

</ehcache>



custom-ehcache-context.xml:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>


<!–
   08 March 2007: These beans override the shared cache bean definitions from ehcache-context.xml.
                  They be moved into the default configuration soon (V1.4.3E, V2.01E, V2.1)
–>
<beans>
    <bean name="transactionalEHCacheManager" class="org.alfresco.repo.cache.EhCacheManagerFactoryBean" >
         <property name="configLocation">
       <value>classpath:alfresco/extension/ehcache-custom.xml</value>
         </property>
    </bean>

   <bean name="userToAuthoritySharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
      <property name="cache">
         <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
            <property name="cacheManager">
               <ref bean="internalEHCacheManager" />
            </property>
            <property name="cacheName">
               <value>org.alfresco.cache.userToAuthorityCache</value>
            </property>
         </bean>
      </property>
   </bean>
  
   <bean name="permissionsAccessSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
      <property name="cache">
         <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
            <property name="cacheManager">
               <ref bean="internalEHCacheManager" />
            </property>
            <property name="cacheName">
               <value>org.alfresco.cache.permissionsAccessCache</value>
            </property>
         </bean>
      </property>
   </bean>
  
   <bean name="nodeOwnerSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
      <property name="cache">
         <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
            <property name="cacheManager">
               <ref bean="internalEHCacheManager" />
            </property>
            <property name="cacheName">
               <value>org.alfresco.cache.nodeOwnerCache</value>
            </property>
         </bean>
      </property>
   </bean>
  
   <bean name="ticketsSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
      <property name="cache">
         <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
            <property name="cacheManager">
               <ref bean="internalEHCacheManager" />
            </property>
            <property name="cacheName">
               <value>org.alfresco.cache.ticketsCache</value>
            </property>
         </bean>
      </property>
   </bean>
  
</beans>


custom-db-and-data-context.xml:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<!–
       This shows the common minimum configuration overrides.
       By default, the content and indexes are located at a relative location, which should only
       be used when doing a quick preview of the Alfresco server.
–>
<beans>
  
    <!– overriding to point to custom properties –>
    <bean id="repository-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="ignoreUnresolvablePlaceholders">
            <value>true</value>
        </property>
        <property name="locations">
            <list>
                <value>classpath:alfresco/repository.properties</value>
                <value>classpath:alfresco/version.properties</value>
                <value>classpath:alfresco/domain/transaction.properties</value>

                <!– Override data location properties –>
                <value>classpath:alfresco/extension/custom-data-location.properties</value>
                <!– Override database connection properties –>
                <value>classpath:alfresco/extension/custom-db-connection.properties</value>
            </list>
        </property>
    </bean>

    <bean id="hibernateConfigProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
        <property name="locations">
            <list>
                <value>classpath:alfresco/domain/hibernate-cfg.properties</value>

                <!– Override hibernate dialect –>
                <value>classpath:alfresco/extension/custom-hibernate-dialect.properties</value>
            </list>
        </property>
    </bean>

</beans>


custom-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>
   
   <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>
</beans>


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>/dev/alfresco/backup</value>
      </constructor-arg>
   </bean>

   <bean id="contentStoreReplicator"
         class="org.alfresco.repo.content.replication.ContentStoreReplicator"
         depends-on="fileContentStore, backupContentStore" >
      <!– content source –>
      <property name="sourceStore">
          <ref bean="fileContentStore" />
      </property>
      <!– content target –>
      <property name="targetStore">
          <ref bean="backupContentStore" />
      </property>
   </bean>

   <bean id="contentStoreBackupTrigger" class="org.alfresco.util.CronTriggerBean">
      <property name="jobDetail">
         <bean class="org.springframework.scheduling.quartz.JobDetailBean">
            <property name="jobClass">
               <value>org.alfresco.repo.content.replication.ContentStoreReplicator$ContentStoreReplicatorJob</value>
            </property>
            <property name="jobDataAsMap">
               <map>
                  <entry key="contentStoreReplicator">
                     <ref bean="contentStoreReplicator" />
                  </entry>
               </map>
            </property>
         </bean>
      </property>
      <property name="scheduler">
         <ref bean="schedulerFactory" />
      </property>
      <!– trigger at 3am each day –>
      <property name="cronExpression">
         <value>0 0 03 * * ?</value>
      </property>
   </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" />
         <!– <ref bean="archiveStoreA" /> –>
            <!– <ref bean="archiveStoreB" /> –>
         </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>

index-tracking-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>

    <!– Schedule index tracking every 30s –>
    <bean id="indexTrackerTrigger" class="org.alfresco.util.CronTriggerBean">
        <property name="jobDetail">
            <bean class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="indexRecoveryComponent">
                            <ref bean="indexTrackerComponent" />
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <property name="cronExpression">
            <value>0,10,20,30,40,50 * * * * ?</value>
        </property>
    </bean>
   
    <bean
          id="indexTrackerComponent"
          class="org.alfresco.repo.node.index.IndexRemoteTransactionTracker"
          parent="indexRecoveryComponentBase">
        <property name="remoteOnly">
            <value>false</value>
        </property>
    </bean>

    <!– Forces the reindexing of nodes where content may have been missing before –>
    <!–
       This component can be triggered at intervals where asynchronous content sharing
       between clustered servers has been set up.
    –>
    <bean id="missingContentReindexTrigger" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <bean class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="indexRecoveryComponent">
                            <ref bean="missingContentReindexComponent" />
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <!– Give the server 5 minutes and then check for missing content –>
        <property name="startDelayMinutes">
            <value>5</value>
        </property>
        <property name="repeatCount">
            <value>0</value>
        </property>
    </bean>

</beans>



The below files didnt seem to affect this issue, so I have not included the config on these:
custom-db-connection.properties
web-client-config-custom.xml
file-servers-custom.xml
ldap-authentication-context.xml
customModel.xml

With all this config in place, I was able to get data replicating between the two cluster nodes and I was able to access content added by both the nodes from both the nodes. However, the web application that we have developed which uses the web-services that runs a query to retrieve the content  from alfresco was giving me problems. I cant access content added by node2 from the application running on node1.

My part of my query code looks like:

RepositoryServiceSoapBindingStub REPOSITORY_SERVICE =WebServiceFactory.getRepositoryService();
Store store = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
final QueryResult queryResult = REPOSITORY_SERVICE.query(store, new Query(Constants.QUERY_LANG_LUCENE, "( @\\{http\\://www.alfresco.org/model/content/1.0\\}name:" + theContent + ")"), false);


I tried changing this to a xpath lookup and that found the content.

Thanks for taking a look at this issue for me. This is currently holding me up from upgrading to Alfresco release 1.4. We can't really go to production with alfresco 1.3 since we have been having a lot of problems with not getting it cluster fully and also with the workflow due to the 'move' bug ( http://forums.alfresco.com/viewtopic.php?p=18953#18953 ). So any help to get this product out is appreciated!

Thanks,

PS
9 REPLIES 9

derek
Star Contributor
Star Contributor
Hi,

Firstly, thanks for taking the time to evaluate Alfresco.

The cache strategy no longer needs changing for 1.4.  The change you have for the transactional cache was only when running with the TreeCache, which is no longer directly supported by Alfresco.  You can remove that change.

There have been some bug fixes around the cache replication following ongoing testing with some of our supported customers.  You appear to have most of these.  However, you should NOT be overriding the transactionalEHCacheManager bean as you are doing.  This will be clustering the in-transaction caches, which can cause issues.

You are replicating your content to a local directory.  Since you also have remoteOnly as false for the index tracking, I presume that you are running both instances on a single machine - probably for testing purposes.  Just remember that you should change this when using separate machines.

The search using Lucene via the WS interface relies on the indexes being up to date.  There are two factors at play here.  Firstly, the index tracker is only running every 10 seconds.  You can reduce that time as the process itself is lightweight until it finds some actual work to do.  A good thing to do is to turn on the debugging for org.alfresco.repo.node.index.IndexRemoteTransactionTracker.  That will show you when the second server indexes changes made in the first server and vice versa.  Secondly, your session should go back to the same server that it did the update on if it intends to immediately see the results of a search based on a prior update.  It may be a requirement in the future to force all servers in the cluster to synchronously index the transactions - it's overkill for most situations.

I've been able to reproduce the issue found during node moves in a cluster, but only when the cache clustering isn't working.  So make sure that your cache clustering is working by modifying a simple property on server A (such as description) and checking that it shows up on server B.  If not, the parent associations won't be propogating and the bug arises.  I've got some tidying up to do to prevent the issue, but if the clustering is working then you should not be seeing it.  http://issues.alfresco.com/browse/AR-1353.

Regards

ps
Champ in-the-making
Champ in-the-making
Derek,

Thanks for the quick reply. I dont override the transactionalEHCacheManager  anymore and I took out the cache strategy config out that is not needed. Looks like I have it somewhat working now. I am now able to access the content from my application thru both the nodes.  I will test this more and make sure that everything is working. (I was having some errors regarding duplicate users that I still need to look into -> AlfrescoRuntimeException: Found more than one user for admin (case insensitive) ). Let me know if you have any info on this issue.

Looks like we are definetely not going to use 1.3, so I need to make sure that 1.4 works for us. Also, I had a question regarding upgrading to 2.0. Is the configuration for this much diff from 1.4? We wouldnt mind going directly to 2.0 if its not going to take too much time to get this configured in a clustered environment.

Thanks for your help!

PS

derek
Star Contributor
Star Contributor
Hi,

2.0.1 will have the 1.4.3 fixes in as well.  The config is the same.
One fix that is still going to go in is the control for jobs running in the cluster, e.g. LDAP import.  Do you have LDAP import running on both servers?

Also, we have fixed some issues around duplicate users for the 1.4.3 Enterprise.

Regards

ps
Champ in-the-making
Champ in-the-making
Yes, I do have the import running on both servers. Is that going to be a problem? Basically I have the same copy of ldap-authentication-context.xml on both the servers. I did read a thread that one of the bean names in the ldap config had changed for 2.0, so I wanted to make sure that I catch all such changes before hand.

I will try to get 2.0 down for testing today and see how it goes. Thanks!

derek
Star Contributor
Star Contributor
Hi,

2.0.1 will be synched with 1.4.3 as far as the cluster fixes goes.
We are busy fixing the concurrent LDAP import issues for the cluster case.  For now, you should only run the import on one of the servers.

Regards

ps
Champ in-the-making
Champ in-the-making
I tried clustering with 2.0 (community release) and ran into some issues while bringing up my second cluster node.

1) Regarding the "avm.remote.port", on my second node which is on the same machine, I got a url already being used error. I had to change the port for the second node within the alfresco.war as I could not override the property or the bean.

2) After going past the first issue, I now get an indexes not found error on node2. Detailed error is:
2007-04-05 12:30:06,028 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco]] Loading Spring root WebApplicationContext
2007-04-05 12:31:39,720 ERROR [org.alfresco.repo.admin.ConfigurationChecker] CONTENT INTEGRITY ERROR: Indexes not found for 5 stores.
2007-04-05 12:31:39,721 ERROR [org.alfresco.repo.admin.ConfigurationChecker] Ensure that the 'dir.root' property is pointing to the correct data location.
2007-04-05 12:31:39,730 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Ensure that the 'dir.root' property is pointing to the correct data location.
   at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:313)
   at org.alfresco.repo.admin.ConfigurationChecker.access$000(ConfigurationChecker.java:74)
   at org.alfresco.repo.admin.ConfigurationChecker$1.doWork(ConfigurationChecker.java:180)
   at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:176)
   at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:82)
   at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:184)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:45)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:225)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:323)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
   at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
   at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
   at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
   at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
   at org.jboss.web.WebModule.startModule(WebModule.java:83)
   at org.jboss.web.WebModule.startService(WebModule.java:61)
   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
   at $Proxy0.start(Unknown Source)
   at org.jboss.system.ServiceController.start(ServiceController.java:417)
   at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
   at $Proxy47.start(Unknown Source)
   at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
   at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
   at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
   at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
   at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
   at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
   at $Proxy48.start(Unknown Source)
   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
   at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
   at $Proxy9.deploy(Unknown Source)
   at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
   at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
   at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
   at $Proxy0.start(Unknown Source)
   at org.jboss.system.ServiceController.start(ServiceController.java:417)
   at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
   at $Proxy4.start(Unknown Source)
   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
   at $Proxy5.deploy(Unknown Source)
   at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
   at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
   at org.jboss.Main.boot(Main.java:200)
   at org.jboss.Main$1.run(Main.java:490)
   at java.lang.Thread.run(Thread.java:595)


———————-

Any idea what I may be missing???

Thanks,

PS

ps
Champ in-the-making
Champ in-the-making
Hi,

2.0.1 will have the 1.4.3 fixes in as well.  The config is the same.
One fix that is still going to go in is the control for jobs running in the cluster, e.g. LDAP import.  Do you have LDAP import running on both servers?

Also, we have fixed some issues around duplicate users for the 1.4.3 Enterprise.

Regards

Derek,  Any idea if the duplicate user bug fix will be available through a community release any time soon?

derek
Star Contributor
Star Contributor
Hi,

You can override the AVM config by overriding the bean virtserver-properties defined in file alfresco-virtserver-context.xml.

On the second node, you'll need to start with some indexes (recommended) or rebuild the indexes on startup.  Copy the indexes from the first node, or a fairly recent backup of the indexes to the second node.  There have been some refinements to the bootstrap procedure w.r.t. full index rebuilding.

The Enterprise refinements generally go into the public code some weeks after the Enterprise release cycle.

We'll also be putting in job locking for clustered servers sometime soon.  Where this goes depends on time constraints and customer demands.

Regards

ps
Champ in-the-making
Champ in-the-making
Where/when is  1.4.3 or 2.0.1 available to get the duplicate user bug fix? We have run into this bug a couple of times with 1.3 and I know we cant release with this bug as it takes the system down (cant access any content from alfresco, throws exception while logging in).