Recently we have upgraded the gitlab 12.7.5 CE to latest version 13.6 Enterprise edition, and gitlab and postgresql upgrade automatically and data directory is still at the older version. Because of which postgresql is down and unable to start the gitlab instance.
Below is the version information.
[gitlab@host ~] **sudo /opt/gitlab/embedded/bin/psql --version**
[sudo] password for gitlab:
psql (PostgreSQL) 11.9
[gitlab@host ~]
[gitlab@host ~]
[gitlab@host ~]
[gitlab@host ~] **sudo /opt/gitlab/embedded/bin/psql --version**
psql (PostgreSQL) 11.9
[gitlab@host ~]
[gitlab@host ~] **sudo cat /var/opt/gitlab/postgresql/data/PG_VERSION**
10
[gitlab@host ~]
As you can see above, the data directory is still at 10, Want to upgrade it to the version 11.9 to start the gitlab successfully. Do you have suggestions on this?
I ran the pg-upgrade but threw below error.
[gitlab@host ~]$ sudo gitlab-ctl pg-upgrade
Traceback (most recent call last):
8: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in <main>' 7: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in
loadâ
6: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/bin/omnibus-ctl:31:in <top (required)>' 5: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:746:in
runâ
4: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:204:in block in add_command_under_category' 3: from /opt/gitlab/embedded/service/omnibus-ctl/pg-upgrade.rb:142:in
block in load_fileâ
2: from /opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/util.rb:100:in roles' 1: from /opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/util.rb:59:in
get_node_attributesâ
/opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/util.rb:47:in `parse_json_fileâ: Attributes not found in /opt/gitlab/embedded/nodes/sgpl-gitlab.sgpltech.com.json, has reconfigure been run yet? (GitlabCtl::Errors::NodeError)
I ran the gitlab reconfigure it throw the below error:
Running handlers:
There was an error running gitlab-ctl reconfigure:
bash[migrate gitlab-rails database] (gitlab::database_migrations line 55) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received â1â
---- Begin output of âbashâ â/tmp/chef-script20201228-30383-1vop4xxâ ----
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/ee/app/models/license.rb:273:in load_license' /opt/gitlab/embedded/service/gitlab-rails/ee/app/models/license.rb:258:in
currentâ
/opt/gitlab/embedded/service/gitlab-rails/ee/app/models/license.rb:266:in feature_available?' /opt/gitlab/embedded/service/gitlab-rails/ee/lib/ee/gitlab/auth/ldap/config.rb:19:in
_available_serversâ
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/auth/ldap/config.rb:37:in available_servers' /opt/gitlab/embedded/service/gitlab-rails/config/initializers/omniauth.rb:3:in
module:Strategiesâ
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/omniauth.rb:2:in <top (required)>' /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:5:in
<top (required)>â
/opt/gitlab/embedded/bin/bundle:23:in load' /opt/gitlab/embedded/bin/bundle:23:in
â
Tasks: TOP => gitlab:db:configure => environment
(See full trace by running task with --trace)
Anyone faced this issue before and what steps do we need to follow to make the data directory and postgresql version compatible, so that my gitlab EE will be up and running.
Thanks in advance.