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

**URL:** <https://forum.liquibase.org/t/unexpected-error-running-liquibase-connection-could-not-be-created-to-jdbc-postgresql/6773>\
**Category:** General Discussion\
**Created:** [April 19, 2022, 1:11pm UTC](https://forum.liquibase.org/t/unexpected-error-running-liquibase-connection-could-not-be-created-to-jdbc-postgresql/6773 "2022-04-19T13:11:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kalyanbhave](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@kalyanbhave](https://forum.liquibase.org/u/kalyanbhave)\
**Post date:** [April 19, 2022, 1:11pm UTC](https://forum.liquibase.org/t/unexpected-error-running-liquibase-connection-could-not-be-created-to-jdbc-postgresql/6773/1 "2022-04-19T13:11:56Z")

</div>

Hi Team,

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

Here is the Dockerfile:-

```auto
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

---

<div class="post-metadata">

**Author:** ![MikeOlivas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/mikeolivas/32/183_2.png) [@MikeOlivas](https://forum.liquibase.org/u/MikeOlivas)\
**Post date:** [April 19, 2022, 3:28pm UTC](https://forum.liquibase.org/t/unexpected-error-running-liquibase-connection-could-not-be-created-to-jdbc-postgresql/6773/2 "2022-04-19T15:28:13Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![EduardUta](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/eduarduta/32/324_2.png) [@EduardUta](https://forum.liquibase.org/u/EduardUta)\
**Post date:** [April 19, 2022, 8:16pm UTC](https://forum.liquibase.org/t/unexpected-error-running-liquibase-connection-could-not-be-created-to-jdbc-postgresql/6773/3 "2022-04-19T20:16:35Z")

</div>

> [@kalyanbhave](#):
>
> /databse?currentSchema=schema

Is the _databse_ a typo or intended?

---

<div class="post-metadata">

**Author:** ![karenxbai](https://avatars.discourse-cdn.com/v4/letter/k/d9b06d/32.png) [@karenxbai](https://forum.liquibase.org/u/karenxbai)\
**Post date:** [March 17, 2023, 2:46pm UTC](https://forum.liquibase.org/t/unexpected-error-running-liquibase-connection-could-not-be-created-to-jdbc-postgresql/6773/4 "2023-03-17T14:46:45Z")

</div>

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”
