Dev Services for Postgresql not working

244 views
Skip to first unread message

Eric Deandrea

unread,
May 19, 2022, 8:25:59 AM5/19/22
to Quarkus Development mailing list, Thomas Qvarnstrom
Last week I got a new laptop - a 2021 MacBook M1Pro. Since then whenever I try to use Dev Services for Postgresql (either in Quarkus Dev mode or when running tests) it seems to be broken with some kind of race condition between the starting of the Postgres container & the creation of the username/password). When Hibernate kicks in to create the tables its getting an authentication error, as if the user hasn’t yet been created. I’m hoping my new machine isn’t too fast!

I can reproduce this pretty regularly. I put together a repo on GitHub [1] detailing what I’m seeing (it’s a pretty basic hello world). I also recorded a 2 minute video [2] showing what I’m seeing.


Eric Deandrea

Sr. Principal Technical Marketing Manager

Red Hat

edea...@redhat.com    M: 978.237.4727    T: 978.392.1070    


Thomas Qvarnstrom

unread,
May 19, 2022, 9:05:00 AM5/19/22
to Eric Deandrea, Quarkus Development mailing list
A possible workaround for dev mode seems to be to hit 's' to force a reload of Quarkus in dev mode, but it may still cause issues with the continuous testing.

Eric Deandrea

unread,
May 19, 2022, 9:29:54 AM5/19/22
to Thomas Qvarnstrom, Quarkus Development mailing list
Yes, but it prevents running ./mvnw verify


Eric Deandrea

Sr. Principal Technical Marketing Manager

Red Hat

edea...@redhat.com    M: 978.237.4727    T: 978.392.1070    



Sanne Grinovero

unread,
May 19, 2022, 9:37:18 AM5/19/22
to edea...@redhat.com, Thomas Qvarnstrom, Quarkus Development mailing list
Hi Eric,

We have had many similar issues with various databases - e.g. mysql is particularly tricky. But PostgreSQL has been rock solid in this regard so far; I wonder if this might be an issue worth reporting to the container maintainers? It's most likely affecting this particular image - I assume you're using an image for the M1 architecture?

We can workaround it by using a different readiness check, such as attempting to connect, but it shouldn't be necessary with postgresql's container design and risks being annoying for all users who are not on an M1.

Thanks



--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAOTfCRUJp95an%3DCv3opFBOO%3DjCg_9Zzq5hNj%3D9RSWSpRQPXUhQ%40mail.gmail.com.

Eric Deandrea

unread,
May 19, 2022, 9:50:23 AM5/19/22
to Sanne Grinovero, Thomas Qvarnstrom, Quarkus Development mailing list
Yes I’m on an M1. If I docker run the image and configure Quarkus with the connection details (username/password/connect string) everything is fine.

Its only when Quarkus dev services kicks in (running man quarkus:dev or mvn verify) and boots the container image is when I run into issues


Eric Deandrea

Sr. Principal Technical Marketing Manager

Red Hat

edea...@redhat.com    M: 978.237.4727    T: 978.392.1070    



Eric Deandrea

unread,
May 22, 2022, 1:17:10 PM5/22/22
to Sanne Grinovero, Thomas Qvarnstrom, Quarkus Development mailing list
Seems it had something to do with Rancher Desktop. When I downloaded/installed Docker Desktop or Podman I wasn’t able to reproduce it anymore.


Eric Deandrea

Sr. Principal Technical Marketing Manager

Red Hat

edea...@redhat.com    M: 978.237.4727    T: 978.392.1070    



Reply all
Reply to author
Forward
0 new messages