You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Nilshan <ni...@indralok.com> on 2009/04/01 08:26:38 UTC

Re: JackRabbit_Clustering

Hello Ian,
             
We tried using the shared network drive approach.
<Journal class="org.apache.jackrabbit.core.journal.FileJournal">
param name="revision" value="${rep.home}/revision.log" /
param name="directory" value="//Indralok1/Repo_Journal" /
</Journal> 

The revision file and journal.log file appears in the shared drive and as we
update or create any new rule from the Rule Creation Cluster (Cluster 1),
the journal.log gets updated. This seems to be working fine at cluster 1.

Now , when the Rule Execution Cluster (Cluster 2) tries to execute the
rules, it throws error saying "Unable to read Revision 2237"

Below is the error log:-

******************************************************
2009-04-01 11:07:38,389 ERROR
[org.apache.jackrabbit.core.cluster.ClusterNode] (CheckResources) Unable to
read revision '2237'.
org.apache.jackrabbit.core.journal.JournalException: Parse error while
reading node type definition.
	at
org.apache.jackrabbit.core.journal.AbstractRecord.readNodeTypeDef(AbstractRecord.java:256)
	at
org.apache.jackrabbit.core.cluster.ClusterNode.consume(ClusterNode.java:1026)
	at
org.apache.jackrabbit.core.journal.AbstractJournal.doSync(AbstractJournal.java:198)
	at
org.apache.jackrabbit.core.journal.AbstractJournal.sync(AbstractJournal.java:173)
	at
org.apache.jackrabbit.core.cluster.ClusterNode.sync(ClusterNode.java:303)
	at
org.apache.jackrabbit.core.cluster.ClusterNode.start(ClusterNode.java:249)
	at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:319)
	at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
	at
org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:245)
	at
org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
	at
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
	at
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:363)

******************************************************

Are we missing something? If so, pls let us know....

We assume that the cluster 2 is not able to read the revision that the
Cluster 1 stores.

Can you pls tell us what is the problem??????

Thanks........

Nilshan and Arpan


Hello Ian and Thomas,
 Thank you for your quick reply. 
We will definitely try the suggested option to share the drive for the
clusters..
We will get in touch  soon..
Thanks a ton.

:rules:

Nilshan and Arpan.




