maestro icon indicating copy to clipboard operation
maestro copied to clipboard

Gradle Build Error - Unable to Find Valid Docker Environment...

Open takuhii opened this issue 1 year ago • 7 comments

> ./gradlew build

> Task :cockroachdb-persistence:test

CockroachDBEventHandlerDAOTest > classMethod FAILED
    com.zaxxer.hikari.pool.HikariPool$PoolInitializationException at HikariPool.java:596
        Caused by: java.lang.IllegalStateException at DockerClientProviderStrategy.java:277

CockroachDBExecutionDAOTest > classMethod FAILED
    com.zaxxer.hikari.pool.HikariPool$PoolInitializationException at HikariPool.java:596
        Caused by: java.lang.IllegalStateException at DockerClientProviderStrategy.java:232

CockroachDBIndexDAOTest > classMethod FAILED
    com.zaxxer.hikari.pool.HikariPool$PoolInitializationException at HikariPool.java:596
        Caused by: java.lang.IllegalStateException at DockerClientProviderStrategy.java:232

CockroachDBMetadataDAOTest > classMethod FAILED
    com.zaxxer.hikari.pool.HikariPool$PoolInitializationException at HikariPool.java:596
        Caused by: java.lang.IllegalStateException at DockerClientProviderStrategy.java:232

CockroachDBPollDataDAOTest > classMethod FAILED
    com.zaxxer.hikari.pool.HikariPool$PoolInitializationException at HikariPool.java:596
        Caused by: java.lang.IllegalStateException at DockerClientProviderStrategy.java:232

CockroachDBRateLimitingDAOTest > classMethod FAILED
    com.zaxxer.hikari.pool.HikariPool$PoolInitializationException at HikariPool.java:596
        Caused by: java.lang.IllegalStateException at DockerClientProviderStrategy.java:232

6 tests completed, 6 failed

> Task :cockroachdb-persistence:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cockroachdb-persistence:test'.

When I investigate the logs com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Could not find a valid Docker environment. Please see logs and check configuration

I have Docker installed, Java 21 and 22 (jenv controlled), latest Gradle 8.9 and latest Docker. I interact with docker via Colima as I am using an M3 Mac. Could someone point me in the right direction to get this up and running please?

takuhii avatar Jul 24 '24 19:07 takuhii

@takuhii can you try ./gradlew bootRun to see what happens?

jun-he avatar Jul 24 '24 20:07 jun-he

Also, in your build terminal, what's the result if you type docker ps?

jun-he avatar Jul 24 '24 20:07 jun-he

Maestro uses testcontainers to start db for the tests, you might follow this to set it up for colima https://java.testcontainers.org/supported_docker_environment/#using-colima

jun-he avatar Jul 24 '24 20:07 jun-he

@takuhii can you try ./gradlew bootRun to see what happens?

I get the same failure message

takuhii avatar Jul 24 '24 22:07 takuhii

Also, in your build terminal, what's the result if you type docker ps?

docker ps is empty, no containers

takuhii avatar Jul 24 '24 22:07 takuhii

@takuhii Got it. have you tried https://github.com/Netflix/maestro/issues/29#issuecomment-2248864645?

jun-he avatar Jul 24 '24 22:07 jun-he

It was Colima and the TEST_CONTAINERS. This seems to have resolved it, thank you...

takuhii avatar Jul 25 '24 07:07 takuhii