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
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 | {}
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 | {}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.