You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Etile Basson <et...@googlemail.com> on 2010/10/28 14:56:55 UTC

Problem with Clustering Setup (PostgreSQL)

Hi,

I'm having a problem with a clustered jackrabbit setup, using version 1.6.2
on multiple Tomcats.

The Tomcats are using the same repository.xml (see below) and are all
started with -Dorg.apache.jackrabbit.core.cluster.node_id=`hostname -s`. I
can confirm that every Tomcat is using a distinct node_id.

Now to the problem: Sometimes (not in all cases) when an item is created on
one tomcat, that item is not visible on all other tomcats. There is often
just one tomcat that is unaware of the newly created item. I guess that
there is something wrong with the config. As a sidenote: We recently
upgraded from 1.5 to 1.6.2.

I checked the Wiki (http://wiki.apache.org/jackrabbit/Clustering) and
stumbled over the following bullet point under Requirements:

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).
>

Does it mean that the stuff under <Versioning> must not reside in the DB?

I also attached an example workspace.xml (which is the same on all Tomcats).

Any Hints?

Best Regards,
Etile

--repository.xml START (w/o comments)--
<?xml version="1.0"?>
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
Jackrabbit 1.2//EN"
                            "
http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
<Repository>
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
        <param name="path" value="${rep.home}/repository"/>
    </FileSystem>

    <Security appName="Jackrabbit">
        <AccessManager
class="org.apache.jackrabbit.core.security.SimpleAccessManager">
        </AccessManager>

        <LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule">
           <param name="anonymousId" value="anonymous"/>
        </LoginModule>
    </Security>

    <Workspaces rootPath="${rep.home}/workspaces"
defaultWorkspace="default"/>
    <Workspace name="${wsp.name}">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
            <param name="driver" value="org.postgresql.Driver" />
            <param name="url" value="${jackrabbit.repository.url}" />
            <param name="user" value="${jackrabbit.repository.user}" />
            <param name="password" value="${jackrabbit.repository.password}"
/>
            <param name="schema" value="postgresql"/>
            <param name="schemaObjectPrefix" value="J_FS_${wsp.name}_"/>
        </FileSystem>

        <PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
            <param name="driver" value="org.postgresql.Driver" />
        <param name="url" value="${jackrabbit.repository.url}" />
            <param name="user" value="${jackrabbit.repository.user}" />
            <param name="password" value="${jackrabbit.repository.password}"
/>
            <param name="schema" value="postgresql"/>
            <param name="schemaObjectPrefix" value="J_PM_${wsp.name}_" />
            <param name="externalBLOBs" value="false" />
        </PersistenceManager>

        <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
        </SearchIndex>
    </Workspace>

    <Versioning rootPath="${rep.home}/version">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
            <param name="driver" value="org.postgresql.Driver" />
        <param name="url" value="${jackrabbit.repository.url}" />
            <param name="user" value="${jackrabbit.repository.user}" />
            <param name="password" value="${jackrabbit.repository.password}"
/>
            <param name="schema" value="postgresql"/>
            <param name="schemaObjectPrefix" value="J_V_PM_" />
            <param name="schemaObjectPrefix" value="J_V_FS_"/>
        </FileSystem>

        <PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
            <param name="driver" value="org.postgresql.Driver" />
        <param name="url" value="${jackrabbit.repository.url}" />
            <param name="user" value="${jackrabbit.repository.user}" />
            <param name="password" value="${jackrabbit.repository.password}"
/>
            <param name="schema" value="postgresql"/>
            <param name="schemaObjectPrefix" value="J_V_PM_" />
            <param name="externalBLOBs" value="false" />
        </PersistenceManager>
    </Versioning>

    <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
        <param name="path" value="${rep.home}/repository/index"/>
    </SearchIndex>
</Repository>
--repository.xml END--

--workspace.xml START (w/o comments)--
<?xml version="1.0" encoding="UTF-8"?>
<Workspace name="default">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
            <param name="driver" value="org.postgresql.Driver"/>
        <param name="url" value="jdbc:postgresql://
database.example.com/elitecms?charSet=UTF-8"/>
            <param name="user" value="user"/>
            <param name="password" value="pass"/>
            <param name="schema" value="postgresql"/>
            <param name="schemaObjectPrefix" value="J_FS_${wsp.name}_"/>
        </FileSystem>

        <PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
            <param name="driver" value="org.postgresql.Driver"/>
        <param name="url" value="jdbc:postgresql://
database.example.com/cms?charSet=UTF-8"/>
            <param name="user" value="user"/>
            <param name="password" value="pass"/>
            <param name="schema" value="postgresql"/>
            <param name="schemaObjectPrefix" value="J_PM_${wsp.name}_"/>
            <param name="externalBLOBs" value="false"/>
        </PersistenceManager>

        <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
        </SearchIndex>
    </Workspace>
--workspace.xml END--

Re: Problem with Clustering Setup (PostgreSQL)

Posted by Justin Edelson <ju...@justinedelson.com>.
Writing to these resources should be relatively rare, but YMMV,
obviously...


On 11/5/10 1:14 PM, "Sergiy Shyrkov" <my...@gmail.com> wrote:

