0

I have an error CDash cannot connect to the database in the browser. I checked the configuration and what I think is that the CDash is looking for Postgres server on its own. However, my gitlab service is using its own builtin psql server located at /opt/gitlab/embedded/bin/psql

I don't know how to update the CDash config.php to allow it to access the embedded Postgres database.

I am also not sure how to connect the user login from the terminal as we do in mysql i.e. mysql -u cdash_user -p

Here is part of the config.local.php file

// Hostname of the database server
$CDASH_DB_HOST = 'localhost';
// Login for database access
$CDASH_DB_LOGIN = 'cdash';
// Port for the database (leave empty to use default)
$CDASH_DB_PORT = '';
// Password for database access
$CDASH_DB_PASS = '*******';
// Name of the database
$CDASH_DB_NAME = 'cdash';
// Database type (empty means mysql)
$CDASH_DB_TYPE = 'pgsql';
Reza P.
  • 306
  • 2
  • 18
Dr. Mian
  • 3,334
  • 10
  • 45
  • 69

1 Answers1

0

You need to do the following to make it work Open the file

vim /var/opt/gitlab/postgresql/data/postgresql.conf

Change the line

listen_addresses = ''

To

listen_addresses = '127.0.0.1'

Save the changes and restart the gitlab

gitlab-ctl restart postgresql

Check the port on which the postgres is running

sudo netstat -plunt |grep postgres

I had to do this because after gitlab update to version 12.2.0 the cdash stopped working.

Dr. Mian
  • 3,334
  • 10
  • 45
  • 69