testcontainers / testcontainers-jooq-codegen-maven-plugin

jOOQ code generator using Testcontainers
Apache License 2.0
49 stars 10 forks source link

Connection refused #20

Open Allsimon opened 1 year ago

Allsimon commented 1 year ago

On Mac, I get this error when running the plugin:

[INFO] Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
[INFO] Checking the system...
[INFO] ✔︎ Docker server version should be at least 1.6.0
[INFO] Creating container for image: postgres:15.2-alpine
[INFO] Container postgres:15.2-alpine is starting: 52b50b10c92c84e123944ab84fc2c2764d7d95a2894518c461fefb30f28eb33f
[INFO] Container postgres:15.2-alpine started in PT1.145055S
[INFO] Container is started (JDBC URL: jdbc:postgresql://localhost:49164/test?loggerLevel=OFF)
[ERROR] Failed to execute goal org.testcontainers:testcontainers-jooq-codegen-maven-plugin:0.0.2:generate (generate-jooq-sources) on project database-jooq: Error running jOOQ code generation tool: Connection to localhost:49164 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. -> [Help 1]

At first glance, it looks like it's an issue with Colima: containers are often started quickly but the port is available only a few seconds later, there might be a race condition here

romchellis commented 1 year ago

Hi @Allsimon pls provide your plugin configuration

mzagar commented 1 year ago

Hi, I am hitting the same issue when building on macos with colima (building postgres-flyway-example from this repo).

This fixes it: https://github.com/testcontainers/testcontainers-jooq-codegen-maven-plugin/pull/29

Hope you can review and release new version if it looks good, let me know if anything needs fixing.

Thank you for this project btw, I love it!

rajadilipkolli commented 11 months ago

@Allsimon , is it still happening?