>Hello Justin,
>
>I am not sure NFS is a good option here as I see no way how the locking
>and concurrent access is working from several nodes to single file
>system location.
>I was always skeptical about sharing NFS resources for multiple nodes to
>write/read, unless a locking is implemented (e.g. like Apache Lucene
>does).
>Or I am missing here something and there is no concurrent access to
>these resources?
>
>Thank you in advance!
>
>Kind regards
>Sergiy
>
>On 05.11.2010 17:56, Justin Edelson wrote:
>> It could be an instance of LocalFileSystem, if the file system pointed
>>to
>> was shared by, for example, NFS or CIFS.
>>
>> But DbFileSystem is another way to do that.
>>
>> Justin
>>
>> On 11/5/10 12:22 PM, "Sergiy Shyrkov"<my...@gmail.com>
>>wrote:
>>
>>> Hello Etile,
>>>
>>> if I correctly understood the discussion and explanations in this
>>> thread, the repository-level file system should be shared in cluster,
>>> meaning it cannot be an instance of LocalFileSystem like in your case.
>>> It should rather be DbFileSystem.
>>> Am I right?
>>>
>>> Kind regards
>>> Sergiy
>>>
>>> On 05.11.2010 09:52, Etile Basson wrote:
>>>> Hi there,
>>>>
>>>> just want to thank Thomas and Justin for their worthful hints. I
>>>> managed to
>>>> get the jackrabbit cluster up and running with PostgreSQL. Please find
>>>> my
>>>> repository.xml below this text. Do you want me to attach it to the
>>>> corresponding wiki page? It think that it might serve as a good
>>>>example
>>>> for
>>>> anyone who wants to use clustering with PostgreSQL.
>>>>
>>>> --snip--
>>>> <?xml version="1.0"?>
>>>> <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
>>>> Jackrabbit 1.2//EN"
>>>>                               "
>>>> http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
>>>> <Repository>
>>>>       <Cluster>
>>>>           <Journal
>>>> class="org.apache.jackrabbit.core.journal.DatabaseJournal">
>>>>               <param name="revision" value="${rep.home}/revision.log"
>>>>/>
>>>>               <param name="driver" value="org.postgresql.Driver" />
>>>>               <param name="url" value="${jackrabbit.repository.url}"
>>>>/>
>>>>               <param name="user"
>>>>value="${jackrabbit.repository.user}" />
>>>>               <param name="password"
>>>> value="${jackrabbit.repository.password}"
>>>> />
>>>>               <param name="schema" value="postgresql"/>
>>>>               <param name="schemaObjectPrefix" value="J_C_"/>
>>>>           </Journal>
>>>>       </Cluster>
>>>>
>>>>       <FileSystem
>>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>>           <param name="path" value="${rep.home}/repository"/>
>>>>       </FileSystem>
>>>>
>>>>       <Security appName="Jackrabbit">
>>>>           <AccessManager
>>>> class="org.apache.jackrabbit.core.security.SimpleAccessManager">
>>>>           </AccessManager>
>>>>
>>>>           <LoginModule
>>>> class="org.apache.jackrabbit.core.security.SimpleLoginModule">
>>>>              <param name="anonymousId" value="anonymous"/>
>>>>           </LoginModule>
>>>>       </Security>
>>>>
>>>>       <Workspaces rootPath="${rep.home}/workspaces"
>>>> defaultWorkspace="default"/>
>>>>
>>>>       <Workspace name="${wsp.name}">
>>>>           <FileSystem
>>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>>               <param name="path" value="${wsp.home}/filesystem"/>
>>>>           </FileSystem>
>>>>
>>>>           <PersistenceManager
>>>> 
>>>>class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>>>>               <param name="driver" value="org.postgresql.Driver" />
>>>>           <param name="url" value="${jackrabbit.repository.url}" />
>>>>               <param name="user"
>>>>value="${jackrabbit.repository.user}" />
>>>>               <param name="password"
>>>> value="${jackrabbit.repository.password}"
>>>> />
>>>>               <param name="schema" value="postgresql"/>
>>>>               <param name="schemaObjectPrefix"
>>>>value="J_PM_${wsp.name}_"
>>>> />
>>>>               <param name="externalBLOBs" value="false" />
>>>>           </PersistenceManager>
>>>>
>>>>           <SearchIndex
>>>> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>>>>               <param name="path" value="${wsp.home}/index"/>
>>>>           </SearchIndex>
>>>>       </Workspace>
>>>>
>>>>       <Versioning rootPath="${rep.home}/version">
>>>>           <FileSystem
>>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>>               <param name="path" value="${rep.home}/version" />
>>>>           </FileSystem>
>>>>
>>>>           <PersistenceManager
>>>> 
>>>>class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>>>>               <param name="driver" value="org.postgresql.Driver" />
>>>>           <param name="url" value="${jackrabbit.repository.url}" />
>>>>               <param name="user"
>>>>value="${jackrabbit.repository.user}" />
>>>>               <param name="password"
>>>> value="${jackrabbit.repository.password}"
>>>> />
>>>>               <param name="schema" value="postgresql"/>
>>>>               <param name="schemaObjectPrefix" value="J_V_PM_" />
>>>>               <param name="externalBLOBs" value="false" />
>>>>           </PersistenceManager>
>>>>       </Versioning>
>>>>
>>>>       <SearchIndex
>>>> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>>>>           <param name="path" value="${rep.home}/repository/index"/>
>>>>       </SearchIndex>
>>>> </Repository>
>>>> --snap--
>>>>
>>>> Regards,
>>>> Etile
>>>>
>>>> On Thu, Oct 28, 2010 at 4:51 PM, Sergiy
>>>> Shyrkov<my.public.mailing@gmail.com
>>>>> wrote:
>>>>> Thank you for the prompt reply!
>>>>>
>>>>> Kind regards
>>>>> Sergiy
>>>>>
>>>>>
>>>>> On 28.10.2010 16:32, Thomas Müller wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>    Could you, please, give me some hints if there are any
>>>>>>advantages in
>>>>>>> using
>>>>>>> DatabaseFileSystem compared to LocalFileSystem?
>>>>>>>
>>>>>> Yes, in my view LocalFileSystem is appropriate. Only config files
>>>>>>are
>>>>>> stored in the FileSystem, no user data. LocalFileSystem is easier to
>>>>>> use and configure. Some people may want to avoid creating files in
>>>>>>the
>>>>>> file system, so they can use a database FileSystem.
>>>>>>
>>>>>>    I assume, the information about clustering configuration
>>>>>>> (http://wiki.apache.org/jackrabbit/Clustering ) is also valid for
>>>>>>> Jackarabbit 2.1.x/2.2.x. Is it correct?
>>>>>>>
>>>>>> Yes.
>>>>>>
>>>>>> Regards,
>>>>>> Thomas
>>>>>>
>>
>



Re: Problem with Clustering Setup (PostgreSQL)

Posted by Sergiy Shyrkov <my...@gmail.com>.
Hello Justin,

I am not sure NFS is a good option here as I see no way how the locking 
and concurrent access is working from several nodes to single file 
system location.
I was always skeptical about sharing NFS resources for multiple nodes to 
write/read, unless a locking is implemented (e.g. like Apache Lucene does).
Or I am missing here something and there is no concurrent access to 
these resources?

Thank you in advance!

Kind regards
Sergiy

On 05.11.2010 17:56, Justin Edelson wrote:
> It could be an instance of LocalFileSystem, if the file system pointed to
> was shared by, for example, NFS or CIFS.
>
> But DbFileSystem is another way to do that.
>
> Justin
>
> On 11/5/10 12:22 PM, "Sergiy Shyrkov"<my...@gmail.com>  wrote:
>
>> Hello Etile,
>>
>> if I correctly understood the discussion and explanations in this
>> thread, the repository-level file system should be shared in cluster,
>> meaning it cannot be an instance of LocalFileSystem like in your case.
>> It should rather be DbFileSystem.
>> Am I right?
>>
>> Kind regards
>> Sergiy
>>
>> On 05.11.2010 09:52, Etile Basson wrote:
>>> Hi there,
>>>
>>> just want to thank Thomas and Justin for their worthful hints. I
>>> managed to
>>> get the jackrabbit cluster up and running with PostgreSQL. Please find
>>> my
>>> repository.xml below this text. Do you want me to attach it to the
>>> corresponding wiki page? It think that it might serve as a good example
>>> for
>>> anyone who wants to use clustering with PostgreSQL.
>>>
>>> --snip--
>>> <?xml version="1.0"?>
>>> <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
>>> Jackrabbit 1.2//EN"
>>>                               "
>>> http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
>>> <Repository>
>>>       <Cluster>
>>>           <Journal
>>> class="org.apache.jackrabbit.core.journal.DatabaseJournal">
>>>               <param name="revision" value="${rep.home}/revision.log" />
>>>               <param name="driver" value="org.postgresql.Driver" />
>>>               <param name="url" value="${jackrabbit.repository.url}" />
>>>               <param name="user" value="${jackrabbit.repository.user}" />
>>>               <param name="password"
>>> value="${jackrabbit.repository.password}"
>>> />
>>>               <param name="schema" value="postgresql"/>
>>>               <param name="schemaObjectPrefix" value="J_C_"/>
>>>           </Journal>
>>>       </Cluster>
>>>
>>>       <FileSystem
>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>           <param name="path" value="${rep.home}/repository"/>
>>>       </FileSystem>
>>>
>>>       <Security appName="Jackrabbit">
>>>           <AccessManager
>>> class="org.apache.jackrabbit.core.security.SimpleAccessManager">
>>>           </AccessManager>
>>>
>>>           <LoginModule
>>> class="org.apache.jackrabbit.core.security.SimpleLoginModule">
>>>              <param name="anonymousId" value="anonymous"/>
>>>           </LoginModule>
>>>       </Security>
>>>
>>>       <Workspaces rootPath="${rep.home}/workspaces"
>>> defaultWorkspace="default"/>
>>>
>>>       <Workspace name="${wsp.name}">
>>>           <FileSystem
>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>               <param name="path" value="${wsp.home}/filesystem"/>
>>>           </FileSystem>
>>>
>>>           <PersistenceManager
>>> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>>>               <param name="driver" value="org.postgresql.Driver" />
>>>           <param name="url" value="${jackrabbit.repository.url}" />
>>>               <param name="user" value="${jackrabbit.repository.user}" />
>>>               <param name="password"
>>> value="${jackrabbit.repository.password}"
>>> />
>>>               <param name="schema" value="postgresql"/>
>>>               <param name="schemaObjectPrefix" value="J_PM_${wsp.name}_"
>>> />
>>>               <param name="externalBLOBs" value="false" />
>>>           </PersistenceManager>
>>>
>>>           <SearchIndex
>>> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>>>               <param name="path" value="${wsp.home}/index"/>
>>>           </SearchIndex>
>>>       </Workspace>
>>>
>>>       <Versioning rootPath="${rep.home}/version">
>>>           <FileSystem
>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>               <param name="path" value="${rep.home}/version" />
>>>           </FileSystem>
>>>
>>>           <PersistenceManager
>>> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>>>               <param name="driver" value="org.postgresql.Driver" />
>>>           <param name="url" value="${jackrabbit.repository.url}" />
>>>               <param name="user" value="${jackrabbit.repository.user}" />
>>>               <param name="password"
>>> value="${jackrabbit.repository.password}"
>>> />
>>>               <param name="schema" value="postgresql"/>
>>>               <param name="schemaObjectPrefix" value="J_V_PM_" />
>>>               <param name="externalBLOBs" value="false" />
>>>           </PersistenceManager>
>>>       </Versioning>
>>>
>>>       <SearchIndex
>>> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>>>           <param name="path" value="${rep.home}/repository/index"/>
>>>       </SearchIndex>
>>> </Repository>
>>> --snap--
>>>
>>> Regards,
>>> Etile
>>>
>>> On Thu, Oct 28, 2010 at 4:51 PM, Sergiy
>>> Shyrkov<my.public.mailing@gmail.com
>>>> wrote:
>>>> Thank you for the prompt reply!
>>>>
>>>> Kind regards
>>>> Sergiy
>>>>
>>>>
>>>> On 28.10.2010 16:32, Thomas Müller wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>>    Could you, please, give me some hints if there are any advantages in
>>>>>> using
>>>>>> DatabaseFileSystem compared to LocalFileSystem?
>>>>>>
>>>>> Yes, in my view LocalFileSystem is appropriate. Only config files are
>>>>> stored in the FileSystem, no user data. LocalFileSystem is easier to
>>>>> use and configure. Some people may want to avoid creating files in the
>>>>> file system, so they can use a database FileSystem.
>>>>>
>>>>>    I assume, the information about clustering configuration
>>>>>> (http://wiki.apache.org/jackrabbit/Clustering ) is also valid for
>>>>>> Jackarabbit 2.1.x/2.2.x. Is it correct?
>>>>>>
>>>>> Yes.
>>>>>
>>>>> Regards,
>>>>> Thomas
>>>>>
>


Re: Problem with Clustering Setup (PostgreSQL)

Posted by Justin Edelson <ju...@justinedelson.com>.
It could be an instance of LocalFileSystem, if the file system pointed to
was shared by, for example, NFS or CIFS.

But DbFileSystem is another way to do that.

Justin

On 11/5/10 12:22 PM, "Sergiy Shyrkov" <my...@gmail.com> wrote:

>Hello Etile,
>
>if I correctly understood the discussion and explanations in this
>thread, the repository-level file system should be shared in cluster,
>meaning it cannot be an instance of LocalFileSystem like in your case.
>It should rather be DbFileSystem.
>Am I right?
>
>Kind regards
>Sergiy
>
>On 05.11.2010 09:52, Etile Basson wrote:
>> Hi there,
>>
>> just want to thank Thomas and Justin for their worthful hints. I
>>managed to
>> get the jackrabbit cluster up and running with PostgreSQL. Please find
>>my
>> repository.xml below this text. Do you want me to attach it to the
>> corresponding wiki page? It think that it might serve as a good example
>>for
>> anyone who wants to use clustering with PostgreSQL.
>>
>> --snip--
>> <?xml version="1.0"?>
>> <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
>> Jackrabbit 1.2//EN"
>>                              "
>> http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
>> <Repository>
>>      <Cluster>
>>          <Journal
>>class="org.apache.jackrabbit.core.journal.DatabaseJournal">
>>              <param name="revision" value="${rep.home}/revision.log" />
>>              <param name="driver" value="org.postgresql.Driver" />
>>              <param name="url" value="${jackrabbit.repository.url}" />
>>              <param name="user" value="${jackrabbit.repository.user}" />
>>              <param name="password"
>>value="${jackrabbit.repository.password}"
>> />
>>              <param name="schema" value="postgresql"/>
>>              <param name="schemaObjectPrefix" value="J_C_"/>
>>          </Journal>
>>      </Cluster>
>>
>>      <FileSystem
>>class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>          <param name="path" value="${rep.home}/repository"/>
>>      </FileSystem>
>>
>>      <Security appName="Jackrabbit">
>>          <AccessManager
>> class="org.apache.jackrabbit.core.security.SimpleAccessManager">
>>          </AccessManager>
>>
>>          <LoginModule
>> class="org.apache.jackrabbit.core.security.SimpleLoginModule">
>>             <param name="anonymousId" value="anonymous"/>
>>          </LoginModule>
>>      </Security>
>>
>>      <Workspaces rootPath="${rep.home}/workspaces"
>> defaultWorkspace="default"/>
>>
>>      <Workspace name="${wsp.name}">
>>          <FileSystem
>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>              <param name="path" value="${wsp.home}/filesystem"/>
>>          </FileSystem>
>>
>>          <PersistenceManager
>> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>>              <param name="driver" value="org.postgresql.Driver" />
>>          <param name="url" value="${jackrabbit.repository.url}" />
>>              <param name="user" value="${jackrabbit.repository.user}" />
>>              <param name="password"
>>value="${jackrabbit.repository.password}"
>> />
>>              <param name="schema" value="postgresql"/>
>>              <param name="schemaObjectPrefix" value="J_PM_${wsp.name}_"
>>/>
>>              <param name="externalBLOBs" value="false" />
>>          </PersistenceManager>
>>
>>          <SearchIndex
>> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>>              <param name="path" value="${wsp.home}/index"/>
>>          </SearchIndex>
>>      </Workspace>
>>
>>      <Versioning rootPath="${rep.home}/version">
>>          <FileSystem
>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>              <param name="path" value="${rep.home}/version" />
>>          </FileSystem>
>>
>>          <PersistenceManager
>> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>>              <param name="driver" value="org.postgresql.Driver" />
>>          <param name="url" value="${jackrabbit.repository.url}" />
>>              <param name="user" value="${jackrabbit.repository.user}" />
>>              <param name="password"
>>value="${jackrabbit.repository.password}"
>> />
>>              <param name="schema" value="postgresql"/>
>>              <param name="schemaObjectPrefix" value="J_V_PM_" />
>>              <param name="externalBLOBs" value="false" />
>>          </PersistenceManager>
>>      </Versioning>
>>
>>      <SearchIndex
>> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>>          <param name="path" value="${rep.home}/repository/index"/>
>>      </SearchIndex>
>> </Repository>
>> --snap--
>>
>> Regards,
>> Etile
>>
>> On Thu, Oct 28, 2010 at 4:51 PM, Sergiy
>>Shyrkov<my.public.mailing@gmail.com
>>> wrote:
>>> Thank you for the prompt reply!
>>>
>>> Kind regards
>>> Sergiy
>>>
>>>
>>> On 28.10.2010 16:32, Thomas Müller wrote:
>>>
>>>> Hi,
>>>>
>>>>   Could you, please, give me some hints if there are any advantages in
>>>>> using
>>>>> DatabaseFileSystem compared to LocalFileSystem?
>>>>>
>>>> Yes, in my view LocalFileSystem is appropriate. Only config files are
>>>> stored in the FileSystem, no user data. LocalFileSystem is easier to
>>>> use and configure. Some people may want to avoid creating files in the
>>>> file system, so they can use a database FileSystem.
>>>>
>>>>   I assume, the information about clustering configuration
>>>>> (http://wiki.apache.org/jackrabbit/Clustering ) is also valid for
>>>>> Jackarabbit 2.1.x/2.2.x. Is it correct?
>>>>>
>>>> Yes.
>>>>
>>>> Regards,
>>>> Thomas
>>>>
>>>
>



Re: Problem with Clustering Setup (PostgreSQL)

Posted by Sergiy Shyrkov <my...@gmail.com>.
Hello Etile,

if I correctly understood the discussion and explanations in this 
thread, the repository-level file system should be shared in cluster,
meaning it cannot be an instance of LocalFileSystem like in your case. 
It should rather be DbFileSystem.
Am I right?

Kind regards
Sergiy

On 05.11.2010 09:52, Etile Basson wrote:
> Hi there,
>
> just want to thank Thomas and Justin for their worthful hints. I managed to
> get the jackrabbit cluster up and running with PostgreSQL. Please find my
> repository.xml below this text. Do you want me to attach it to the
> corresponding wiki page? It think that it might serve as a good example for
> anyone who wants to use clustering with PostgreSQL.
>
> --snip--
> <?xml version="1.0"?>
> <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
> Jackrabbit 1.2//EN"
>                              "
> http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
> <Repository>
>      <Cluster>
>          <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
>              <param name="revision" value="${rep.home}/revision.log" />
>              <param name="driver" value="org.postgresql.Driver" />
>              <param name="url" value="${jackrabbit.repository.url}" />
>              <param name="user" value="${jackrabbit.repository.user}" />
>              <param name="password" value="${jackrabbit.repository.password}"
> />
>              <param name="schema" value="postgresql"/>
>              <param name="schemaObjectPrefix" value="J_C_"/>
>          </Journal>
>      </Cluster>
>
>      <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>          <param name="path" value="${rep.home}/repository"/>
>      </FileSystem>
>
>      <Security appName="Jackrabbit">
>          <AccessManager
> class="org.apache.jackrabbit.core.security.SimpleAccessManager">
>          </AccessManager>
>
>          <LoginModule
> class="org.apache.jackrabbit.core.security.SimpleLoginModule">
>             <param name="anonymousId" value="anonymous"/>
>          </LoginModule>
>      </Security>
>
>      <Workspaces rootPath="${rep.home}/workspaces"
> defaultWorkspace="default"/>
>
>      <Workspace name="${wsp.name}">
>          <FileSystem
> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>              <param name="path" value="${wsp.home}/filesystem"/>
>          </FileSystem>
>
>          <PersistenceManager
> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>              <param name="driver" value="org.postgresql.Driver" />
>          <param name="url" value="${jackrabbit.repository.url}" />
>              <param name="user" value="${jackrabbit.repository.user}" />
>              <param name="password" value="${jackrabbit.repository.password}"
> />
>              <param name="schema" value="postgresql"/>
>              <param name="schemaObjectPrefix" value="J_PM_${wsp.name}_" />
>              <param name="externalBLOBs" value="false" />
>          </PersistenceManager>
>
>          <SearchIndex
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>              <param name="path" value="${wsp.home}/index"/>
>          </SearchIndex>
>      </Workspace>
>
>      <Versioning rootPath="${rep.home}/version">
>          <FileSystem
> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>              <param name="path" value="${rep.home}/version" />
>          </FileSystem>
>
>          <PersistenceManager
> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>              <param name="driver" value="org.postgresql.Driver" />
>          <param name="url" value="${jackrabbit.repository.url}" />
>              <param name="user" value="${jackrabbit.repository.user}" />
>              <param name="password" value="${jackrabbit.repository.password}"
> />
>              <param name="schema" value="postgresql"/>
>              <param name="schemaObjectPrefix" value="J_V_PM_" />
>              <param name="externalBLOBs" value="false" />
>          </PersistenceManager>
>      </Versioning>
>
>      <SearchIndex
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>          <param name="path" value="${rep.home}/repository/index"/>
>      </SearchIndex>
> </Repository>
> --snap--
>
> Regards,
> Etile
>
> On Thu, Oct 28, 2010 at 4:51 PM, Sergiy Shyrkov<my.public.mailing@gmail.com
>> wrote:
>> Thank you for the prompt reply!
>>
>> Kind regards
>> Sergiy
>>
>>
>> On 28.10.2010 16:32, Thomas Müller wrote:
>>
>>> Hi,
>>>
>>>   Could you, please, give me some hints if there are any advantages in
>>>> using
>>>> DatabaseFileSystem compared to LocalFileSystem?
>>>>
>>> Yes, in my view LocalFileSystem is appropriate. Only config files are
>>> stored in the FileSystem, no user data. LocalFileSystem is easier to
>>> use and configure. Some people may want to avoid creating files in the
>>> file system, so they can use a database FileSystem.
>>>
>>>   I assume, the information about clustering configuration
>>>> (http://wiki.apache.org/jackrabbit/Clustering ) is also valid for
>>>> Jackarabbit 2.1.x/2.2.x. Is it correct?
>>>>
>>> Yes.
>>>
>>> Regards,
>>> Thomas
>>>
>>


Re: Problem with Clustering Setup (PostgreSQL)

Posted by Etile Basson <et...@googlemail.com>.
Hi there,

just want to thank Thomas and Justin for their worthful hints. I managed to
get the jackrabbit cluster up and running with PostgreSQL. Please find my
repository.xml below this text. Do you want me to attach it to the
corresponding wiki page? It think that it might serve as a good example for
anyone who wants to use clustering with PostgreSQL.

--snip--
<?xml version="1.0"?>
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
Jackrabbit 1.2//EN"
                            "
http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
<Repository>
    <Cluster>
        <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
            <param name="revision" value="${rep.home}/revision.log" />
            <param name="driver" value="org.postgresql.Driver" />
            <param name="url" value="${jackrabbit.repository.url}" />
            <param name="user" value="${jackrabbit.repository.user}" />
            <param name="password" value="${jackrabbit.repository.password}"
/>
            <param name="schema" value="postgresql"/>
            <param name="schemaObjectPrefix" value="J_C_"/>
        </Journal>
    </Cluster>

    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
        <param name="path" value="${rep.home}/repository"/>
    </FileSystem>

    <Security appName="Jackrabbit">
        <AccessManager
class="org.apache.jackrabbit.core.security.SimpleAccessManager">
        </AccessManager>

        <LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule">
           <param name="anonymousId" value="anonymous"/>
        </LoginModule>
    </Security>

    <Workspaces rootPath="${rep.home}/workspaces"
defaultWorkspace="default"/>

    <Workspace name="${wsp.name}">
        <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${wsp.home}/filesystem"/>
        </FileSystem>

        <PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
            <param name="driver" value="org.postgresql.Driver" />
        <param name="url" value="${jackrabbit.repository.url}" />
            <param name="user" value="${jackrabbit.repository.user}" />
            <param name="password" value="${jackrabbit.repository.password}"
/>
            <param name="schema" value="postgresql"/>
            <param name="schemaObjectPrefix" value="J_PM_${wsp.name}_" />
            <param name="externalBLOBs" value="false" />
        </PersistenceManager>

        <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
        </SearchIndex>
    </Workspace>

    <Versioning rootPath="${rep.home}/version">
        <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${rep.home}/version" />
        </FileSystem>

        <PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
            <param name="driver" value="org.postgresql.Driver" />
        <param name="url" value="${jackrabbit.repository.url}" />
            <param name="user" value="${jackrabbit.repository.user}" />
            <param name="password" value="${jackrabbit.repository.password}"
/>
            <param name="schema" value="postgresql"/>
            <param name="schemaObjectPrefix" value="J_V_PM_" />
            <param name="externalBLOBs" value="false" />
        </PersistenceManager>
    </Versioning>

    <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
        <param name="path" value="${rep.home}/repository/index"/>
    </SearchIndex>
</Repository>
--snap--

Regards,
Etile

On Thu, Oct 28, 2010 at 4:51 PM, Sergiy Shyrkov <my.public.mailing@gmail.com
> wrote:

> Thank you for the prompt reply!
>
> Kind regards
> Sergiy
>
>
> On 28.10.2010 16:32, Thomas Müller wrote:
>
>> Hi,
>>
>>  Could you, please, give me some hints if there are any advantages in
>>> using
>>> DatabaseFileSystem compared to LocalFileSystem?
>>>
>> Yes, in my view LocalFileSystem is appropriate. Only config files are
>> stored in the FileSystem, no user data. LocalFileSystem is easier to
>> use and configure. Some people may want to avoid creating files in the
>> file system, so they can use a database FileSystem.
>>
>>  I assume, the information about clustering configuration
>>> (http://wiki.apache.org/jackrabbit/Clustering ) is also valid for
>>> Jackarabbit 2.1.x/2.2.x. Is it correct?
>>>
>> Yes.
>>
>> Regards,
>> Thomas
>>
>
>

Re: Problem with Clustering Setup (PostgreSQL)

Posted by Sergiy Shyrkov <my...@gmail.com>.
Thank you for the prompt reply!

Kind regards
Sergiy

On 28.10.2010 16:32, Thomas Müller wrote:
> Hi,
>
>> Could you, please, give me some hints if there are any advantages in using
>> DatabaseFileSystem compared to LocalFileSystem?
> Yes, in my view LocalFileSystem is appropriate. Only config files are
> stored in the FileSystem, no user data. LocalFileSystem is easier to
> use and configure. Some people may want to avoid creating files in the
> file system, so they can use a database FileSystem.
>
>> I assume, the information about clustering configuration
>> (http://wiki.apache.org/jackrabbit/Clustering ) is also valid for
>> Jackarabbit 2.1.x/2.2.x. Is it correct?
> Yes.
>
> Regards,
> Thomas


Re: Problem with Clustering Setup (PostgreSQL)

Posted by Thomas Müller <th...@day.com>.
Hi,

> Could you, please, give me some hints if there are any advantages in using
> DatabaseFileSystem compared to LocalFileSystem?

Yes, in my view LocalFileSystem is appropriate. Only config files are
stored in the FileSystem, no user data. LocalFileSystem is easier to
use and configure. Some people may want to avoid creating files in the
file system, so they can use a database FileSystem.

> I assume, the information about clustering configuration
> (http://wiki.apache.org/jackrabbit/Clustering ) is also valid for
> Jackarabbit 2.1.x/2.2.x. Is it correct?

Yes.

Regards,
Thomas

Re: Problem with Clustering Setup (PostgreSQL)

Posted by Sergiy Shyrkov <my...@gmail.com>.
Hello Thomas,

thank you for the clarifications!

In that sense it means that using DatabaseFileSystem implementations in 
cluster produces a lot of configuration overhead as for each cluster node
(and each workspace + versioning) we need to manually create a separate 
DB schema or at least separate DB tables.
"Manually" in our case is unfortunately a consequence of the technical 
(security) limitations of our customers.
They run an application with a DB user, who has no permissions to create 
tables on-the-fly (during runtime).
That is why the Jackrabbit DB schema is created once by a DB administrator.

Could you, please, give me some hints if there are any advantages in 
using DatabaseFileSystem compared to LocalFileSystem?
As in our case it seems the LocalFileSystem is more appropriate solution 
at least from cluster configuration point of view.

I assume, the information about clustering configuration 
(http://wiki.apache.org/jackrabbit/Clustering ) is also valid for 
Jackarabbit 2.1.x/2.2.x. Is it correct?

Thank you in advance!

Kind Regards
Sergiy

On 28.10.2010 15:04, Thomas Müller wrote:
> Hi,
>
>>> 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).
>> Does it mean that the stuff under<Versioning>  must not reside in the DB?
> No, it means each cluster node needs its own FileSystem. That can be a
> DbFileSystem, but it needs to be its own (not a shared one).
>
>>         <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
>>             <param name="driver" value="org.postgresql.Driver" />
>>             <param name="url" value="${jackrabbit.repository.url}" />
>>             <param name="user" value="${jackrabbit.repository.user}" />
>>             <param name="password" value="${jackrabbit.repository.password}"
> This is a shared one. Its own (private) means use a different database
> (or schema) for each cluster node, for example:
>
>          <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
>              <param name="driver" value="org.postgresql.Driver" />
>              <param name="url"
> value="${jackrabbit.repository.url}${clusterNodeId}" />
>              <param name="user" value="${jackrabbit.repository.user}" />
>              <param name="password" value="${jackrabbit.repository.password}"
>
> Node the added "${clusterNodeId}".
>
> Regards,
> Thomas


Re: Problem with Clustering Setup (PostgreSQL)

Posted by Thomas Müller <th...@day.com>.
Hi,

> Can I use the following Version directive in the repository.xml?

Yes, that should work.

Regards,
Thomas

Re: Problem with Clustering Setup (PostgreSQL)

Posted by Etile Basson <et...@googlemail.com>.
Hi,

The persistence manager on all cluster nodes need to point to the same
> database.
>

Ok, just to sum it up:

Can I use the following Version directive in the repository.xml?

<Versioning rootPath="${rep.home}/version">

    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
        <param name="path" value="${rep.home}/version" />
    </FileSystem>

    <PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
        <param name="driver" value="org.postgresql.Driver" />
    <param name="url" value="${jackrabbit.repository.url}" />
        <param name="user" value="${jackrabbit.repository.user}" />
        <param name="password" value="${jackrabbit.repository.password}" />
        <param name="schema" value="postgresql"/>
        <param name="schemaObjectPrefix" value="J_V_PM_" />
        <param name="externalBLOBs" value="false" />
    </PersistenceManager>

</Versioning>


Regards,
Etile

Re: Problem with Clustering Setup (PostgreSQL)

Posted by Thomas Müller <th...@day.com>.
Hi,

> Is it sufficient to use the default Versioning declaration, as seen in the
> default configuration (
> http://jackrabbit.apache.org/jackrabbit-configuration.data/repository.xml)?:
>
> <Versioning rootPath="${rep.home}/version">
>
>    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>        <param name="path" value="${rep.home}/version" />
>    </FileSystem>
>
>    <PersistenceManager
> class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
>      <param name="url"
> value="jdbc:derby:${rep.home}/version/db;create=true"/>
>      <param name="schemaObjectPrefix" value="version_"/>
>    </PersistenceManager>

The persistence manager on all cluster nodes need to point to the same database.

Regards,
Thomas

Re: Problem with Clustering Setup (PostgreSQL)

Posted by Etile Basson <et...@googlemail.com>.
Hi,

On Thu, Oct 28, 2010 at 3:04 PM, Thomas Müller <th...@day.com>wrote:

> Hi,
>
> >> 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).
>
> > Does it mean that the stuff under <Versioning> must not reside in the DB?
>
> No, it means each cluster node needs its own FileSystem. That can be a
> DbFileSystem, but it needs to be its own (not a shared one).
>

Good to know. Then I'll go for a simple Derby-Implementation as I see no
advantage in using the shared DB for that one.

 >        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
> >            <param name="driver" value="org.postgresql.Driver" />
> >            <param name="url" value="${jackrabbit.repository.url}" />
> >            <param name="user" value="${jackrabbit.repository.user}" />
> >            <param name="password"
> value="${jackrabbit.repository.password}"
>
> This is a shared one. Its own (private) means use a different database
> (or schema) for each cluster node, for example:
>
>        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
>            <param name="driver" value="org.postgresql.Driver" />
>            <param name="url"
> value="${jackrabbit.repository.url}${clusterNodeId}" />
>             <param name="user" value="${jackrabbit.repository.user}" />
>            <param name="password" value="${jackrabbit.repository.password}"
>
> Node the added "${clusterNodeId}".
>

Is it sufficient to use the default Versioning declaration, as seen in the
default configuration (
http://jackrabbit.apache.org/jackrabbit-configuration.data/repository.xml)?:

<Versioning rootPath="${rep.home}/version">

    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
        <param name="path" value="${rep.home}/version" />
    </FileSystem>

    <PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
      <param name="url"
value="jdbc:derby:${rep.home}/version/db;create=true"/>
      <param name="schemaObjectPrefix" value="version_"/>
    </PersistenceManager>

</Versioning>

Regards,
Etile

Re: Problem with Clustering Setup (PostgreSQL)

Posted by Thomas Müller <th...@day.com>.
Hi,

>> 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).

> Does it mean that the stuff under <Versioning> must not reside in the DB?

No, it means each cluster node needs its own FileSystem. That can be a
DbFileSystem, but it needs to be its own (not a shared one).

>        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
>            <param name="driver" value="org.postgresql.Driver" />
>            <param name="url" value="${jackrabbit.repository.url}" />
>            <param name="user" value="${jackrabbit.repository.user}" />
>            <param name="password" value="${jackrabbit.repository.password}"

This is a shared one. Its own (private) means use a different database
(or schema) for each cluster node, for example:

        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
            <param name="driver" value="org.postgresql.Driver" />
            <param name="url"
value="${jackrabbit.repository.url}${clusterNodeId}" />
            <param name="user" value="${jackrabbit.repository.user}" />
            <param name="password" value="${jackrabbit.repository.password}"

Node the added "${clusterNodeId}".

Regards,
Thomas

Re: Problem with Clustering Setup (PostgreSQL)

Posted by Etile Basson <et...@googlemail.com>.
Hi,

This is only needed in the repository.xml file (I think this is documented).
>

I just faceplamed when I saw that somehow my repository.xml file got busted
during the last jackrabbit upgrade. I used to have a Cluster directive like
the following.

<Cluster>
        <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
                <param name="revision" value="${rep.home}/revision.log" />
                <param name="driver" value="org.postgresql.Driver" />
                <param name="url" value="${jackrabbit.repository.url}" />
                <param name="user" value="${jackrabbit.repository.user}" />
                <param name="password"
value="${jackrabbit.repository.password}" />
                <param name="schema" value="postgresql"/>
                <param name="schemaObjectPrefix" value="J_C_"/>
        </Journal>
</Cluster>

I will now readd this directive and change the FileSystem under Versioning
as suggested.

Wouldn't it be great if the Wiki had a sample configuration file for a
clustering setup via Postgres? I'd offer mine.

Regards,
Etile

Re: Problem with Clustering Setup (PostgreSQL)

Posted by Thomas Müller <th...@day.com>.
Hi,

> Do I need really need those Cluster configurations? I guess you are talking
> about those entries:
>
> <Cluster id="node1" syncDelay="2000">
>>   <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
>>     <param name="revision" value="${rep.home}/revision.log" />
>>     <param name="driver" value="javax.naming.InitialContext"/>
>>     <param name="url" value="java:jdbc/Workspace"/>
>>     <param name="databaseType" value="postgresql"/>
>>   </Journal>
>> </Cluster>
>
> Do I need a Cluster directive in every workspace.xml (Guess, I'll need a
> distinct id attribute here for every node)?

This is only needed in the repository.xml file (I think this is documented).

Regards,
Thomas

Re: Problem with Clustering Setup (PostgreSQL)

Posted by Etile Basson <et...@googlemail.com>.
Hi,

On Thu, Oct 28, 2010 at 3:10 PM, Justin Edelson <ju...@justinedelson.com>wrote:

> Unless I'm missing something (always a possibility), your repository.xml is
> missing the Cluster configuration entirely. That's probably a major source
> of your issue.
>

Do I need really need those Cluster configurations? I guess you are talking
about those entries:

<Cluster id="node1" syncDelay="2000">
>   <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
>     <param name="revision" value="${rep.home}/revision.log" />
>     <param name="driver" value="javax.naming.InitialContext"/>
>     <param name="url" value="java:jdbc/Workspace"/>
>     <param name="databaseType" value="postgresql"/>
>   </Journal>
> </Cluster>


Do I need a Cluster directive in every workspace.xml (Guess, I'll need a
distinct id attribute here for every node)?

Regards,
Etile

Re: Problem with Clustering Setup (PostgreSQL)

Posted by Justin Edelson <ju...@justinedelson.com>.
Unless I'm missing something (always a possibility), your repository.xml is missing the Cluster configuration entirely. That's probably a major source of your issue.

Justin
 
On Oct 28, 2010, at 8:56 AM, Etile Basson wrote:

> Hi,
> 
> I'm having a problem with a clustered jackrabbit setup, using version 1.6.2
> on multiple Tomcats.
> 
> The Tomcats are using the same repository.xml (see below) and are all
> started with -Dorg.apache.jackrabbit.core.cluster.node_id=`hostname -s`. I
> can confirm that every Tomcat is using a distinct node_id.
> 
> Now to the problem: Sometimes (not in all cases) when an item is created on
> one tomcat, that item is not visible on all other tomcats. There is often
> just one tomcat that is unaware of the newly created item. I guess that
> there is something wrong with the config. As a sidenote: We recently
> upgraded from 1.5 to 1.6.2.
> 
> I checked the Wiki (http://wiki.apache.org/jackrabbit/Clustering) and
> stumbled over the following bullet point under Requirements:
> 
> 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).
>> 
> 
> Does it mean that the stuff under <Versioning> must not reside in the DB?
> 
> I also attached an example workspace.xml (which is the same on all Tomcats).
> 
> Any Hints?
> 
> Best Regards,
> Etile
> 
> --repository.xml START (w/o comments)--
> <?xml version="1.0"?>
> <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
> Jackrabbit 1.2//EN"
>                            "
> http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
> <Repository>
>    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>        <param name="path" value="${rep.home}/repository"/>
>    </FileSystem>
> 
>    <Security appName="Jackrabbit">
>        <AccessManager
> class="org.apache.jackrabbit.core.security.SimpleAccessManager">
>        </AccessManager>
> 
>        <LoginModule
> class="org.apache.jackrabbit.core.security.SimpleLoginModule">
>           <param name="anonymousId" value="anonymous"/>
>        </LoginModule>
>    </Security>
> 
>    <Workspaces rootPath="${rep.home}/workspaces"
> defaultWorkspace="default"/>
>    <Workspace name="${wsp.name}">
>        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
>            <param name="driver" value="org.postgresql.Driver" />
>            <param name="url" value="${jackrabbit.repository.url}" />
>            <param name="user" value="${jackrabbit.repository.user}" />
>            <param name="password" value="${jackrabbit.repository.password}"
> />
>            <param name="schema" value="postgresql"/>
>            <param name="schemaObjectPrefix" value="J_FS_${wsp.name}_"/>
>        </FileSystem>
> 
>        <PersistenceManager
> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>            <param name="driver" value="org.postgresql.Driver" />
>        <param name="url" value="${jackrabbit.repository.url}" />
>            <param name="user" value="${jackrabbit.repository.user}" />
>            <param name="password" value="${jackrabbit.repository.password}"
> />
>            <param name="schema" value="postgresql"/>
>            <param name="schemaObjectPrefix" value="J_PM_${wsp.name}_" />
>            <param name="externalBLOBs" value="false" />
>        </PersistenceManager>
> 
>        <SearchIndex
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>            <param name="path" value="${wsp.home}/index"/>
>        </SearchIndex>
>    </Workspace>
> 
>    <Versioning rootPath="${rep.home}/version">
>        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
>            <param name="driver" value="org.postgresql.Driver" />
>        <param name="url" value="${jackrabbit.repository.url}" />
>            <param name="user" value="${jackrabbit.repository.user}" />
>            <param name="password" value="${jackrabbit.repository.password}"
> />
>            <param name="schema" value="postgresql"/>
>            <param name="schemaObjectPrefix" value="J_V_PM_" />
>            <param name="schemaObjectPrefix" value="J_V_FS_"/>
>        </FileSystem>
> 
>        <PersistenceManager
> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>            <param name="driver" value="org.postgresql.Driver" />
>        <param name="url" value="${jackrabbit.repository.url}" />
>            <param name="user" value="${jackrabbit.repository.user}" />
>            <param name="password" value="${jackrabbit.repository.password}"
> />
>            <param name="schema" value="postgresql"/>
>            <param name="schemaObjectPrefix" value="J_V_PM_" />
>            <param name="externalBLOBs" value="false" />
>        </PersistenceManager>
>    </Versioning>
> 
>    <SearchIndex
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>        <param name="path" value="${rep.home}/repository/index"/>
>    </SearchIndex>
> </Repository>
> --repository.xml END--
> 
> --workspace.xml START (w/o comments)--
> <?xml version="1.0" encoding="UTF-8"?>
> <Workspace name="default">
>        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
>            <param name="driver" value="org.postgresql.Driver"/>
>        <param name="url" value="jdbc:postgresql://
> database.example.com/elitecms?charSet=UTF-8"/>
>            <param name="user" value="user"/>
>            <param name="password" value="pass"/>
>            <param name="schema" value="postgresql"/>
>            <param name="schemaObjectPrefix" value="J_FS_${wsp.name}_"/>
>        </FileSystem>
> 
>        <PersistenceManager
> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>            <param name="driver" value="org.postgresql.Driver"/>
>        <param name="url" value="jdbc:postgresql://
> database.example.com/cms?charSet=UTF-8"/>
>            <param name="user" value="user"/>
>            <param name="password" value="pass"/>
>            <param name="schema" value="postgresql"/>
>            <param name="schemaObjectPrefix" value="J_PM_${wsp.name}_"/>
>            <param name="externalBLOBs" value="false"/>
>        </PersistenceManager>
> 
>        <SearchIndex
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>            <param name="path" value="${wsp.home}/index"/>
>        </SearchIndex>
>    </Workspace>
> --workspace.xml END--