I just tried to update from 7.9.1 Omnibus to 7.11.2, but dpkg -i fails during DB migrations, saying that it cannot connect to the socket in /tmp. More explicitly:
Recipe: gitlab::database_migrations
* bash[migrate gitlab-rails database] action run
================================================================================
Error executing action `run` on resource 'bash[migrate gitlab-rails database]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20150525-20857-c93yl2" ----
STDOUT: rake aborted!
PG::Error: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5433"?
Previously I already updated from 7.8 without any problem!
I hope this is not the problem, but I’m running Gitlab with different ports, e.g.
gitlab_rails['db_port'] = 5433
Reading problems of other people I also tried gitlab-rake db:migrate:status, and gitlab-rake gitlab:status. Basically everything fails with the same error.
I managed to remove gitlab 7.11.2 and install 7.9.1 and the system is again up and running, but I would like to be able to upgrade as usual.
But the database is running already. Here are the commands I just tried.
Launch installation:
$ sudo dpkg -i gitlab-ce_7.11.2~omnibus-1_amd64.deb
Selecting previously unselected package gitlab-ce.
dpkg: considering removing gitlab in favour of gitlab-ce ...
dpkg: yes, will remove gitlab in favour of gitlab-ce
(Reading database ... 278612 files and directories currently installed.)
Preparing to unpack gitlab-ce_7.11.2~omnibus-1_amd64.deb ...
Unpacking gitlab-ce (7.11.2~omnibus-1) ...
Setting up gitlab-ce (7.11.2~omnibus-1) ...
gitlab: Thank you for installing GitLab!
gitlab: Configure and start GitLab by running the following command:
gitlab:
gitlab: sudo gitlab-ctl reconfigure
gitlab:
gitlab: GitLab should be reachable at http://ipho2016-dev.physik.uzh.ch
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab:
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
gitlab:
Found /etc/gitlab/skip-auto-migrations, exiting...
$ sudo gitlab-ctl reconfigure
Starting Chef Client, version 11.18.0
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- gitlab
- runit
Compiling Cookbooks...
...
...
Recipe: gitlab::database_migrations
* bash[migrate gitlab-rails database] action run
================================================================================
Error executing action `run` on resource 'bash[migrate gitlab-rails database]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20150526-1107-ywqx83" ----
STDOUT: rake aborted!
PG::Error: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5433"?
As you see, the process id of the postgresql instance running is the same as the one reported by gitlab-ctl start postgresql.
It looks to me that it tries to connect to the wrong socket, because in the running 7.9.1 installation there is never such a file in /tmp, they must be somewhere else.
I managed to reproduce the problem also with a clean installation, where I specify a custom value for the configuration gitlab_rails['db_port'].
Extending my search to installation problems and not only upgrade, I found out that my gitlab.rb configuration might be broken, but somehow earlier versions of Gitlab didn’t care about that bug.
Now I think that the problem is that one should also modify the postgresql['port'] configuration.
I managed to install a fresh copy of Gitlab 7.11.4 with the following settings: