cancel
Showing results for 
Search instead for 
Did you mean: 

installing and configuring cluster - alfresco 3.4.d

mrksjs
Champ on-the-rise
Champ on-the-rise
i always wanted to try this.

was following this article: http://wiki.alfresco.com/wiki/Configuring_JGroups_and_Alfresco_Clusters

these are my steps:


Installation of cluster and configuration of jgroups

1.   first step: synchronize time on both nodes. Difference must not be larger than ~5 second
21 Aug 21:14:50 ntpdate[4806]: step time server 91.189.94.4 offset 10.524274 sec

… interesting


2.   Install alfresco on node1.

3.   Configure contentstore. contentstore muste be shared. indices never be shared.
  • configure share drive (nfs) for contentstore
  • Configure dir.root to shared folder
  • alfresco-global.properties : dir.root=/mnt/alf_data (shared folder)
  • separate indices from dir.root
  • Configure dir.indexes to local folder (outside dir.root)
  • alfresco-global.properties : dir.indexes=/export/indices/lucene-indexes
  • configure cluster:
  • alfresco-global.properties : alfresco.cluster.name=testcluster
4.   configure remote access for mysql.

5.   Install alfresco on node2
  • repeat step 3
  • configure db.url pointing to node1
6.   configure indexing
  • alfresco-global.properties : index.recovery.mode=AUTO
  • alfresco-global.properties : index.tracking.cronExpression=0/5 * * * * ?
  • alfresco-global.properties : index.tracking.reindexLagMs=10000
7.   enable ehcache configuration
  • cd /opt/alfresco-3.4.d/tomcat/shared/classes/alfresco/extension/
  • cp ehcache-custom.xml.sample.cluster ehcache-custom.xml
8.   change cacheManagerPeerProviderFactory in ehcache-custom.xml
<cacheManagerPeerProviderFactory        
class="org.alfresco.repo.cache.AlfrescoCacheManagerPeerProviderFactory"       
properties="heartbeatInterval=5000,
            peerDiscovery=automatic,
            multicastGroupAddress=230.0.0.1,
            multicastGroupPort=4446"    />

9.   configure ehcache on both nodes:
  • alfresco-global.properties : alfresco.jgroups.defaultProtocol=TCP
  • alfresco-global.properties : alfresco.jgroups.bind_address=node1
  • alfresco-global.properties : alfresco.jgroups.bind_interface=eth0
  • alfresco-global.properties : alfresco.tcp.start_port=7800
  • alfresco-global.properties : alfresco.tcp.port_range=5
  • alfresco-global.properties : alfresco.tcp.initial_hosts=node1[7800],node2[7800]
  • alfresco-global.properties : alfresco.ehcache.rmi.hostname=nodeX
  • alfresco-global.properties : alfresco.rmi.services.external.host=nodeX
  • alfresco-global.properties : alfresco.ehcache.rmi.port=40001
  • alfresco-global.properties : alfresco.ehcache.rmi.remoteObjectPort=45001
10.   test content sharing
  • login to node1/alfresco
  • create new space/folder
  • upload document to space/folder
  • login to node2/alfresco
  • check if uploaded document and newly created space/folder is available
that works!

11.   test index synchronization
  • login to node1/alfresco
  • change metadata of any file
  • login to node2/alfresco
  • check if metadata has been changed
that does not work.
index is not being synchronized unless server is restarted.
On restart the indexer will notice that content/metadata has been changed an will index it.

when starting i receive a exception (see second post…) which i dont understand. also when i access nodes the exception is thrown.


Full global properties:



###############################
## Common Alfresco Properties #
###############################

#dir.root=/opt/alfresco-3.4.d/alf_data
dir.root=/mnt/alf_data
web.application.context.url=http://127.0.0.1:8080/alfresco

dir.indexes=/export/indices/lucene-indexes
dir.indexes.backup=/export/indices/backup-lucene-indexes
dir.indexes.lock=/export/indices/locks

