gitlab-ctl reconfigure fails on database setup
Hi, I just set up a new instance of my OpenVZ Debian Wheezy server and wanted to run gitlab on it. I followed the steps here: https://about.gitlab.com/downloads/
Up to the point where it says to run reconfigure. The installation got stuck at: ruby_block[supervise_redis_sleep] action run
So I googled and found out I need to do this:
Some variants of Debian 7 (e.g. OpenVZ) use Upstart. This will trip up gitlab-ctl reconfigure at ruby_block[supervise_redis_sleep] action run, because the internal Runit cookbook assumes that Debian 7 uses inittab. You can work around this as follows.
sudo cp /opt/gitlab/embedded/cookbooks/runit/files/default/gitlab-runsvdir.conf /etc/init/
sudo initctl start gitlab-runsvdir
sudo gitlab-ctl reconfigure # Resume gitlab-ctl reconfigure
After this the installation did not hang anymore. However now I get this error:
Recipe: gitlab::nginx
* ruby_block[reload nginx svlogd configuration] action create
- execute the ruby block reload nginx svlogd configuration
Recipe: gitlab::logrotate
* ruby_block[reload logrotate svlogd configuration] action create
- execute the ruby block reload logrotate svlogd configuration
Running handlers:
[2014-10-23T19:35:30+02:00] ERROR: Running exception handlers
Running handlers complete
[2014-10-23T19:35:30+02:00] ERROR: Exception handlers complete
[2014-10-23T19:35:30+02:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/coo kbooks/cache/chef-stacktrace.out
Chef Client failed. 155 resources updated in 89.77788722 seconds
[2014-10-23T19:35:30+02:00] ERROR: bash[migrate database] (gitlab::database_migr ations line 26) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected pro cess to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20141023-1789-1mvtxgd" ----
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.5432"?
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
STDERR:
---- End output of "bash" "/tmp/chef-script20141023-1789-1mvtxgd" ----
Ran "bash" "/tmp/chef-script20141023-1789-1mvtxgd" returned 1
[2014-10-23T19:35:30+02:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef ru n process exited unsuccessfully (exit code 1)
And I can't seem to solve it. It always fails to set up the database :/ My OpenVZ instance can use 2 GB of RAM.
This is the output of /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out:
Generated at 2014-10-23 19:35:30 +0200
Mixlib::ShellOut::ShellCommandFailed: bash[migrate database] (gitlab::database_migrations line 26) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20141023-1789-1mvtxgd" ----
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.5432"?
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
STDERR:
---- End output of "bash" "/tmp/chef-script20141023-1789-1mvtxgd" ----
Ran "bash" "/tmp/chef-script20141023-1789-1mvtxgd" returned 1
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-1.6.0/lib/mixlib/shellout.rb:272:in `invalid!'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-1.6.0/lib/mixlib/shellout.rb:259:in `error!'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/mixin/shell_out.rb:43:in `shell_out!'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/provider/execute.rb:60:in `block in action_run'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/mixin/why_run.rb:52:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/provider.rb:155:in `converge_by'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/provider/execute.rb:59:in `action_run'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/provider/script.rb:38:in `action_run'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/provider.rb:120:in `run_action'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/resource.rb:637:in `run_action'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/runner.rb:49:in `run_action'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/runner.rb:111:in `run_delayed_notification'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/runner.rb:99:in `block in run_delayed_notifications'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/runner.rb:98:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/runner.rb:98:in `run_delayed_notifications'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/runner.rb:88:in `converge'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/client.rb:345:in `converge'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/client.rb:431:in `do_run'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/client.rb:213:in `block in run'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/client.rb:207:in `fork'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/client.rb:207:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/application.rb:217:in `run_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/application/solo.rb:221:in `block in run_application'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/application/solo.rb:213:in `loop'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/application/solo.rb:213:in `run_application'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/lib/chef/application.rb:67:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-11.12.2/bin/chef-solo:25:in `<top (required)>'
/opt/gitlab/embedded/bin/chef-solo:23:in `load'
/opt/gitlab/embedded/bin/chef-solo:23:in `<main>'