I've been running killbill against a GCP postgresql database for a while now but this week I tried out an on-prem kubernetes environment, installing postgresql with the crunchy-data postgresql operator (PGO). I have four other k8 services that connect to the same database instance, they each have their own database inside the postgresql instance, as does killbill. All the services connect to the instance with the same user/password. This is the same arrangement I had on GCP.
In this new setup the other services all connect to my postgresql instance just fine. Killbill fails to make it and gives me this error:
org.postgresql.util.PSQLException: The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver
The reference to pg_hba.conf means I am supposed to update that file at the postgresql server, but my other connections don't require this. I don't know what authentication type 10 means but I'm guessing the jdbc driver in killbill is presenting credentials in a way that the db server doesn't expect. I'm assuming the pg_hba.conf part of the message appears because it could not fall back to that after failing the authentication method.
By default I had installed postgresql 13 but I noticed that Killbill is tested on postgresql 12, so I've got PGO to install postgresql 12.7 hoping that would help. But I got the same error.
I also got PGO to edit my pg_hba.conf file (as suggested in the message) to allow anyone to connect. But I got the same error.
I have, of course, checked my configuration a dozen times and it is using the same credentials and host etc as my other services.
My other services are using postgresql jdbc driver 42.2.5 and I can see killbill is using 42.2.23, so if anyone is using an old driver it is me, yet my services connect.
I set up a postgresql instance (12.7) on the host machine (outside k8) and configured the killbill service running inside k8 to talk to that. And it worked fine. So there is no problem with killbill generally in this environment, just the database connection. This also verified that I do know what I am doing re configuring the jdbc connection on the killbill k8 service.
Any clues?