### database connection properties ###
db.driver=org.gjt.mm.mysql.Driver
db.username=alfresco
db.password=root
db.name=alfresco
db.url=jdbc:mysql://192.168.1.60/alfresco

### FTP Server Configuration ###
ftp.enabled=true
ftp.port=21
ftp.ipv6.enabled=false

### RMI service ports ###
alfresco.rmi.services.port=50500
avm.rmi.service.port=0
avmsync.rmi.service.port=0
attribute.rmi.service.port=0
authentication.rmi.service.port=0
repo.rmi.service.port=0
action.rmi.service.port=0
deployment.rmi.service.port=0

### External executable locations ###
ooo.exe=/program/soffice.bin
ooo.enabled=false
img.root=/opt/alfresco-3.4.d/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
swf.exe=/opt/alfresco-3.4.d/common/bin/pdf2swf
jodconverter.enabled=true
jodconverter.officeHome=
jodconverter.portNumbers=8101

### Initial admin password ###
alfresco_user_store.adminpassword=209c6174da490caeb422f3fa5a7ae634

### cluster configuration and such ###

alfresco.cluster.name=testcluster

index.recovery.mode=AUTO
index.tracking.cronExpression=0/5 * * * * ?
index.tracking.reindexLagMs=10000

alfresco.jgroups.defaultProtocol=TCP
alfresco.jgroups.bind_address=node1
alfresco.jgroups.bind_interface=eth0
alfresco.tcp.start_port=7800
alfresco.tcp.port_range=5
alfresco.tcp.initial_hosts=node2[7800],node1[7800]
alfresco.ehcache.rmi.hostname=node1
alfresco.rmi.services.external.host=node1
alfresco.ehcache.rmi.port=40001
alfresco.ehcache.rmi.remoteObjectPort=45001





please please please. somebody?

1 REPLY 1

mrksjs
Champ on-the-rise
Champ on-the-rise
couldnt attach exception. post was too long i suppose:


Exception:


Aug 22, 2013 1:58:18 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/alfresco-3.4.d/java/jre/lib/i386/client:/opt/alfresco-3.4.d/java/jre/lib/i386:/opt/alfresco-3.4.d/java/jre/../lib/i386:/opt/alfresco-3.4.d/common/lib::/usr/java/packages/lib/i386:/lib:/usr/lib
Aug 22, 2013 1:58:19 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Aug 22, 2013 1:58:19 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2007 ms
Aug 22, 2013 1:58:19 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 22, 2013 1:58:19 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
Aug 22, 2013 1:58:19 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor alfresco.xml
Aug 22, 2013 1:58:24 AM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
01:58:36,804  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]
01:58:36,815  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]
01:58:36,822  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from file [/opt/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/test/alfresco-global.properties]
01:58:36,826  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from file [/opt/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/tests/alfresco-global.properties]
01:58:36,832  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from URL [file:/opt/alfresco-3.4.d/tomcat/shared/classes/alfresco-global.properties]
01:58:36,991  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
01:58:37,235  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
01:58:37,296  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
01:59:23,432  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor Repository Template Processor for extension ftl
01:59:23,450  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor Repository Script Processor for extension js
01:59:41,661  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
01:59:44,554  INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
01:59:45,140  ERROR [ehcache.distribution.RMISynchronousCacheReplicator] Exception on replication of removeNotification. no such object in table. Continuing…
java.rmi.NoSuchObjectException: no such object in table
   at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
   at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
   at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
   at net.sf.ehcache.distribution.RMICachePeer_Stub.remove(Unknown Source)
   at net.sf.ehcache.distribution.RMISynchronousCacheReplicator.replicateRemovalNotification(RMISynchronousCacheReplicator.java:243)
   at net.sf.ehcache.distribution.RMISynchronousCacheReplicator.notifyElementRemoved(RMISynchronousCacheReplicator.java:229)
   at net.sf.ehcache.event.RegisteredEventListeners.notifyElementRemoved(RegisteredEventListeners.java:81)
   at net.sf.ehcache.Cache.notifyRemoveInternalListeners(Cache.java:2006)
   at net.sf.ehcache.Cache.removeInternal(Cache.java:1990)
   at net.sf.ehcache.Cache.remove(Cache.java:1886)
   at net.sf.ehcache.Cache.remove(Cache.java:1844)
   at net.sf.ehcache.Cache.remove(Cache.java:1822)
   at org.alfresco.repo.cache.EhCacheAdapter.remove(EhCacheAdapter.java:114)
   at org.alfresco.repo.cache.TransactionalCache.remove(TransactionalCache.java:447)
   at org.alfresco.repo.dictionary.DictionaryDAOImpl.removeDictionaryRegistry(DictionaryDAOImpl.java:1081)
   at org.alfresco.repo.dictionary.DictionaryDAOImpl.destroy(DictionaryDAOImpl.java:137)
   at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.register(DictionaryRepositoryBootstrap.java:533)
   at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.onBootstrap(DictionaryRepositoryBootstrap.java:508)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:78)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   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:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
