Unexpected error running Liquibase: Connection could not be created to jdbc:postgresql

Hi Team,

I am using docker here to build Liquibase and trying to execute Liquibase commands on fly.

Here is the Dockerfile:-

FROM liquibase/liquibase
RUN lpm add mysql --global

I am using below command on fly

docker run --rm -v ${bamboo.build.working.directory}/:/liquibase/changelog liquibase/liquibase --url="jdbc:postgresql://app-liquibase-test.us-region.rds.amazonaws.com:5432/databse?currentSchema=schema" --changeLogFile=sql/changelog/db.changelog-master.xml --username=username --password=password update

I am getting below error:-

Unexpected error running Liquibase: Connection could not be created to jdbc:postgresql://app-liquibase-test.us-region.rds.amazonaws.com:5432/database?currentSchema=schema with driver org.postgresql.Driver. The connection attempt failed.

Please suggest

@kalyanbhave
Does the system that is running docker have access (in the security group) to connect to
app-liquibase-test.us-region.rds.amazonaws.com:5432. on port 5432.

1 Like

Is the databse a typo or intended?

1 Like

Hello, did you get this resolved?
I have exact same issue.
I can do the exact same command if I get in the docker container and run the command, but will get the error “Unexpected error running Liquibase: Connection could not be created to …the database info”