Verbose error messages in Keycloak 17/Quarkus

I’m encountering a cryptic startup problem with a failure that happens intermittently. I can’t see anything useful (with DEBUG or INFO logging turned on), and the error messages tell me to use the --verbose option. Theoretically, it looks like there should be such an option (keycloak/Main.java at 17.0.0 · keycloak/keycloak · GitHub), but when I run it, I get Unknown option: '-v'.

[2022-03-18T16:53:52+01:00] 2022-03-18 15:53:52,606 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (production) mode
[2022-03-18T16:53:52+01:00] 2022-03-18 15:53:52,609 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.

Has anyone had any success getting the exception dumped when the cli startup fails?

Full startup log:

[2022-03-18T16:53:42+01:00] JAVA_OPTS already set in environment; overriding default settings with values: -XX:MaxRAMPercentage=90 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+DisableExplicitGC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true
[2022-03-18T16:53:48+01:00] 2022-03-18 15:53:48,309 INFO  [org.keycloak.common.Profile] (main) Preview feature enabled: admin_fine_grained_authz
[2022-03-18T16:53:48+01:00] 2022-03-18 15:53:48,311 WARN  [org.keycloak.common.Profile] (main) Experimental feature enabled: admin2
[2022-03-18T16:53:48+01:00] 2022-03-18 15:53:48,312 INFO  [org.keycloak.common.Profile] (main) Preview feature enabled: openshift_integration
[2022-03-18T16:53:48+01:00] 2022-03-18 15:53:48,314 INFO  [org.keycloak.common.Profile] (main) Preview feature enabled: scripts
[2022-03-18T16:53:48+01:00] 2022-03-18 15:53:48,314 INFO  [org.keycloak.common.Profile] (main) Preview feature enabled: token_exchange
[2022-03-18T16:53:48+01:00] 2022-03-18 15:53:48,315 INFO  [org.keycloak.common.Profile] (main) Preview feature enabled: declarative_user_profile
[2022-03-18T16:53:48+01:00] 2022-03-18 15:53:48,450 INFO  [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: FrontEnd: <request>, Strict HTTPS: true, Path: <request>, Strict BackChannel: false, Admin: <request>
[2022-03-18T16:53:49+01:00] 2022-03-18 15:53:49,713 WARN  [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
[2022-03-18T16:53:49+01:00] 2022-03-18 15:53:49,901 WARN  [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
[2022-03-18T16:53:49+01:00] 2022-03-18 15:53:49,928 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'
[2022-03-18T16:53:50+01:00] 2022-03-18 15:53:50,467 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000128: Infinispan version: Infinispan 'Triskaidekaphobia' 13.0.5.Final
[2022-03-18T16:53:50+01:00] 2022-03-18 15:53:50,867 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel `ISPN` with stack `jdbc-ping-tcp`
[2022-03-18T16:53:51+01:00] 2022-03-18 15:53:51,393 INFO  [org.jgroups.protocols.pbcast.GMS] (keycloak-cache-init) ip-10-0-10-76-33944: no members discovered after 164 ms: creating cluster as coordinator
[2022-03-18T16:53:51+01:00] 2022-03-18 15:53:51,554 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000094: Received new cluster view for channel ISPN: [ip-10-0-10-76-33944|0] (1) [ip-10-0-10-76-33944]
[2022-03-18T16:53:51+01:00] 2022-03-18 15:53:51,586 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000079: Channel `ISPN` local address is `ip-10-0-10-76-33944`, physical addresses are `[10.0.10.76:7800]`
[2022-03-18T16:53:52+01:00] 2022-03-18 15:53:52,398 INFO  [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: ip-10-0-10-76-33944, Site name: null
[2022-03-18T16:53:52+01:00] 2022-03-18 15:53:52,474 INFO  [org.infinispan.CLUSTER] (main) ISPN000080: Disconnecting JGroups channel `ISPN`
[2022-03-18T16:53:52+01:00] 2022-03-18 15:53:52,606 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (production) mode
[2022-03-18T16:53:52+01:00] 2022-03-18 15:53:52,609 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.

Ha! The answer is that you have to put the verbose flag before the command name.

So ./kc.sh -v start rather than ./kc.sh start -v

Hope that helps somebody else.