Gitlab won't start on Ubuntu 18.04 after upgrade

After upgrading Gitlab to version 12.1.6 on Ubuntu 16.04, and verifying that it was working, I used do-release-upgrade to update to Ubuntu 18.04. After a restart, Gitlab refused to start and I received the following errors:

fail: alertmanager: runsv not running
fail: gitaly: runsv not running
fail: gitlab-exporter: runsv not running
fail: gitlab-workhorse: runsv not running
fail: grafana: runsv not running
fail: logrotate: runsv not running
fail: nginx: runsv not running
fail: node-exporter: runsv not running
fail: postgres-exporter: runsv not running
fail: postgresql: runsv not running
fail: prometheus: runsv not running
fail: redis: runsv not running
fail: redis-exporter: runsv not running
fail: sidekiq: runsv not running
fail: unicorn: runsv not running

I attempted the following steps:

  • Ran gitlab-ctl reconfigure - ran successfully
  • Installed runit - installed successfully
  • Rebooted the machine - completed successfully
  • Errors remained - unresolved
  • Found this issue on Stackoverflow, followed the instructions (yum → apt) - unsuccessful
  • Found this issue on Gitlab and ran sudo gitlab-ctl restart - unsuccessful
  • Found this issue on Gitlab and ran sudo gitlab-rake gitlab:env:info --trace - unsuccessful

The output of the last command was:

** Invoke gitlab:env:info (first_time)
** Invoke gitlab_environment (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab_environment
** Execute gitlab:env:info

System information
System:     Ubuntu 18.04
Current User:   git
Using RVM:  no
Ruby Version:   2.6.3p62
Gem Version:    2.7.9
Bundler Version:1.17.3
Rake Version:   12.3.3
Redis Version:  3.2.12
Git Version:    2.24.1
Sidekiq Version:5.2.7
Go Version: unknown
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/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `initialize'
/opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `new'
/opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `connect'

This suggests the Postgresql server is not running. I am unsure how to start it.

To start the Postgresql server, run the following command:

sudo gitlab-ctl start postgresql

Afterwards, run sudo gitlab-ctl restart to restart all Gitlab services.