Can't install Gitlab on Ubuntu 14.04 (new install) error running gitlab-ctl reconfigure

Hello there, I have a brand new install of Ubuntu 14.04 on a virtual server from a provider.

Was following the step by step installation process.

And after the last step trying to install git with sudo EXTERNAL_URL=“” apt-get install gitlab-ee (replacing the " " with my url .

I get the following error.

Running handlers:
There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of “bash” “/tmp/chef-script20180109-15873-17f81gx” ----
STDOUT: rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/opt/gitlab/postgresql/.s.PGSQL.5432”?
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in block (3 levels) in <top (required)>' /opt/gitlab/embedded/bin/bundle:23:in load’
/opt/gitlab/embedded/bin/bundle:23:in `’
Tasks: TOP => gitlab:db:configure
(See full trace by running task with --trace)
---- End output of “bash” “/tmp/chef-script20180109-15873-17f81gx” ----
Ran “bash” “/tmp/chef-script20180109-15873-17f81gx” returned 1

Running handlers complete
Chef Client failed. 6 resources updated in 01 minutes 20 seconds
dpkg: error processing package gitlab-ee (–configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

maybe someone can help me out to fix this. I was installing gitlab as root , haven’t created a subdomain for gitlab.

Check if postgresql is running properly and it can be accessed from gitlab server.

Hi didn’t get a notification about your response. I’m very new to this so checking postgresql how do I go about it and what’s the commands to do so. Strange thing was I have 2 VPS same specs / same provider and I installed gitlab on one without the error It ran good for awhile until I got the 502 error and could not do anything with gitlab anymore , on this previous working server I formated the server and tried to reinstall gitlab just to get this error as well what I described at the start of the thread.