Repository navigation
How to enable keycloak V 19 (Quarkus) as servlet (via undertow) and allow web app with the same https port (8443) #14810
wpfromshanghai
started this conversation in
Archive
Replies: 1 comment
|
That simply won't work, the point of Keycloak on Quarkus is not to have an external runtime environment. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
In Keycloak Wildfly, it can be run as servlet via undertow so that web app and keycloak can share the same port 8443. Now I moved to Keycloak Quarkus, and like to start quarkus as servlet as before, so that I can minimize code change.
I got "Unable to start HTTP server" error when I start web app first then keycloak after it, because 8443 was occupied by web app first. I can successfully start keycloak itself.
Thank you.
2022-10-09 14:51:40,712 INFO [org.jgroups.protocols.pbcast.GMS] (keycloak-cache-init) PXGYF6RR6G-9496: no members discovered after 2006 ms: creating cluster as coordinator
2022-10-09 14:51:40,727 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000094: Received new cluster view for channel ISPN: [PXGYF6RR6G-9496|0] (1) [PXGYF6RR6G-9496]
2022-10-09 14:51:40,731 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000079: Channel
ISPNlocal address isPXGYF6RR6G-9496, physical addresses are[192.168.0.54:60424]2022-10-09 14:51:41,023 INFO [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: PXGYF6RR6G-9496, Site name: null
2022-10-09 14:51:41,567 INFO [org.infinispan.CLUSTER] (main) ISPN000080: Disconnecting JGroups channel
ISPN2022-10-09 14:51:41,600 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (production) mode
2022-10-09 14:51:41,600 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) Error details:: java.lang.RuntimeException: Unable to start HTTP server
at io.quarkus.vertx.http.runtime.VertxHttpRecorder.doServerStart(VertxHttpRecorder.java:624)
at io.quarkus.vertx.http.runtime.VertxHttpRecorder.startServer(VertxHttpRecorder.java:282)
at io.quarkus.deployment.steps.VertxHttpProcessor$openSocket1866188241.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.VertxHttpProcessor$openSocket1866188241.deploy(Unknown Source)
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:103)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
at org.keycloak.quarkus.runtime.KeycloakMain.start(KeycloakMain.java:103)
at org.keycloak.quarkus.runtime.cli.command.AbstractStartCommand.run(AbstractStartCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
at picocli.CommandLine.execute(CommandLine.java:2078)
at org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun(Picocli.java:91)
at org.keycloak.quarkus.runtime.KeycloakMain.main(KeycloakMain.java:89)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:60)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:31)
Caused by: java.util.concurrent.ExecutionException: io.quarkus.runtime.QuarkusBindException
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
at io.quarkus.vertx.http.runtime.VertxHttpRecorder.doServerStart(VertxHttpRecorder.java:590)
... 25 more
Caused by: io.quarkus.runtime.QuarkusBindException
at io.quarkus.vertx.http.runtime.VertxHttpRecorder$15.handle(VertxHttpRecorder.java:575)
at io.quarkus.vertx.http.runtime.VertxHttpRecorder$15.handle(VertxHttpRecorder.java:566)
at io.vertx.core.impl.future.FutureImpl$3.onFailure(FutureImpl.java:153)
All reactions