I’m having issues with the below liquibase command while connecting to a cockroachDB:
java -cp “/path/to/my/project/*” -Dliquibase.username=me -Djava.security.auth.login.config=/path/to/jaas.conf -Djava.security.krb5.conf=/path/to/krb5.conf -Djdk.tls.client.protocols=TLSv1.2 -Dhttp.auth.preference=Kerberos -Dsecurity.auth.useSubjectCredsOnly=false liquibase.integration.commandline.Main --defaultsFile=/path/to/liquibase.properties --changeLogFile=/path/to/main-changelog.yaml updateSQL
Unexpected error running Liquibase: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: Connection could not be created to jdbc:postgresql://(cockroachdb-url-goes-here) with driver org.postgresql.Driver. GSS Authentication failed
The unusal part is that the below liquiibase command through the maven plugin works.
mvn liquibase:updateSQL -Dliquibase.changeLogFile=/path/to/main-changelog.yaml -Dliquibase.username=me -Djava.security.auth.login.config=/path/to/jaas.conf -Djava.security.krb5.conf=/path/to/krb5.conf
What I’ve tried/verified:
1. liquibase.properties has the following properties (both commands use properties file):
driver
url
2. The maven plugin has the following specified in pom.xml (added via command line for standalone jar approach).
jdk.tls.client.protocols=TLSv1.2
http.auth.preference=Kerberos
security.auth.useSubjectCredsOnly=false
3. I've put the following jars in /path/to/my/project/ (they are the same ones used by maven-plugin).
liquibase-core-4.3.3.jar
postgresql-42.2.19.jar
snakeyaml-1.19.jar
Has anyone faced this issue? Any general tips for trouble shooting? Why would the plugin work and not the standalone jar?