Recently I downloaded the new version Keycloak 17.0.0 Quarkus distribution, unzipped and started the Keycloak server by running bin/kc.sh start-dev
from my local $KEYCLOAK_HOME directory in a CygWin Bash window. The server is up and running and I have configured my initial admin user. I am also able to login to the Keycloak UI.
There is no cloud environment yet, no fancy configuration, it's only the bare standalone quarkus impl.
Question: How can I gracefull stop/quit/terminate the Keycloak server process? (Ctrl+C does not help in this case, because this command is not really scriptable)
Before moving to v17 I started my experiments with v16.1.0 Wildfly distribution and I was using ${KEYCLOAK_HOME}/bin/jboss-cli.sh --connect --commands="shutdown,quit"
to terminate the server. But v17 (quarkus) does not contain the jboss-cli.sh script.
This may not be a graceful stoppage/shutdown but we can still use it in a script until we find a better way.
fuser : an utility to identify processes using files or sockets
If CygWin bash supports Linux fuser command you can try :
fuser -k 8080/tcp
Here is what I'm using on Linux
If keycloak is running on its default https port
If keycloak is running on its http default port
If you running keycloak on some_custom_prot