I am trying to set up an instance of Bitbucket Server on a CentOS 7 VM with Apache, but I am having trouble trying to connect the Bitbucket Server to a PostgreSQL I installed. I set up PostgreSQL precisely according to this Atlassian support article: https://confluence.atlassian.com/bitbucketserver/connecting-bitbucket-server-to-postgresql-776640389.html
When I run the Setup, I fill the fields out as per below:
Database Type: "PostgreSQL"
Hostname: [CentOS 7 VM Public IP] (I have also tried my local IP and 'localhost')
Port: 5432
Database name: [Name of my database ('bitbucket')]
Database username: [Username as configured in article, I have it as ('bitbucketuser')]
Database password: [Password]
I receive the following error message:
"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) ...Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: Connection attempt timed out. 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:214) ...Connection attempt timed out. org.postgresql.Driver$ConnectThread.getResult(Driver.java:414) org.postgresql.Driver.connect(Driver.java:259) java.sql.DriverManager.getConnection(DriverManager.java:664)"
I have triple checked the database credentials, and made sure PostgreSQL is running as a service, so I am a bit confused by the error message.
Hi Simon,
The error that is relevant is
Connection attempt timed out
Bitbucket Server isn't able to connect to your Postgres server, there might be a firewall in between it and Bitbucket Server that's preventing access.
Cheers,
Christian
Premier Support Engineer
Atlassian
I've just contacted my IT group and they seem to agree with you! Thanks!
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.