Gitlab update error

My pmnibus gitlab running version 13.8.4 on ubuntu 18.04 . I am trying to upgrade my omnibus git into 13.11.2 but facing bellow error. what can I do?

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

bash[migrate gitlab-rails database] (gitlab::database_migrations line 70) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of “bash” “/tmp/chef-script20210430-28469-189b2tj” ----
STDOUT: rake aborted!
PG::ConnectionBad: could not connect to server: No route to host
Is the server running on host “10.33.30.55” and accepting
TCP/IP connections on port 5432?
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:60: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)
STDERR:
---- End output of “bash” “/tmp/chef-script20210430-28469-189b2tj” ----
Ran “bash” “/tmp/chef-script20210430-28469-189b2tj” returned 1

Running handlers complete
Chef Infra Client failed. 0 resources updated in 01 minutes 28 seconds

There was an error running gitlab-ctl reconfigure. Please check the output above for more
details.

dpkg: error processing package gitlab-ce (–configure):
installed gitlab-ce package post-installation script subprocess returned error exit status 1

Did you stop gitlab before attempting the upgrade? If you did, then that would be the mistake, since Gitlab will stop the services itself and leave services like postgres running so that the migrate tasks can be completed.

Do:

gitlab-ctl postgresql start

and then you will probably need to do:

dpkg --configure -a

to fix your failed partial upgrade of gitlab.

root@GITP001:~# gitlab-ctl status
run: alertmanager: (pid 16240) 180s; run: log: (pid 2125) 2262s
run: gitaly: (pid 16253) 179s; run: log: (pid 2122) 2262s
run: gitlab-exporter: (pid 16277) 178s; run: log: (pid 2139) 2262s
run: gitlab-workhorse: (pid 16287) 178s; run: log: (pid 2136) 2262s
run: grafana: (pid 16297) 177s; run: log: (pid 2131) 2262s
run: logrotate: (pid 16312) 177s; run: log: (pid 2135) 2262s
run: nginx: (pid 16318) 176s; run: log: (pid 2134) 2262s
run: node-exporter: (pid 16331) 176s; run: log: (pid 2132) 2262s
run: prometheus: (pid 16413) 175s; run: log: (pid 2137) 2262s
run: puma: (pid 16754) 4s; run: log: (pid 2138) 2262s
run: redis: (pid 16434) 172s; run: log: (pid 2150) 2259s
run: redis-exporter: (pid 16440) 172s; run: log: (pid 2133) 2262s
run: sidekiq: (pid 16696) 14s; run: log: (pid 2124) 2262s

502
Whoops, GitLab is taking too much time to respond.
Try refreshing the page, or going back and attempting the action again.

Please contact your GitLab administrator if this problem persists.

Go back

gitlab-ctl restart postgresql

and then dpkg --configure -a wrote it the wrong away around for the gitlab-ctl command. Once it has finished, and all gitlab services have started it can take a few minutes to stabilise before web interface will be ready.

I suggest restoring your server from a backup that you made before you started the upgrade.