La configuración es la siguiente:
2 nodos llamados alfpru1 (IP: 192.168.56.101/24) y alfpru2 (IP: 192.168.56.102/24).
En alfpru1:
- Está instalado MySQL con acceso para ambos nodos.
- Los recursos compartidos por NFS del repositorio y las configuraciones.
- WebSphere Application Server 7.0.17 (WAS7) con el Deploy Manager instalado.
En alfpru2:
- Websphere Application Server 7.0.17 (WAS7)
En la configuración del WAS7 se han creado dos servidores (alfpru1Cluster y alfpru2Cluster) que son miembros del cluster (alfrescoCluster).
La configuración del alfresco-global.properties es:
# Repository and indexes
#
dir.shared.root=/opt/alf343WAS7_data_cluster
dir.local.root=/opt/alf343WAS7_index_cluster
dir.root=${dir.shared.root}
dir.contentstore=${dir.shared.root}/contentstore
dir.contentstore.deleted=${dir.shared.root}/contentstore.deleted
dir.auditcontentstore=${dir.shared.root}/audit.contentstore
dir.indexes=${dir.local.root}/lucene-indexes
dir.indexes.backup=${dir.local.root}/backup-lucene-indexes
dir.indexes.lock=${dir.indexes}/locks
#
# Cluster config
#
alfresco.cluster.name=AlfpruClusterWAS7
alfresco.jgroups.defaultProtocol=TCP
alfresco.tcp.initial_hosts=alfpru1[7800],alfpru2[7800]
#
# Audit config
#
audit.enabled=false
audit.useNewConfig=false
#
# Tuning config
#
db.pool.initial=50
db.pool.min=50
db.pool.max=275
db.pool.idle=-1
hibernate.jdbc.fetch_size=150
#
# Tools config
#
jodconverter.officeHome=/usr/lib/openoffice.org3
jodconverter.portNumbers=8101
jodconverter.enabled=true
img.root=/usr
swf.exe=/usr/bin/pdf2swf
#
# Hibernate
#
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
#
#
dir.shared.root=/opt/alf343WAS7_data_cluster
dir.local.root=/opt/alf343WAS7_index_cluster
dir.root=${dir.shared.root}
dir.contentstore=${dir.shared.root}/contentstore
dir.contentstore.deleted=${dir.shared.root}/contentstore.deleted
dir.auditcontentstore=${dir.shared.root}/audit.contentstore
dir.indexes=${dir.local.root}/lucene-indexes
dir.indexes.backup=${dir.local.root}/backup-lucene-indexes
dir.indexes.lock=${dir.indexes}/locks
#
# Cluster config
#
alfresco.cluster.name=AlfpruClusterWAS7
alfresco.jgroups.defaultProtocol=TCP
alfresco.tcp.initial_hosts=alfpru1[7800],alfpru2[7800]
#
# Audit config
#
audit.enabled=false
audit.useNewConfig=false
#
# Tuning config
#
db.pool.initial=50
db.pool.min=50
db.pool.max=275
db.pool.idle=-1
hibernate.jdbc.fetch_size=150
#
# Tools config
#
jodconverter.officeHome=/usr/lib/openoffice.org3
jodconverter.portNumbers=8101
jodconverter.enabled=true
img.root=/usr
swf.exe=/usr/bin/pdf2swf
#
# Hibernate
#
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
#
# Lucene indexes config
#
#
index.recovery.mode=AUTO
index.tracking.cronExpression=0/5 * * * * ?
index.tracking.reindexLagMs=5000
#
# For WAS config
#
mbean.server.locateExistingServerIfPossible=false
index.tracking.cronExpression=0/5 * * * * ?
index.tracking.reindexLagMs=5000
#
# For WAS config
#
mbean.server.locateExistingServerIfPossible=false
El problema que puede presentarse ahora es que salga un error de este tipo:
[8/4/11 10:56:41:865 CEST] 0000001b ContextLoader E org.springframework.web.context.ContextLoader initWebApplicationContext Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'propertyBackedBeanExporter' defined in file [/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/alfpru1Cell01/Alfresco.ear/alfresco.war/WEB-INF/classes/alfresco/enterprise/repository-jmx-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.enterprise.repo.management.subsystems.PropertyBackedBeanExporter]: Constructor threw exception; nested exception is org.alfresco.error.AlfrescoRuntimeException: 07040000 Failed to initialise JGroups channel:
Cluster prefix: AlfpruClusterWAS7
App region: org.alfresco.enterprise.repo.management.subsystems.PropertyBackedBeanExporter
Channel: org.jgroups.JChannel@48a648a6
Configuration URL: file:/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/alfpru1Cell01/Alfresco.ear/alfresco.war/WEB-INF/classes/alfresco/jgroups/alfresco-jgroups-TCP.xml
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'propertyBackedBeanExporter' defined in file [/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/alfpru1Cell01/Alfresco.ear/alfresco.war/WEB-INF/classes/alfresco/enterprise/repository-jmx-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.enterprise.repo.management.subsystems.PropertyBackedBeanExporter]: Constructor threw exception; nested exception is org.alfresco.error.AlfrescoRuntimeException: 07040000 Failed to initialise JGroups channel:
Cluster prefix: AlfpruClusterWAS7
App region: org.alfresco.enterprise.repo.management.subsystems.PropertyBackedBeanExporter
Channel: org.jgroups.JChannel@48a648a6
Configuration URL: file:/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/alfpru1Cell01/Alfresco.ear/alfresco.war/WEB-INF/classes/alfresco/jgroups/alfresco-jgroups-TCP.xml
[...]
Caused by: org.jgroups.ChannelException: failed to start protocol stack
[...]
Caused by: java.net.BindException: No available port to bind to
Para solucionar esto hay varias formas, pero la más sencilla es incluir el valor de jgroups.bind_addr para cada servidor directamente en los parámetros de inicio de la máquina virtual de Java. Para ello en WAS7 la introducimos en:
Servidores de aplicaciones de WebSphere/alfpru1Cluster/Java y gestión de procesos/Definición de proceso/Máquina virtual de java/Argumentos de JVM genéricos el valor: -Djgroups.bind_addr=alfpru1
Y en:
Servidores de aplicaciones de WebSphere/alfpru2Cluster/Java y gestión de procesos/Definición de proceso/Máquina virtual de java/Argumentos de JVM genéricos el valor: -Djgroups.bind_addr=alfpru2
Con esto se soluciona este error de manera sencilla y tendremos funcionando un clúster WAS7 + un clúster JGroups en Alfresco ECM
Para más información:
- Alfresco Docs (Installing Alfresco in WebSphere)
- Alfresco Docs (Configuring JGroups)
- The JGroups 3.x Tutorial



0 comentarios:
Publicar un comentario en la entrada