01:59:45,191  ERROR [ehcache.distribution.RMISynchronousCacheReplicator] Exception on replication of removeNotification. no such object in table. Continuing…
java.rmi.NoSuchObjectException: no such object in table
   at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
   at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
   at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
   at net.sf.ehcache.distribution.RMICachePeer_Stub.remove(Unknown Source)
   at net.sf.ehcache.distribution.RMISynchronousCacheReplicator.replicateRemovalNotification(RMISynchronousCacheReplicator.java:243)
   at net.sf.ehcache.distribution.RMISynchronousCacheReplicator.notifyElementRemoved(RMISynchronousCacheReplicator.java:229)
   at net.sf.ehcache.event.RegisteredEventListeners.notifyElementRemoved(RegisteredEventListeners.java:81)
   at net.sf.ehcache.Cache.notifyRemoveInternalListeners(Cache.java:2006)
   at net.sf.ehcache.Cache.removeInternal(Cache.java:1990)
   at net.sf.ehcache.Cache.remove(Cache.java:1886)
   at net.sf.ehcache.Cache.remove(Cache.java:1844)
   at net.sf.ehcache.Cache.remove(Cache.java:1822)
   at org.alfresco.repo.cache.EhCacheAdapter.remove(EhCacheAdapter.java:114)
   at org.alfresco.repo.cache.TransactionalCache.remove(TransactionalCache.java:447)
   at org.alfresco.repo.dictionary.NamespaceDAOImpl.removeNamespaceRegistry(NamespaceDAOImpl.java:507)
   at org.alfresco.repo.dictionary.NamespaceDAOImpl.destroy(NamespaceDAOImpl.java:147)
   at org.alfresco.repo.dictionary.DictionaryDAOImpl.destroy(DictionaryDAOImpl.java:139)
   at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.register(DictionaryRepositoryBootstrap.java:533)
   at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.onBootstrap(DictionaryRepositoryBootstrap.java:508)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:78)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   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:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
01:59:45,223  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
01:59:45,328  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
01:59:45,342  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
01:59:45,344  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
01:59:45,427  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
01:59:49,414  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'thirdparty' subsystem, ID: [thirdparty, default]
01:59:49,478  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
01:59:49,484  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
01:59:49,491  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
01:59:51,542  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'thirdparty' subsystem, ID: [thirdparty, default] complete
01:59:51,552  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'OOoDirect' subsystem, ID: [OOoDirect, default]
01:59:51,673  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
01:59:51,682  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
01:59:51,688  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
01:59:52,968  WARN  [alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.
01:59:52,991  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'OOoDirect' subsystem, ID: [OOoDirect, default] complete
01:59:58,078  INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /mnt/alf_data
01:59:58,383  INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
02:00:06,216  INFO  [admin.patch.PatchExecuter] No patches were required.