Closed drsarutobi8 closed 1 year ago
/cc @evanchooly (kotlin), @geoand (kotlin), @pedroigor (keycloak), @sberyozkin (keycloak)
I just tried this and it worked perfectly for me:
2023-05-19 10:03:15,659 INFO [org.tes.doc.DockerClientProviderStrategy] (build-38) Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
2023-05-19 10:03:15,856 INFO [org.tes.doc.DockerClientProviderStrategy] (build-38) Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
2023-05-19 10:03:15,857 INFO [org.tes.DockerClientFactory] (build-38) Docker host IP address is localhost
2023-05-19 10:03:15,865 INFO [org.tes.DockerClientFactory] (build-38) Connected to docker:
Server Version: 24.0.0
API Version: 1.43
Operating System: Ubuntu 22.04.2 LTS
Total Memory: 64230 MB
2023-05-19 10:03:15,872 INFO [org.tes.uti.ImageNameSubstitutor] (build-38) Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
2023-05-19 10:03:15,874 INFO [org.tes.DockerClientFactory] (build-38) Checking the system...
2023-05-19 10:03:15,874 INFO [org.tes.DockerClientFactory] (build-38) ✔︎ Docker server version should be at least 1.6.0
2023-05-19 10:03:15,886 INFO [io.qua.oid.dep.dev.key.KeycloakDevServicesProcessor] (build-38) Using Quarkus powered Keycloak distribution
2023-05-19 10:03:15,913 INFO [🐳 .io/.0.2]] (build-38) Creating container for image: quay.io/keycloak/keycloak:21.0.2
2023-05-19 10:03:15,915 INFO [org.tes.uti.RegistryAuthLocator] (build-38) Failure when attempting to lookup auth config. Please ignore if you don't have images in an authenticated registry. Details: (dockerImageName: quay.io/keycloak/keycloak:21.0.2, configFile: /home/gandrian/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /home/gandrian/.docker/config.json (No such file or directory)
2023-05-19 10:03:15,920 INFO [🐳 .3.4]] (build-38) Creating container for image: testcontainers/ryuk:0.3.4
2023-05-19 10:03:15,920 INFO [org.tes.uti.RegistryAuthLocator] (build-38) Failure when attempting to lookup auth config. Please ignore if you don't have images in an authenticated registry. Details: (dockerImageName: testcontainers/ryuk:0.3.4, configFile: /home/gandrian/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /home/gandrian/.docker/config.json (No such file or directory)
2023-05-19 10:03:15,979 INFO [🐳 .3.4]] (build-38) Container testcontainers/ryuk:0.3.4 is starting: 7423dcc9e9d0cb3d8212dbc8fa9d9f0333874cbc9e80450dbd503441c873f4aa
2023-05-19 10:03:16,233 INFO [🐳 .3.4]] (build-38) Container testcontainers/ryuk:0.3.4 started in PT0.313026198S
2023-05-19 10:03:16,245 INFO [🐳 .io/.0.2]] (build-38) Container quay.io/keycloak/keycloak:21.0.2 is starting: 1bfca39388b97cd51b3ada6ed52e91971a4346a012fedded5190363965e36f8a
2023-05-19 10:03:20,979 INFO [🐳 .io/.0.2]] (build-38) Container quay.io/keycloak/keycloak:21.0.2 started in PT5.091985938S
2023-05-19 10:03:21,721 INFO [io.qua.oid.dep.dev.key.KeycloakDevServicesProcessor] (build-38) Dev Services for Keycloak started.
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2023-05-19 10:03:22,301 WARN [io.qua.oid.run.TenantConfigContext] (vert.x-eventloop-thread-1) Secret key for encrypting tokens should be 32 characters long
2023-05-19 10:03:22,353 INFO [io.quarkus] (Quarkus Main Thread) code-with-quarkus 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.0.3.Final) started in 7.161s. Listening on: http://localhost:8080
2023-05-19 10:03:22,354 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2023-05-19 10:03:22,354 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, oidc, resteasy-reactive, security, smallrye-context-propagation, vertx]
Hi, thanks @geoand, missed that you already tried it :-), I was testing it too and yes, works for me.
My guess is, it may be taking awhile to download a Keycloak image, so @drsarutobi8 if you fetch it with docker
first before starting devmode it should work fine.
Or a global quarkus.devservices.timeout
property can help, set it for example to 2 mins (in Java Duration format)
@drsarutobi8 I've opened a PR to explain in the docs how to configure a timeout, it will resolve this issue once reviewed/approved, give it a go (or like I said above, get the image with the docker directly first) and re-open if still won't work, thanks
yes, after adding application.properties
quarkus.devservices.timeout=2m
it works now. Thank you so much. @geoand @sberyozkin
Describe the bug
Cannot start the devservice as described in https://quarkus.io/guides/security-openid-connect-dev-services
Expected behavior
Keycloak devservice started
Actual behavior
when run with ./gradlew quarkusDev
How to Reproduce?
create new quarkus project
cd inside project and then run
run quarkusDev
Output of
uname -a
orver
Linux mrwhite 5.19.0-41-generic #42~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 18 17:40:00 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "17.0.7" 2023-04-18 OpenJDK Runtime Environment (build 17.0.7+7-Ubuntu-0ubuntu122.04.2) OpenJDK 64-Bit Server VM (build 17.0.7+7-Ubuntu-0ubuntu122.04.2, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.0.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)------------------------------------------------------------ Gradle 8.1.1 ------------------------------------------------------------ Build time: 2023-04-21 12:31:26 UTC Revision: 1cf537a851c635c364a4214885f8b9798051175b Kotlin: 1.8.10 Groovy: 3.0.15 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 17.0.7 (Private Build 17.0.7+7-Ubuntu-0ubuntu122.04.2) OS: Linux 5.19.0-41-generic amd64
Additional information
this also happens with quarkus 2.16.7