Hi Carlos,

On Fri, 2020-02-14 at 15:17 -0500, Carlos Munoz wrote:
> Thanks Robert (and once again I can't stress enough how grateful I am
> for
> all your help).
> 
> Right now we deploy our container with the expectation that the mongo
> db is
> the only necessary state we need to keep; everything else is
> throwaway.
> This means that a totally new container connected to the mongodb
> should
> pick up the state and run the same as the first time it was fired up.
> Do
> you think this is an incorrect assumption? If so, what are other
> pieces of
> state we should be keeping for subsequent restarts?

A MongoDB deployment should be able to support new Sling clients
connecting to it, and those won't have a 'sling' directory. Does the
problem happen if you:

1. Deploy MongoDB
2. Start Sling instance A, wait for it to start
3. Stop Sling instance A, wait for it to stop
4. Start Sling instance B

?

I'll try and replicate the setup from your previous email, but that may
take a while more, sorry.

> 
> This assumption has worked well for us with the current sling 11
> release,
> but it seems to break with the more up-to-date bundles. Perhaps
> running
> Sling in a container is just not meant to be.

Actually we've been doing quite a lot of that :-) So I definitely think
there is a way of doing that.

Thanks,
Robert

> 
> Regards,
> 
> Carlos
> 
> 
> On Fri, Feb 14, 2020 at 2:21 PM Robert Munteanu <romb...@apache.org>
> wrote:
> 
> > Hi Carlos,
> > 
> > On Fri, 2020-02-14 at 11:50 -0500, Carlos Munoz wrote:
> > > Thanks Bertrand. How can I run Sling with DEBUG-level logs for
> > > every
> > > bundle? I tried passing a few configuration arguments from the
> > > command line
> > > but nothing seemed to work.
> > 
> > Try configuring the LogManager to debug at
> > 
> > 
> > https://github.com/apache/sling-org-apache-sling-starter/blob/8ba34e28fbea2feb4c61767dde510aa94d86fa0a/src/main/provisioning/sling.txt#L138
> > 
> > Thanks,
> > Robert
> > 
> > > Carlos
> > > 
> > > On Fri, Feb 14, 2020 at 4:32 AM Bertrand Delacretaz <
> > > bdelacre...@apache.org>
> > > wrote:
> > > 
> > > > Hi,
> > > > 
> > > > On Thu, Feb 13, 2020 at 8:47 PM Carlos Munoz <
> > > > camu...@redhat.com>
> > > > wrote:
> > > > > ...Is there a reason why the Jcr repository could be
> > > > > restarting?
> > > > > And what
> > > > > class could we start looking into to debug if this is the
> > > > > case?...
> > > > 
> > > > It's not uncommon to see extra restarts of OSGi components at
> > > > startup,
> > > > for various reasons.
> > > > 
> > > > The simplest way to detect and log multiple repository startups
> > > > might
> > > > be to implement a SlingRepositoryInitializer service [1] that's
> > > > called
> > > > at every startup, or use the logs of an existing one like the
> > > > JCR
> > > > RepositoryInitializer [2] if that has anything to process in
> > > > your
> > > > system.
> > > > 
> > > > -Bertrand
> > > > 
> > > > [1]
> > > > 
> > https://sling.apache.org/documentation/bundles/repository-initialization.html#slingrepositoryinitializer
> > > > [2]
> > > > 
> > https://github.com/apache/sling-org-apache-sling-jcr-repoinit/blob/41dfe606f99ca71baee8d9054d3ec6e9b896b12e/src/main/java/org/apache/sling/jcr/repoinit/impl/RepositoryInitializer.java#L98
> > > > 

Reply via email to