Hi Michele,
Sorry about this, I think my instructions may not have been as clear as they
could have been. The good news is that it looks like you are loading in the
correct repositiory config file, at least for your first instance:
2011-02-07 11:49:42,015 INFO info.magnolia.jackrabbit.ProviderImpl
: Loading repository at
/var/lib/tomcat/apache-tomcat-6.0.30/webapps/magnoliaPublic/repositories/mag
nolia (config file:
/var/lib/tomcat/apache-tomcat-6.0.30/webapps/magnoliaPublic/WEB-INF/config/r
epo-conf/jackrabbit-bundle-mysql-search-pub1.xml)
Unfortunately, I don¹t think that replacement values for ${servername} or
${webapp} will get resolved from within the repo-conf files (i.e.
cid_${servername}). In my configuration files, I have these values
hardcoded. Can you try the following:
1. Open up jackrabbit-bundle-mysql-search-pub1.xml, replace the value of the
Cluster element¹s id attribute with something like the following:
<Cluster id=²cid_host1.mydomain.com²> where host1 is your server¹s name for
your first clustered instance, mydomain is your domain name, and com is your
domain extension.
2. Save jackrabbit-bundle-mysql-search-pub1.xml
3. Open up jackrabbit-bundle-mysql-search-pub1.xml, replace the value of
the Cluster element¹s id attribute with something like the following:
<Cluster id=²cid_host2.mydomain.com²> where host2 is your server¹s name for
your second clustered instance, mydomain is your domain name, and com is
your domain extension.
4. Save jackrabbit-bundle-mysql-search-pub2.xml
In addition to this, please verify that your datastore is shared and
accessible to both of your instances. Please review the following
documentation on Jackrabbit Clustering here:
http://wiki.apache.org/jackrabbit/Clustering
In particular, make sure that all of the items listed under the Requirements
heading have been met. For your convenience I¹ve copied and pasted this
section below:
Requirements
In order to use clustering, the following prerequisites must be met:
* Each cluster node must have its own repository configuration.
* A DataStore <http://wiki.apache.org/jackrabbit/DataStore> must always be
shared between nodes, if used.
* The global FileSystem on the repository level must be shared (only the one
that is on the same level as the data store; only in the repository.xml
file).
* Each cluster node needs its own (private) workspace level and version
FileSystem (only those within the workspace and versioning configuration;
the ones in the repository.xml and workspace.xml file).
* Each cluster node needs its own (private) Search indexes.
* Every cluster node must be assigned a unique ID.
* A journal type must be chosen, either based on files or stored in a
database.
* Each cluster node must use the same (shared) journal.
* The persistence managers must store their data in the same, globally
accessible location (see PersistenceManagerFAQ
<http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ>).
For the shared Datastore, I've accomplished this in the past my having an
NFS mount on my second second server that points to the datastore on my
first server. If you haven't already done so, it's a good idea to set
${magnolia.repositories.home} to a location outside of your webapp, to do
so, open up WEB-INF/config/magnoliaPublic/magnolia.properties and edit the
magnolia.reposities.home property, it should be something like the
following:
# set to a value outside the webapp to not loose the data on redeploys
magnolia.repositories.home=/usr/local/magnolia-repos/public/repositories
The datastore will then be written to:
/usr/local/magnolia-repos/public/repositories/magnolia/repository/datastore
This is the directory that you will want to have an NFS mount for on your
second instance.
Please let me know if something does not make sense, or you have any more
questions.
HTH,
Matt
From: Michele <[email protected]>
Reply-To: Magnolia User-List <[email protected]>
Date: Mon, 7 Feb 2011 11:58:18 +0100
To: Magnolia User-List <[email protected]>
Subject: Re: [magnolia-user] Magnolia 4.4 + MySQL clustering
2011/2/4 Dertinger, Matthew <[email protected]>
> <Cluster id="cid_${YOUR_FIRST_SERVER_NAME_HERE}">
Hi Matt,
I followed the steps you explained me and created a single .war file for all
instances.
Unfortunately I always have this in catalina.out:
2011-02-07 11:49:42,015 INFO info.magnolia.jackrabbit.ProviderImpl
: Loading repository at
/var/lib/tomcat/apache-tomcat-6.0.30/webapps/magnoliaPublic/repositories/mag
nolia (config file:
/var/lib/tomcat/apache-tomcat-6.0.30/webapps/magnoliaPublic/WEB-INF/config/r
epo-conf/jackrabbit-bundle-mysql-search-pub1.xml) - cluster id: "<unset>"
2011-02-07 11:49:42,749 ERROR info.magnolia.jackrabbit.ProviderImpl
: Unable to initialize repository: Replacement not found for
${magnolia.servername}.: Replacement not found for ${magnolia.servername}.
org.apache.jackrabbit.core.config.ConfigurationException: Replacement not
found for ${magnolia.servername}.: Replacement not found for
${magnolia.servername}.: Replacement not found for ${magnolia.servername}.
I tried with: cid_${HOSTNAME}, cid_${servername}, cid_${server},
cid_${magnolia.servername}, but it didn't work.
Any ideas?
Many thanks.
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------