[ 
https://issues.apache.org/jira/browse/SLING-9118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082925#comment-17082925
 ] 

Robert Munteanu commented on SLING-9118:
----------------------------------------

This is still on my to-do and the root cause is understood. I just need a bit 
more time to find the best approach for solving it.

The cause (similar to SLING-7811) is the repository service restarting due to 
the {{SecurityProviderRegistration}} unregistering and registering a new 
{{SecurityProvider}} service. This in turn stops the repository service and 
starts it again. Before SLING-7811 it failed with an NPE. After the (interim) 
solution from SLING-7811 it uses {{Thread#interrupt}} which is usually a good 
idea by strongly recommended against by Oak, see 
https://jackrabbit.apache.org/oak/docs/dos_and_donts.html . I suspect this is 
the root cause of the problems and am looking for a solution which allows the 
repository to be shut down during startup in a timely manner and without using 
interrupts.



> Sling fails to start when database exists but 'sling' directory is missing
> --------------------------------------------------------------------------
>
>                 Key: SLING-9118
>                 URL: https://issues.apache.org/jira/browse/SLING-9118
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Ben Radey
>            Assignee: Robert Munteanu
>            Priority: Major
>         Attachments: drop-mongo.sh, error.log, recreateSlingReplicaSet.sh, 
> run-mongo.sh, run-sling-initial.sh, run-sling-second.sh, 
> sling-startup-error.log.txt
>
>
> # Create a persistent mongodb to use with Sling.
>  # Start sling using the mongodb.
>  # Stop sling.
>  # Remove 'sling' directory.
>  # Attempt to restart sling. Ultimately, sling fails to start.
> ----
> Steps to reproduce with attached scripts:
> # Run [^run-mongo.sh] . This creates a MongoDB 3.6 container named 
> _mongo-sling_
> # Run [^run-sling-initial.sh]. This starts up Sling in the oak_mongo runmode, 
> shuts it down after it's (probably) started up
> # Run [^run-sling-second.sh]. This moves away the sling directory and starts 
> up a new instance. This always fails
> For cleanup, the [^drop-mongo.sh] script stops and removes the _mongo-sling_ 
> container.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to