mattermost error executing "create gitlab_mattermost db user"
Just tried to enable mattermost in version 7.14.1
When I run gitlab-ctl reconfigure
, I get following error:
Recipe: gitlab::mattermost
* group[mattermost] action create (up to date)
* user[mattermost] action create (up to date)
* directory[/var/opt/gitlab/mattermost] action create (up to date)
* directory[/var/log/gitlab/mattermost] action create (up to date)
* directory[/var/opt/gitlab/mattermost/data] action create (up to date)
* execute[create gitlab_mattermost database user] action run
================================================================================
Error executing action `run` on resource 'execute[create gitlab_mattermost database user]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '2'
---- Begin output of /opt/gitlab/embedded/bin/psql --port 5432 -h /var/opt/gitlab/postgresql -d template1 -c "CREATE USER gitlab_mattermost" ----
STDOUT:
STDERR: psql: 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"?
---- End output of /opt/gitlab/embedded/bin/psql --port 5432 -h /var/opt/gitlab/postgresql -d template1 -c "CREATE USER gitlab_mattermost" ----
Ran /opt/gitlab/embedded/bin/psql --port 5432 -h /var/opt/gitlab/postgresql -d template1 -c "CREATE USER gitlab_mattermost" returned 2
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/mattermost.rb
69: execute "create #{sql_user} database user" do
70: command "#{bin_dir}/psql --port #{pg_port} -h #{postgresql_socket_dir} -d template1 -c \"CREATE USER #{sql_user}\""
71: user pg_user
72: not_if { !pg_helper.is_running? || pg_helper.user_exists?(sql_user) }
73: end
74:
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/mattermost.rb:69:in `from_file'
execute("create gitlab_mattermost database user") do
action :run
retries 0
retry_delay 2
default_guard_interpreter :execute
command "/opt/gitlab/embedded/bin/psql --port 5432 -h /var/opt/gitlab/postgresql -d template1 -c \"CREATE USER gitlab_mattermost\""
backup 5
returns 0
user "gitlab-psql"
declared_type :execute
cookbook_name "gitlab"
recipe_name "mattermost"
not_if { #code block }
end
/opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
Generated at 2015-08-27 20:25:13 +0200
Chef::Exceptions::RunFailedWrappingError: Found 1 errors, they are stored in the backtrace
1) Mixlib::ShellOut::ShellCommandFailed - execute[create gitlab_mattermost database user] (gitlab::mattermost line 69) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of /opt/gitlab/embedded/bin/psql --port 5432 -h /var/opt/gitlab/postgresql -d template1 -c "CREATE USER gitlab_mattermost" ----
STDOUT:
STDERR: psql: 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"?
---- End output of /opt/gitlab/embedded/bin/psql --port 5432 -h /var/opt/gitlab/postgresql -d template1 -c "CREATE USER gitlab_mattermost" ----
Ran /opt/gitlab/embedded/bin/psql --port 5432 -h /var/opt/gitlab/postgresql -d template1 -c "CREATE USER gitlab_mattermost" returned 2
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.1.0/lib/mixlib/shellout.rb:289:in `invalid!'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.1.0/lib/mixlib/shellout.rb:276:in `error!'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/mixin/shell_out.rb:56:in `shell_out!'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/provider/execute.rb:61:in `block in action_run'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/mixin/why_run.rb:52:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/provider.rb:175:in `converge_by'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/provider/execute.rb:60:in `action_run'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/provider.rb:140:in `run_action'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/resource.rb:586:in `run_action'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/runner.rb:49:in `run_action'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/runner.rb:81:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/runner.rb:81:in `block in converge'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/resource_collection/resource_list.rb:83:in `block in execute_each_resource'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/resource_collection/resource_list.rb:81:in `execute_each_resource'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/runner.rb:80:in `converge'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/client.rb:648:in `block in converge'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/client.rb:643:in `catch'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/client.rb:643:in `converge'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/client.rb:682:in `converge_and_save'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/client.rb:269:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/application.rb:270:in `block in fork_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/application.rb:258:in `fork'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/application.rb:258:in `fork_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/application.rb:224:in `block in run_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/local_mode.rb:39:in `with_server_connectivity'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/application.rb:212:in `run_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/application/client.rb:402:in `block in interval_run_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/application/client.rb:392:in `loop'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/application/client.rb:392:in `interval_run_chef_client'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/application/client.rb:382:in `run_application'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/lib/chef/application.rb:60:in `run'
/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/chef-12.4.0.rc.2/bin/chef-client:26:in `<top (required)>'
/opt/gitlab/embedded/bin/chef-client:23:in `load'
/opt/gitlab/embedded/bin/chef-client:23:in `<main>'