You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Liyaqat <li...@gmail.com> on 2011/08/25 09:36:07 UTC

Jackrabbit Cluster - Cannot overwrite redo.log

Hi All,

This is my first post on the forum so please excuse me if I may err. I am
currently trying to do the following:

Create two nodes that share the same jackrabbit document repository. I have
updated my the respective repository.xml files but I seem to be getting an
occasional error when i try to perform a few requests. I have attached my
repository.xml files.



http://jackrabbit.510166.n4.nabble.com/file/n3767562/repository_Node1.xml
repository_Node1.xml 
http://jackrabbit.510166.n4.nabble.com/file/n3767562/repository_Node2.xml
repository_Node2.xml 

*Error encountered:*

08:38:51,479 ERROR [SearchManager] Error indexing node.
java.io.IOException: Cannot overwrite:
C:\jboss-4.2.3.GA\server\default\data\repo\jackrabbit\workspaces\default\index\redo.log
        at
org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:440)
        at
org.apache.jackrabbit.core.query.lucene.RedoLog.initOut(RedoLog.java:173)
        at
org.apache.jackrabbit.core.query.lucene.RedoLog.append(RedoLog.java:138)
        at
org.apache.jackrabbit.core.query.lucene.MultiIndex.executeAndLog(MultiIndex.java:1001)
        at
org.apache.jackrabbit.core.query.lucene.MultiIndex.update(MultiIndex.java:420)
        at
org.apache.jackrabbit.core.query.lucene.SearchIndex.updateNodes(SearchIndex.java:588)
        at
org.apache.jackrabbit.core.SearchManager.onEvent(SearchManager.java:486)
        at
org.apache.jackrabbit.core.observation.EventConsumer.consumeEvents(EventConsumer.java:244)
        at
org.apache.jackrabbit.core.observation.ObservationDispatcher.dispatchEvents(ObservationDispatcher.java:201)
        at
org.apache.jackrabbit.core.observation.EventStateCollection.dispatch(EventStateCollection.java:474)
        at
org.apache.jackrabbit.core.state.SharedItemStateManager.externalUpdate(SharedItemStateManager.java:1188)
        at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.externalUpdate(RepositoryImpl.java:2193)
        at
org.apache.jackrabbit.core.cluster.ClusterNode.process(ClusterNode.java:869)
        at
org.apache.jackrabbit.core.cluster.ChangeLogRecord.process(ChangeLogRecord.java:507)
        at
org.apache.jackrabbit.core.cluster.ClusterNode.consume(ClusterNode.java:815)
        at
org.apache.jackrabbit.core.journal.AbstractJournal.doSync(AbstractJournal.java:214)
        at
org.apache.jackrabbit.core.journal.AbstractJournal.sync(AbstractJournal.java:188)
        at
org.apache.jackrabbit.core.cluster.ClusterNode.sync(ClusterNode.java:329)
        at
org.apache.jackrabbit.core.cluster.ClusterNode.run(ClusterNode.java:295)
        at java.lang.Thread.run(Thread.java:619)
08:38:51,536 INFO  [AbstractJournal] Synchronized to revision: 528518


Thanks


--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Jackrabbit-Cluster-Cannot-overwrite-redo-log-tp3767562p3767562.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: Jackrabbit Cluster - Cannot overwrite redo.log

Posted by Liyaqat <li...@gmail.com>.
Hi,

Thank you for the response. I am still very new to this so please excuse me
for the mistakes.

So when we use Jackrabbit clustering we need to set the following:
1. Datastore:
eg:
<DataStore class="org.apache.jackrabbit.core.data.FileDataStore">

</DataStore>

But now should this value be the same between nodes? This value is in my
jackrabbit repository of node2, how does this work? Should I create a
separate shared path? 

2. Cluster ID and Journal
eg:
<Cluster id="Node2">
<Journal class="org.apache.jackrabbit.core.journal.FileJournal">


</Journal>

Again, should the nodes share these value locations, do we not share the
journal and revision log?

3. FileSystems (Workspace, Version, and Global) should all refer to a unique
location per node? In my case I am using an Oracle DB, per FileSystem can I
use the same DB but different schema prefix?

4. Should all the SearchIndexs in repository.xml point to a seperate
location

In essence, does Clustering simply use the same Database
(PersistenceManager) that facilitates the lookup of the documents? These
documents can then be stored on the FileSystems appropriately. It does not
need to be on the same FileSystem?

If anyone has a second would they be able to look at my repository.xml files
and let me know what I have missed.

Kind regards,


5. 


