It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Not able to connect Bitbucket with Postgres database

devesh Sachan Dec 06, 2017

Hi Team,

I am not able to connect my Bitbucket with Postgres database. I have checked Postgres database is up and running on port 5432 and I have created user named Postgres I have set the password for the same. I have created one database named Bitbucket. I am getting below mentioned error while connecting. This is little urgent I appreciate if you could help me ASAP.

The configuration entered is not valid. A database connection could not be established. Please check your configuration and try again. 

Hide details

The configuration entered is not valid. A database connection could not be established. Please check your configuration and try again.
  com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:230)
  com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:187)
  com.atlassian.stash.internal.maintenance.SpringMaintenanceTaskFactory.migrationTask(SpringMaintenanceTaskFactory.java:140)
  ...
Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "35.177.107.246", user "postgres", database "bitbucket", SSL off
  org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
  com.atlassian.stash.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:44)
  com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:227)
  ...
FATAL: no pg_hba.conf entry for host "35.177.107.246", user "postgres", database "bitbucket", SSL off
  org.postgresql.Driver$ConnectThread.getResult(Driver.java:365)
  org.postgresql.Driver.connect(Driver.java:288)
  java.sql.DriverManager.getConnection(DriverManager.java:664)
  ...

 

1 answer

0 votes
Shannon Spaniol Atlassian Team Dec 07, 2017

Hi Devesh,

Can you have a look at this resolution and see if it helps you? 

Let us know if you have any trouble.

Regards,

Shannon

Alejandro Calderon I'm New Here Apr 03, 2019

I have the same problem and this solution didn't work for me...

Shannon Spaniol Atlassian Team Apr 04, 2019

Alejandro,

Welcome to Community, it's nice to meet you.

It's possible that there's another issue causing you not to be able to connect to Postgres. The best thing to do here is to gather the error messages related to this problem from your server logs, and submit either as a Support Ticket, or raise a new question. Then we can have a look at your issue specifically to solve the problem.

Let me know if you have any trouble.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,652 views 1 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you