Ian Boston wrote:
> 
> I see Thomas has picked up the thread, and he knows far more about  
> this than I do, so listen to him more than me.
> 
> 1. I see that the journal directory is  on the c: drive, do that mean  
> that both Jackrabbit instances are running on the same physical  
> machine ?
> 2. It would be normal to put the local revision file with the local  
> repository storage eg
> 
> 
> and the journal in a shared space.
> 
> 
> 
> You may be getting name clashes between nodes as a result of using the  
> same directory for both the private and the public shared locations.
> 
> ---
> 
> The failure on the DB Journal looks like the DB connection is being  
> refused by the db server (url, username, password etc ).
> 
> "Unable to create connection.: Unable to
> create connection." is probably from the JDBC driver.
> 
> Ian
> 
> 
> On 31 Mar 2009, at 10:41, Nilshan wrote:
> 
>>
>> Hello Thomas,
>>
>> Thanks for the reply...
>>
>> Using FileJournal, we are facing the problem that is mentioned in the
>> previous message.....
>>
>> Using DatabaseJournal, we are facing the following error:-
>>
>>
>> The following is the Error log while using DatabaseJournal..
>>
>> **********************************************************
>> javax.jcr.RepositoryException: Unable to create connection.: Unable to
>> create connection.
>> at
>> org 
>> .apache 
>> .jackrabbit 
>> .core.RepositoryImpl.createClusterNode(RepositoryImpl.java:650)
>> at
>> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java: 
>> 288)
>> at
>> org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java: 
>> 557)
>> at
>> org.apache.jackrabbit.core.TransientRepository 
>> $2.getRepository(TransientRepository.java:245)
>> at
>> org 
>> .apache 
>> .jackrabbit 
>> .core.TransientRepository.startRepository(TransientRepository.java: 
>> 265)
>> at
>> org 
>> .apache 
>> .jackrabbit.core.TransientRepository.login(TransientRepository.java: 
>> 333)
>> at
>> org 
>> .apache 
>> .jackrabbit.core.TransientRepository.login(TransientRepository.java: 
>> 363)
>> at
>> com 
>> .amicas 
>> .rulemanagement 
>> .RuleAssetManager.initializeRepository(RuleAssetManager.java:555)
>> at
>> com 
>> .amicas 
>> .rulemanagement.RuleAssetManager.getSession(RuleAssetManager.java:517)
>> at
>> com 
>> .amicas 
>> .rulemanagement 
>> .RuleAssetManager.getServiceImpl(RuleAssetManager.java:494)
>> at
>> com 
>> .amicas 
>> .rulemanagement 
>> .RuleAssetManager.categoryExists(RuleAssetManager.java:420)
>> at
>> com 
>> .amicas 
>> .rulemanagement 
>> .RuleAssetManager 
>> .initializeRuleRepoAndMetaConfiguration(RuleAssetManager.java:1718)
>> at
>> com 
>> .amicas 
>> .rulemanagement 
>> .RuleAssetManager.getRuleAssetManager(RuleAssetManager.java:167)
>> at
>> com 
>> .amicas 
>> .gwt 
>> .rulemanagement 
>> .servlet 
>> .RuleServiceServlet.getAllRuleByCategory(RuleServiceServlet.java:256)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at  
>> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 
>> 528)
>> at
>> com 
>> .google 
>> .gwt 
>> .user 
>> .server 
>> .rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
>> at
>> com 
>> .google 
>> .gwt 
>> .user 
>> .server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:187)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>> at
>> org 
>> .apache 
>> .catalina 
>> .core 
>> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
>> 252)
>> at
>> org 
>> .apache 
>> .catalina 
>> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>> at
>> org 
>> .springframework 
>> .orm 
>> .hibernate 
>> .support 
>> .OpenSessionInViewFilter 
>> .doFilterInternal(OpenSessionInViewFilter.java:172)
>> at
>> org 
>> .springframework 
>> .web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java: 
>> 76)
>> **********************************************************
>>
>> My configuration for the DatabaseJournal is also mentioned in the  
>> previous
>> message....
>>
>> I hope that I have provided sufficient information to you.
>> If we are missing anything, let us know....
>>
>>
>> Thank You,
>> Nilshan and Arpan.
>>
>>
>>
>>
>>
>> Thomas Müller-2 wrote:
>>>
>>> Hi,
>>>
>>>> I tried shared Journal (as it is must and clearly suggested on  
>>>> clustering
>>>> wiki) but it didn't work.
>>>
>>> Could you tell us what the problem was?
>>>
>>> Regards,
>>> Thomas
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/JackRabbit_Clustering-tp22785285p22801622.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/JackRabbit_Clustering-tp22785285p22820504.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: JackRabbit_Clustering

Posted by Ian Boston <ia...@googlemail.com>.
2 Observations/Questions:
When you say Rule Creation Cluster, and Rule Execution Cluster, are  
these 2 separate sets of JVM's running jackrabbit with the same DB  
backend, or does each *set* of JVM's have their own DB.

You can have 1 DB, 1 DataStore, 1..n JVM configured for one purpose  
and  1..n JVM's configured for another purpose as a *single*  
jackrabbit cluster.

You cannot have 1 DB, 1 DataStore, 1..n JVMs as 1 cluster configured  
for one purpose and another 1DB, 1 DataStore and 1..n JVMs as another  
cluster configured for another purpose *and* share the journal between  
both clusters.

--------------------

Second observation, the Rule Execution Jackrabbit instance  looks like  
it hasnt had all the node types and possibly name spaces registered,  
so it doesnt understand revisions from the Rule Creation Cluster  
(which contain references to revisions and namespaces).

Ian
On 1 Apr 2009, at 07:26, Nilshan wrote:

