Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Installation of Bitbucket

Gerald Hunt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 12, 2019

I am trying to get bitbucket up and running.  I have Git, and Bitbucket, and postgresql installed and running.  I have created a database called ExlarBBDbase.  I created a user BBadmin.  The system tells me that the user is created.  The database is assigned to the user but when I try to use the Database configuration page to link the database to bitbucket it says BBadmin is not found.  Any help? 

 

Ps. I have been through many of the questions and answers in the forum and tried many things. Nothing seems to help.

 

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:217)
	com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:183)
	com.atlassian.stash.internal.maintenance.SpringMaintenanceTaskFactory.migrationTask(SpringMaintenanceTaskFactory.java:132)
	...
Failed to obtain JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: role "BBadmin" does not exist
	org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81)
	com.atlassian.stash.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:44)
	com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:214)
	...
FATAL: role "BBadmin" does not exist
	org.postgresql.Driver$ConnectThread.getResult(Driver.java:405)
	org.postgresql.Driver.connect(Driver.java:263)
	java.sql.DriverManager.getConnection(DriverManager.java:664)
	...

 and online 

2 answers

0 votes
ghunt0918 July 16, 2019

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

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:217)
com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:183)
com.atlassian.stash.internal.maintenance.SpringMaintenanceTaskFactory.migrationTask(SpringMaintenanceTaskFactory.java:132)
...
Failed to obtain JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: role "BBadmin" does not exist
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81)
com.atlassian.stash.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:44)

 

Name | Owner | Encoding | Collate | Ctype | Access privileges
--------------+----------+----------+----------------------------+----------------------------+-----------------------
exlarbb | ghuntbb | UTF8 | English_United States.1252 | English_United States.1252 |
exlarbbdb | ghunt | UTF8 | English_United States.1252 | English_United States.1252 | =Tc/ghunt +
| | | | | ghunt=CTc/ghunt +
| | | | | bbadmin=c/ghunt
exlarbbdbase | bbadmin | UTF8 | English_United States.1252 | English_United States.1252 | =Tc/bbadmin +
| | | | | bbadmin=CTc/bbadmin
postgres | postgres | UTF8 | English_United States.1252 | English_United States.1252 |
template0 | postgres | UTF8 | English_United States.1252 | English_United States.1252 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | English_United States.1252 | English_United States.1252 | =c/postgres +
| | | | | postgres=CTc/postgres
(6 rows)


postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
adminbb | Superuser, Create role, Create DB +| {}
| Password valid until infinity |
bbadmin | Password valid until infinity | {}
ghunt | Password valid until infinity | {}


postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
adminbb | Superuser, Create role, Create DB +| {}
| Password valid until infinity |
bbadmin | Password valid until infinity | {}
ghunt | Password valid until infinity | {}

ghunt0918 July 16, 2019

If you copy and past that text in to a word document it should put it back in readable format.  It has the du and l info in it.

0 votes
Alexis Robert
Community Champion
July 12, 2019

Hi @Gerald Hunt , 

 

this is because of this error :

FATAL: role "BBadmin" does not exist

You need to add this role in PostgreSQL and give it the rights on your ExlarBBDbase schema.

You can check the current permission with psql and this command:

\du

This will list the roles for your database, you need to check if BBadmin is in the list.

 

Let me know if you have any questions, 

 

--Alexis

ghunt0918 July 15, 2019

did \l and \du and made sure I granted all privileges for BBAdmin to ExlarBBDbase.  Still the same results. See output of \l and \du below.  What am I missing?

 

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:217)
com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:183)
com.atlassian.stash.internal.maintenance.SpringMaintenanceTaskFactory.migrationTask(SpringMaintenanceTaskFactory.java:132)
...
Failed to obtain JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: role "BBadmin" does not exist
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81)
com.atlassian.stash.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:44)

 

Name | Owner | Encoding | Collate | Ctype | Access privileges
--------------+----------+----------+----------------------------+----------------------------+-----------------------
exlarbb | ghuntbb | UTF8 | English_United States.1252 | English_United States.1252 |
exlarbbdb | ghunt | UTF8 | English_United States.1252 | English_United States.1252 | =Tc/ghunt +
| | | | | ghunt=CTc/ghunt +
| | | | | bbadmin=c/ghunt
exlarbbdbase | bbadmin | UTF8 | English_United States.1252 | English_United States.1252 | =Tc/bbadmin +
| | | | | bbadmin=CTc/bbadmin
postgres | postgres | UTF8 | English_United States.1252 | English_United States.1252 |
template0 | postgres | UTF8 | English_United States.1252 | English_United States.1252 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | English_United States.1252 | English_United States.1252 | =c/postgres +
| | | | | postgres=CTc/postgres
(6 rows)


postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
adminbb | Superuser, Create role, Create DB +| {}
| Password valid until infinity |
bbadmin | Password valid until infinity | {}
ghunt | Password valid until infinity | {}

Alexis Robert
Community Champion
July 15, 2019

Can you give the output of \dg ? 

ghunt0918 July 16, 2019

It's at the bottom of my last post. I gave bbadmin all priviledges

 

 

postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
adminbb | Superuser, Create role, Create DB +| {}
| Password valid until infinity |
bbadmin | Password valid until infinity | {}
ghunt | Password valid until infinity | {}

 

I granted bbadmin all privliges

ghunt0918 July 16, 2019

Hopefully that will help.

Alexis Robert
Community Champion
July 16, 2019

Are you able to login with the bbadmin user with the command line ? 

You would first need to login as the postgres user : 

sudo -u postgres

Then connect with the role bbadmin : 

psql -h localhost -d exlarbbdbase -U bbadmin -p 5432

(I assumed you used the default host and port, change if needed).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events