--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Jackrabbit-Cluster-Cannot-overwrite-redo-log-tp3767562p3769512.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: Jackrabbit Cluster - Cannot overwrite redo.log

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Thu, Aug 25, 2011 at 12:01 PM, Liyaqat <li...@gmail.com> wrote:
> I highly suspect it is something with my configuration, Based on my
> understanding (which could be wrong) we have one workspace.xml since both
> nodes share the same jackrabbit physical folder structure?

No, they actually shouldn't share the on-disk folders. See [1]:

"Clustering in Jackrabbit works as follows: content is shared between
all cluster nodes. That means all Jackrabbit cluster nodes need access
to the *same* persistent storage (persistence manager, data store, and
repository file system). [...] However, each cluster node needs its
own (private) repository directory, including repository.xml file,
workspace FileSystem and Search index."

[1] http://wiki.apache.org/jackrabbit/Clustering

BR,

Jukka Zitting

Re: Jackrabbit Cluster - Cannot overwrite redo.log

Posted by Liyaqat <li...@gmail.com>.
Hi,

Thanks for the response, I turned the Antivirus off on both machines and
still seem to be getting the error.

I might of missed the top line of the error but here it is:

11:52:58,180 INFO  [ClusterNode] Processing revision: 1753587
11:52:58,223 ERROR [SearchManager] Error indexing node.
java.io.IOException: Cannot overwrite:
C:\jboss-4.2.3.GA\server\default\data\repo\jackrabbit\workspaces\default\index\redo.log
        at
org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:440)
        at
org.apache.jackrabbit.core.query.lucene.RedoLog.initOut(RedoLog.java:173)
        at
org.apache.jackrabbit.core.query.lucene.RedoLog.append(RedoLog.java:138)
        at
org.apache.jackrabbit.core.query.lucene.MultiIndex.executeAndLog(MultiIndex.java:1001)
        at
org.apache.jackrabbit.core.query.lucene.MultiIndex.update(MultiIndex.java:420)
        at
org.apache.jackrabbit.core.query.lucene.SearchIndex.updateNodes(SearchIndex.java:588)
        at
org.apache.jackrabbit.core.SearchManager.onEvent(SearchManager.java:486)
        at
org.apache.jackrabbit.core.observation.EventConsumer.consumeEvents(EventConsumer.java:244)
        at
org.apache.jackrabbit.core.observation.ObservationDispatcher.dispatchEvents(ObservationDispatcher.java:201)
        at
org.apache.jackrabbit.core.observation.EventStateCollection.dispatch(EventStateCollection.java:474)
        at
org.apache.jackrabbit.core.state.SharedItemStateManager.externalUpdate(SharedItemStateManager.java:1188)
        at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.externalUpdate(RepositoryImpl.java:2193)
        at
org.apache.jackrabbit.core.cluster.ClusterNode.process(ClusterNode.java:869)
        at
org.apache.jackrabbit.core.cluster.ChangeLogRecord.process(ChangeLogRecord.java:507)
        at
org.apache.jackrabbit.core.cluster.ClusterNode.consume(ClusterNode.java:815)
        at
org.apache.jackrabbit.core.journal.AbstractJournal.doSync(AbstractJournal.java:214)
        at
org.apache.jackrabbit.core.journal.AbstractJournal.sync(AbstractJournal.java:188)
        at
org.apache.jackrabbit.core.cluster.ClusterNode.sync(ClusterNode.java:329)
        at
org.apache.jackrabbit.core.cluster.ClusterNode.run(ClusterNode.java:295)
        at java.lang.Thread.run(Thread.java:619)
11:52:58,261 INFO  [AbstractJournal] Synchronized to revision: 1753587


I highly suspect it is something with my configuration, Based on my
understanding (which could be wrong) we have one workspace.xml since both
nodes share the same jackrabbit physical folder structure?
I have now attached my workspace.xml file 
http://jackrabbit.510166.n4.nabble.com/file/n3767833/workspace_node2.xml
workspace.xml 



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Jackrabbit-Cluster-Cannot-overwrite-redo-log-tp3767562p3767833.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: Jackrabbit Cluster - Cannot overwrite redo.log

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Thu, Aug 25, 2011 at 9:36 AM, Liyaqat <li...@gmail.com> wrote:
> 08:38:51,479 ERROR [SearchManager] Error indexing node.
> java.io.IOException: Cannot overwrite:
> C:\jboss-4.2.3.GA\server\default\data\repo\jackrabbit\workspaces\default\index\redo.log

Do you have an antivirus program running on that computer? On Windows
they sometimes prevent certain file operations while they check file
contents, which results in IOExceptions like this.

BR,

Jukka Zitting

Re: Jackrabbit Cluster - Cannot overwrite redo.log

Posted by Liyaqat <li...@gmail.com>.
I noticed, when I restart Node 2, the first time it works. After that I get
that error.

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Jackrabbit-Cluster-Cannot-overwrite-redo-log-tp3767562p3767582.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.