>
> Hello Ian,
>
> We tried using the shared network drive approach.
> <Journal class="org.apache.jackrabbit.core.journal.FileJournal">
> param name="revision" value="${rep.home}/revision.log" /
> param name="directory" value="//Indralok1/Repo_Journal" /
> </Journal>
>
> The revision file and journal.log file appears in the shared drive  
> and as we
> update or create any new rule from the Rule Creation Cluster  
> (Cluster 1),
> the journal.log gets updated. This seems to be working fine at  
> cluster 1.
>
> Now , when the Rule Execution Cluster (Cluster 2) tries to execute the
> rules, it throws error saying "Unable to read Revision 2237"
>
> Below is the error log:-
>
> ******************************************************
> 2009-04-01 11:07:38,389 ERROR
> [org.apache.jackrabbit.core.cluster.ClusterNode] (CheckResources)  
> Unable to
> read revision '2237'.
> org.apache.jackrabbit.core.journal.JournalException: Parse error while
> reading node type definition.
> 	at
> org 
> .apache 
> .jackrabbit 
> .core.journal.AbstractRecord.readNodeTypeDef(AbstractRecord.java:256)
> 	at
> org 
> .apache.jackrabbit.core.cluster.ClusterNode.consume(ClusterNode.java: 
> 1026)
> 	at
> org 
> .apache 
> .jackrabbit.core.journal.AbstractJournal.doSync(AbstractJournal.java: 
> 198)
> 	at
> org 
> .apache 
> .jackrabbit.core.journal.AbstractJournal.sync(AbstractJournal.java: 
> 173)
> 	at
> org.apache.jackrabbit.core.cluster.ClusterNode.sync(ClusterNode.java: 
> 303)
> 	at
> org 
> .apache.jackrabbit.core.cluster.ClusterNode.start(ClusterNode.java: 
> 249)
> 	at
> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java: 
> 319)
> 	at
> org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java: 
> 557)
> 	at
> org.apache.jackrabbit.core.TransientRepository 
> $2.getRepository(TransientRepository.java:245)
> 	at
> org 
> .apache 
> .jackrabbit 
> .core.TransientRepository.startRepository(TransientRepository.java: 
> 265)
> 	at
> org 
> .apache 
> .jackrabbit.core.TransientRepository.login(TransientRepository.java: 
> 333)
> 	at
> org 
> .apache 
> .jackrabbit.core.TransientRepository.login(TransientRepository.java: 
> 363)
>
> ******************************************************
>
> Are we missing something? If so, pls let us know....
>
> We assume that the cluster 2 is not able to read the revision that the
> Cluster 1 stores.
>
> Can you pls tell us what is the problem??????
>
> Thanks........
>
> Nilshan and Arpan
>
>
> Hello Ian and Thomas,
> Thank you for your quick reply.
> We will definitely try the suggested option to share the drive for the
> clusters..
> We will get in touch  soon..
> Thanks a ton.
>
> :rules:
>
> Nilshan and Arpan.
>
>
>
>
> Ian Boston wrote:
>>
>> I see Thomas has picked up the thread, and he knows far more about
>> this than I do, so listen to him more than me.
>>
>> 1. I see that the journal directory is  on the c: drive, do that mean
>> that both Jackrabbit instances are running on the same physical
>> machine ?
>> 2. It would be normal to put the local revision file with the local
>> repository storage eg
>>
>>
>> and the journal in a shared space.
>>
>>
>>
>> You may be getting name clashes between nodes as a result of using  
>> the
>> same directory for both the private and the public shared locations.
>>
>> ---
>>
>> The failure on the DB Journal looks like the DB connection is being
>> refused by the db server (url, username, password etc ).
>>
>> "Unable to create connection.: Unable to
>> create connection." is probably from the JDBC driver.
>>
>> Ian
>>
>>
>> On 31 Mar 2009, at 10:41, Nilshan wrote:
>>
>>>
>>> Hello Thomas,
>>>
>>> Thanks for the reply...
>>>
>>> Using FileJournal, we are facing the problem that is mentioned in  
>>> the
>>> previous message.....
>>>
>>> Using DatabaseJournal, we are facing the following error:-
>>>
>>>
>>> The following is the Error log while using DatabaseJournal..
>>>
>>> **********************************************************
>>> javax.jcr.RepositoryException: Unable to create connection.:  
>>> Unable to
>>> create connection.
>>> at
>>> org
>>> .apache
>>> .jackrabbit
>>> .core.RepositoryImpl.createClusterNode(RepositoryImpl.java:650)
>>> at
>>> org 
>>> .apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:
>>> 288)
>>> at
>>> org 
>>> .apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:
>>> 557)
>>> at
>>> org.apache.jackrabbit.core.TransientRepository
>>> $2.getRepository(TransientRepository.java:245)
>>> at
>>> org
>>> .apache
>>> .jackrabbit
>>> .core.TransientRepository.startRepository(TransientRepository.java:
>>> 265)
>>> at
>>> org
>>> .apache
>>> .jackrabbit.core.TransientRepository.login(TransientRepository.java:
>>> 333)
>>> at
>>> org
>>> .apache
>>> .jackrabbit.core.TransientRepository.login(TransientRepository.java:
>>> 363)
>>> at
>>> com
>>> .amicas
>>> .rulemanagement
>>> .RuleAssetManager.initializeRepository(RuleAssetManager.java:555)
>>> at
>>> com
>>> .amicas
>>> .rulemanagement.RuleAssetManager.getSession(RuleAssetManager.java: 
>>> 517)
>>> at
>>> com
>>> .amicas
>>> .rulemanagement
>>> .RuleAssetManager.getServiceImpl(RuleAssetManager.java:494)
>>> at
>>> com
>>> .amicas
>>> .rulemanagement
>>> .RuleAssetManager.categoryExists(RuleAssetManager.java:420)
>>> at
>>> com
>>> .amicas
>>> .rulemanagement
>>> .RuleAssetManager
>>> .initializeRuleRepoAndMetaConfiguration(RuleAssetManager.java:1718)
>>> at
>>> com
>>> .amicas
>>> .rulemanagement
>>> .RuleAssetManager.getRuleAssetManager(RuleAssetManager.java:167)
>>> at
>>> com
>>> .amicas
>>> .gwt
>>> .rulemanagement
>>> .servlet
>>> .RuleServiceServlet.getAllRuleByCategory(RuleServiceServlet.java: 
>>> 256)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>> at java.lang.reflect.Method.invoke(Unknown Source)
>>> at
>>> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
>>> 528)
>>> at
>>> com
>>> .google
>>> .gwt
>>> .user
>>> .server
>>> .rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
>>> at
>>> com
>>> .google
>>> .gwt
>>> .user
>>> .server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java: 
>>> 187)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>>> at
>>> org
>>> .apache
>>> .catalina
>>> .core
>>> .ApplicationFilterChain 
>>> .internalDoFilter(ApplicationFilterChain.java:
>>> 252)
>>> at
>>> org
>>> .apache
>>> .catalina
>>> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 
>>> 173)
>>> at
>>> org
>>> .springframework
>>> .orm
>>> .hibernate
>>> .support
>>> .OpenSessionInViewFilter
>>> .doFilterInternal(OpenSessionInViewFilter.java:172)
>>> at
>>> org
>>> .springframework
>>> .web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:
>>> 76)
>>> **********************************************************
>>>
>>> My configuration for the DatabaseJournal is also mentioned in the
>>> previous
>>> message....
>>>
>>> I hope that I have provided sufficient information to you.
>>> If we are missing anything, let us know....
>>>
>>>
>>> Thank You,
>>> Nilshan and Arpan.
>>>
>>>
>>>
>>>
>>>
>>> Thomas Müller-2 wrote:
>>>>
>>>> Hi,
>>>>
>>>>> I tried shared Journal (as it is must and clearly suggested on
>>>>> clustering
>>>>> wiki) but it didn't work.
>>>>
>>>> Could you tell us what the problem was?
>>>>
>>>> Regards,
>>>> Thomas
>>>>
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/JackRabbit_Clustering-tp22785285p22801622.html
>>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>>
>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/JackRabbit_Clustering-tp22785285p22820504.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>