Another thing to try would be:
bin/jboss-cli.sh --connect shutdown
This one will wait until first time boot is completed properly, and only
then perform a shutdown.
If it times out while waiting, the process will exit with error code, and
display a message:
Failed to connect to the controller: Timeout waiting for the system to boot.
On Wed, Jun 22, 2016 at 8:37 AM, Stian Thorgersen <sthorger(a)redhat.com>
wrote:
Initializing the database can take a while (1-2min), so you'd
need a
relatively long timeout on a first startup. Either pinging '
http://localhost:8080/auth/' or looking in the log would work just fine.
You can also use jboss-cli to check the status, for example to check if
server is started fully:
bin/jboss-cli.sh --connect ':read-attribute(name=server-state)'
Or check the status of Keycloak individually:
bin/jboss-cli.sh --connect 'deployment-info --name=keycloak-server.war'
An alternative is to use Liqubase to extract the SQL schema for your
database. That way Ansible can setup the database fully prior to starting
Keycloak in the first place. If you're interested in that approach let me
know and I'll let you know the details for that.
On 22 June 2016 at 00:46, John Dennis <jdennis(a)redhat.com> wrote:
> FYI, the following Jira issue was opened for this.
>
>
https://issues.jboss.org/browse/KEYCLOAK-3150
>
> --
> John
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-dev
>