ls -la /etc/gitlab/
-rwxrwxrwx 1 git git gitlab.rb
cat /etc/gitlab/gitlab.rb
# Disable the built-in Postgres
postgresql['enable'] = false
# Fill in the values for database.yml
gitlab_rails['db_adapter'] = 'postgresql'
gitlab_rails['db_encoding'] = 'unicode'
gitlab_rails['db_database'] = 'gitlab_db_name'
gitlab_rails['db_pool'] = 10
gitlab_rails['db_host'] = 'aws-RDShost.us-east-1.rds.amazonaws.com'
gitlab_rails['db_port'] = 5432
gitlab_rails['db_username'] = "gitlab_user"
gitlab_rails['db_password'] = 'mypass'
现在问题是6.6.5 gitlab没有覆盖位于/var/opt/gitlab/gitlab-rails/etc/database.rb的database.rb文件
完整错误堆栈:
编辑Cookbook ......
食谱:gitlab :: default
* directory[/etc/gitlab] action create
- change owner from 'git' to 'root'
- change group from 'git' to 'root'
[2015-04-16T20:32:04+00:00] WARN: Cloning resource attributes for directory[/var/opt/gitlab/gitlab-rails/etc] from prior resource (CHEF-3694)
[2015-04-16T20:32:04+00:00] WARN: Previous directory[/var/opt/gitlab/gitlab-rails/etc]: /opt/gitlab/embedded/cookbooks/gitlab/recipes/gitlab-rails.rb:36:in `block in from_file'
[2015-04-16T20:32:04+00:00] WARN: Current directory[/var/opt/gitlab/gitlab-rails/etc]: /opt/gitlab/embedded/cookbooks/gitlab/definitions/unicorn_config.rb:21:in `block in from_file'
[2015-04-16T20:32:04+00:00] WARN: Cloning resource attributes for service[unicorn] from prior resource (CHEF-3694)
[2015-04-16T20:32:04+00:00] WARN: Previous service[unicorn]: /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:58:in `block in from_file'
[2015-04-16T20:32:04+00:00] WARN: Current service[unicorn]: /opt/gitlab/embedded/cookbooks/runit/definitions/runit_service.rb:173:in `block in from_file'
[2015-04-16T20:32:04+00:00] WARN: Cloning resource attributes for service[sidekiq] from prior resource (CHEF-3694)
[2015-04-16T20:32:04+00:00] WARN: Previous service[sidekiq]: /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:58:in `block in from_file'
[2015-04-16T20:32:04+00:00] WARN: Current service[sidekiq]: /opt/gitlab/embedded/cookbooks/runit/definitions/runit_service.rb:173:in `block in from_file'
食谱:gitlab :: postgresql_disable
* link[/opt/gitlab/service/postgresql] action delete (up to date)
食谱:gitlab :: database_migrations
* execute[initialize database] action nothing (skipped due to action :nothing)
* execute[chown git:git /opt/gitlab/embedded/service/gitlab-rails/db/schema.rb] action run
- execute chown git:git /opt/gitlab/embedded/service/gitlab-rails/db/schema.rb
* execute[migrate database] action run
Error executing action `run` on resource 'execute[migrate database]'
Mixlib::ShellOut::ShellCommandFailed
Expected process to exit with [0], but received '1'
Begin output of /opt/gitlab/bin/gitlab-rake db:migrate
STDOUT:
STDERR: rake aborted!
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?