Repository navigation
How to stop the Keycloak server with Quarkus ? #13090
Replies: 7 comments 4 replies
|
Hello, I would also like to see a proper shutdown method for Keycloak. Currently on Windows, I need to use |
|
Hello, I would also like to see a way to shutdown keycloak(quarkus based) gracefully. |
|
Hello, |
|
I'm looking for the same thing. Seems incredible there is no official way to gracefully stop Keycloak... |
|
Hello, My request is similar, but I need to exit programatically from inside an SPI. of course system.exit() works, but then all my logging in jboss logger is not writteen (I have tried to slush it but I have found no method to do it), and using keycloakPlatform exit method does nothing. Any idea of what is the recomended way to gracefully shutdown KC from inside an SPI? |
|
Hello, I have found this, but I haven't found a way of accessing the Quarkus object from within ,my spi. I thought this is what the Platform would do for me, but obviously I missed something. Do you know how can I access this object from my SPI? |
|
My StackOverflow answer (based on some other one): my preferred solution is: ./keycloak-21.1.2/bin/kc.sh start-dev --http-port=8080 > keycloak.stdout 2>&1
echo -n "$!" > keycloak.pidStop: $ cat keycloak.pid | xargs kill -INTUse
So it looks that Keycloak was actually gracefully closed. |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I try to find how to stop Keycloak with a command line (and not a Ctrl+C command). It's easy to start the server with
kc.sh startbut how to stop it ?When I was on Keycloak 16, I used the command
jboss-cli.sh --connect command=:shutdownbut of course jboss-cli doesn't exist anymore with Quarkus.I saw we can save the pid in a file when we start the server and do a "cat" on it to kill it, but I hope for a cleaner solution.
Thanks for your help.
All reactions