[
https://issues.apache.org/jira/browse/SLING-9118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091192#comment-17091192
]
Oliver Lietz commented on SLING-9118:
-------------------------------------
I played around but cannot reproduce with Karaf (I noticed an issue with latest
Mongo driver and BSON and therefore downgraded the driver to 3.8.2).
Starting a MongoDB 3.6 via Docker:
{noformat}
beat:~ olli$ docker run -d -p 27017:27017 --name mongo-sling mongo:3.6
cb80a6ac5655b522fe5298aebfb50a744e70d0ad8fa160f31a4108322bc44265
{noformat}
Starting Karaf, installing features, stopping Karaf, removing {{sling}}
directory, starting Karaf, stopping Karaf:
{noformat}
beat:karaf olli$ ./bin/start
beat:karaf olli$ ssh -p 8101 karaf@localhost
The authenticity of host '[localhost]:8101 ([::1]:8101)' can't be established.
RSA key fingerprint is SHA256:jez2xahAD9h9zEG9qFD01m4UopbzZdvuVLlTA0KhEuc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[localhost]:8101' (RSA) to the list of known hosts.
Password authentication
Password:
__ __ ____
/ //_/____ __________ _/ __/
/ ,< / __ `/ ___/ __ `/ /_
/ /| |/ /_/ / / / /_/ / __/
/_/ |_|\__,_/_/ \__,_/_/
Apache Karaf (4.3.0-SNAPSHOT)
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit 'system:shutdown' to shutdown Karaf.
Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
karaf@root()> feature:install sling-quickstart-oak-mongo
karaf@root()> feature:install sling-starter-content
karaf@root()> shutdown
Confirm: halt instance root (yes/no): yes
karaf@root()> Connection to localhost closed by remote host.
Connection to localhost closed.
beat:karaf olli$ rm -fR sling/
beat:karaf olli$ ./bin/start
beat:karaf olli$ ./bin/stop
beat:karaf olli$
{noformat}
Getting root with curl after first and second start:
{noformat}
beat:~ olli$ curl -v http://localhost:8181
* Rebuilt URL to: http://localhost:8181/
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8181 (#0)
> GET / HTTP/1.1
> Host: localhost:8181
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 302 Found
< Location: /starter.html
< Transfer-Encoding: chunked
< Server: Jetty(9.4.22.v20191022)
<
* Connection #0 to host localhost left intact
beat:~ olli$ curl -v http://localhost:8181
* Rebuilt URL to: http://localhost:8181/
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8181 (#0)
> GET / HTTP/1.1
> Host: localhost:8181
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 302 Found
< Location: /starter.html
< Transfer-Encoding: chunked
< Server: Jetty(9.4.22.v20191022)
<
* Connection #0 to host localhost left intact
beat:~ olli$
{noformat}
> 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)