57

ubuntu 18.04安装gitlab失败

 1 year ago
source link: https://leejarod.wordpress.com/2019/09/29/ubuntu-18-04%e5%ae%89%e8%a3%85gitlab%e5%a4%b1%e8%b4%a5/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

ubuntu 18.04安装gitlab失败

安装后只是启动了2个服务:sudo gitlab-ctl status

run: gitaly: (pid 21988) 7s; run: log: (pid 19225) 1516s
run: redis: (pid 22004) 7s; run: log: (pid 18948) 1569s

正常的情况 下应该有更多服务的:sudo vim /etc/gitlab/gitlab.rb

[[email protected] ~]

# gitlab-ctl status
run: gitlab-workhorse: (pid 1171) 970778s; run: log: (pid 1163) 970778s
run: logrotate: (pid 26838) 2354s; run: log: (pid 1164) 970778s
run: nginx: (pid 1169) 970778s; run: log: (pid 1160) 970778s
run: postgresql: (pid 1181) 970778s; run: log: (pid 1162) 970778s
run: redis: (pid 1174) 970778s; run: log: (pid 1166) 970778s
run: sidekiq: (pid 3132) 718575s; run: log: (pid 1159) 970778s
run: unicorn: (pid 1180) 970778s; run: log: (pid 1161) 970778s

下面附上完整的错误记录,等解决办法。

[email protected]:~$ sudo gitlab-ctl status
run: gitaly: (pid 3008) 71s; run: log: (pid 3005) 71s
run: postgresql: (pid 3007) 71s; run: log: (pid 3004) 71s
run: redis: (pid 3009) 71s; run: log: (pid 3006) 71s
[email protected]:~$ sudo gitlab-ctl stop
ok: down: gitaly: 0s, normally up
ok: down: postgresql: 0s, normally up
ok: down: redis: 0s, normally up
[email protected]:~$ sudo gitlab-ctl status
down: gitaly: 9s, normally up; run: log: (pid 3005) 95s
down: postgresql: 9s, normally up; run: log: (pid 3004) 95s
down: redis: 8s, normally up; run: log: (pid 3006) 95s
[email protected]:~$ sudo gitlab-ctl reconfigure
Starting Chef Client, version 14.13.11
resolving cookbooks for run list: [“gitlab”]
Synchronizing Cookbooks:

  • gitlab (0.0.1)
  • package (0.1.0)
  • postgresql (0.1.0)
  • redis (0.1.0)
  • monitoring (0.1.0)
  • registry (0.1.0)
  • mattermost (0.1.0)
  • consul (0.1.0)
  • gitaly (0.1.0)
  • letsencrypt (0.1.0)
  • nginx (0.1.0)
  • runit (4.3.0)
  • acme (4.0.0)
  • crond (0.1.0)
    Installing Cookbook Gems:
    Compiling Cookbooks…
    Recipe: gitlab::default
  • directory[/etc/gitlab] action create (up to date)
    Converging 266 resources
  • directory[/etc/gitlab] action create (up to date)
  • directory[Create /var/opt/gitlab] action create (up to date)
  • directory[Create /var/log/gitlab] action create (up to date)
  • directory[/opt/gitlab/embedded/etc] action create (up to date)
  • template[/opt/gitlab/embedded/etc/gitconfig] action create (up to date)
    Recipe: gitlab::web-server
  • account[Webserver user and group] action create
    • group[Webserver user and group] action create (up to date)
    • linux_user[Webserver user and group] action create (up to date)
      (up to date)
      Recipe: gitlab::users
  • directory[/var/opt/gitlab] action create (up to date)
  • account[GitLab user and group] action create
    • group[GitLab user and group] action create (up to date)
    • linux_user[GitLab user and group] action create (up to date)
      (up to date)
  • template[/var/opt/gitlab/.gitconfig] action create (up to date)
  • directory[/var/opt/gitlab/.bundle] action create (up to date)
    Recipe: gitlab::gitlab-shell
  • storage_directory[/var/opt/gitlab/.ssh] action create
    • ruby_block[directory resource: /var/opt/gitlab/.ssh] action run (skipped due to not_if)
      (up to date)
  • directory[/var/log/gitlab/gitlab-shell/] action create (up to date)
  • directory[/var/opt/gitlab/gitlab-shell] action create (up to date)
  • templatesymlink[Create a config.yml and create a symlink to Rails root] action create
    • template[/var/opt/gitlab/gitlab-shell/config.yml] action create (up to date)
    • link[Link /opt/gitlab/embedded/service/gitlab-shell/config.yml to /var/opt/gitlab/gitlab-shell/config.yml] action create (up to date)
      (up to date)
  • link[/opt/gitlab/embedded/service/gitlab-shell/.gitlab_shell_secret] action create (up to date)
  • file[/var/opt/gitlab/.ssh/authorized_keys] action create_if_missing (up to date)
  • bash[Set proper security context on ssh files for selinux] action run (skipped due to only_if)
    Recipe: gitlab::gitlab-rails
  • storage_directory[/var/opt/gitlab/git-data] action create
    • ruby_block[directory resource: /var/opt/gitlab/git-data] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/var/opt/gitlab/git-data/repositories] action create
    • ruby_block[directory resource: /var/opt/gitlab/git-data/repositories] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/var/opt/gitlab/gitlab-rails/shared] action create
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/var/opt/gitlab/gitlab-rails/shared/artifacts] action create
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/artifacts] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/var/opt/gitlab/gitlab-rails/shared/external-diffs] action create
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/external-diffs] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/var/opt/gitlab/gitlab-rails/shared/lfs-objects] action create
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/lfs-objects] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/var/opt/gitlab/gitlab-rails/shared/packages] action create
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/packages] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/var/opt/gitlab/gitlab-rails/shared/dependency_proxy] action create
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/dependency_proxy] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/var/opt/gitlab/gitlab-rails/uploads] action create
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/uploads] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/var/opt/gitlab/gitlab-ci/builds] action create
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-ci/builds] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/var/opt/gitlab/gitlab-rails/shared/cache] action create
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/cache] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/var/opt/gitlab/gitlab-rails/shared/tmp] action create
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/tmp] action run (skipped due to not_if)
      (up to date)
  • storage_directory[/opt/gitlab/embedded/service/gitlab-rails/public] action create (skipped due to only_if)
  • storage_directory[/var/opt/gitlab/gitlab-rails/shared/pages] action create
    • ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/pages] action run (skipped due to not_if)
      (up to date)
  • directory[create /var/opt/gitlab/gitlab-rails/etc] action create (up to date)
  • directory[create /opt/gitlab/etc/gitlab-rails] action create (up to date)
  • directory[create /var/opt/gitlab/gitlab-rails/working] action create (up to date)
  • directory[create /var/opt/gitlab/gitlab-rails/tmp] action create (up to date)
  • directory[create /var/opt/gitlab/gitlab-rails/upgrade-status] action create (up to date)
  • directory[create /var/log/gitlab/gitlab-rails] action create (up to date)
  • storage_directory[/var/opt/gitlab/backups] action create
    • ruby_block[directory resource: /var/opt/gitlab/backups] action run (skipped due to not_if)
      (up to date)
  • directory[/var/opt/gitlab/gitlab-rails] action create (up to date)
  • directory[/var/opt/gitlab/gitlab-ci] action create (up to date)
  • file[/var/opt/gitlab/gitlab-rails/etc/gitlab-registry.key] action create (skipped due to only_if)
  • template[/opt/gitlab/etc/gitlab-rails/gitlab-rails-rc] action create (up to date)
  • file[/opt/gitlab/embedded/service/gitlab-rails/.secret] action delete (up to date)
  • file[/var/opt/gitlab/gitlab-rails/etc/secret] action delete (up to date)
  • templatesymlink[Create a database.yml and create a symlink to Rails root] action create
    • template[/var/opt/gitlab/gitlab-rails/etc/database.yml] action create (up to date)
    • link[Link /opt/gitlab/embedded/service/gitlab-rails/config/database.yml to /var/opt/gitlab/gitlab-rails/etc/database.yml] action create (up to date)
      (up to date)
  • templatesymlink[Create a secrets.yml and create a symlink to Rails root] action create
    • template[/var/opt/gitlab/gitlab-rails/etc/secrets.yml] action create (up to date)
    • link[Link /opt/gitlab/embedded/service/gitlab-rails/config/secrets.yml to /var/opt/gitlab/gitlab-rails/etc/secrets.yml] action create (up to date)
      (up to date)
  • templatesymlink[Create a resque.yml and create a symlink to Rails root] action create
    • template[/var/opt/gitlab/gitlab-rails/etc/resque.yml] action create (up to date)
    • link[Link /opt/gitlab/embedded/service/gitlab-rails/config/resque.yml to /var/opt/gitlab/gitlab-rails/etc/resque.yml] action create (up to date)
      (up to date)
  • templatesymlink[Create a redis.cache.yml and create a symlink to Rails root] action create (skipped due to not_if)
  • file[/opt/gitlab/embedded/service/gitlab-rails/config/redis.cache.yml] action delete (up to date)
  • file[/var/opt/gitlab/gitlab-rails/etc/redis.cache.yml] action delete (up to date)
  • templatesymlink[Create a redis.queues.yml and create a symlink to Rails root] action create (skipped due to not_if)
  • file[/opt/gitlab/embedded/service/gitlab-rails/config/redis.queues.yml] action delete (up to date)
  • file[/var/opt/gitlab/gitlab-rails/etc/redis.queues.yml] action delete (up to date)
  • templatesymlink[Create a redis.shared_state.yml and create a symlink to Rails root] action create (skipped due to not_if)
  • file[/opt/gitlab/embedded/service/gitlab-rails/config/redis.shared_state.yml] action delete (up to date)
  • file[/var/opt/gitlab/gitlab-rails/etc/redis.shared_state.yml] action delete (up to date)
  • templatesymlink[Create a smtp_settings.rb and create a symlink to Rails root] action delete
    • file[/var/opt/gitlab/gitlab-rails/etc/smtp_settings.rb] action delete (up to date)
    • link[/opt/gitlab/embedded/service/gitlab-rails/config/initializers/smtp_settings.rb] action delete (up to date)
      (up to date)
  • templatesymlink[Create a gitlab.yml and create a symlink to Rails root] action create
    • template[/var/opt/gitlab/gitlab-rails/etc/gitlab.yml] action create (up to date)
    • link[Link /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml to /var/opt/gitlab/gitlab-rails/etc/gitlab.yml] action create (up to date)
      (up to date)
  • templatesymlink[Create a rack_attack.rb and create a symlink to Rails root] action create
    • template[/var/opt/gitlab/gitlab-rails/etc/rack_attack.rb] action create (up to date)
    • link[Link /opt/gitlab/embedded/service/gitlab-rails/config/initializers/rack_attack.rb to /var/opt/gitlab/gitlab-rails/etc/rack_attack.rb] action create (up to date)
      (up to date)
  • templatesymlink[Create a gitlab_workhorse_secret and create a symlink to Rails root] action create
    • template[/var/opt/gitlab/gitlab-rails/etc/gitlab_workhorse_secret] action create (up to date)
    • link[Link /opt/gitlab/embedded/service/gitlab-rails/.gitlab_workhorse_secret to /var/opt/gitlab/gitlab-rails/etc/gitlab_workhorse_secret] action create (up to date)
      (up to date)
  • templatesymlink[Create a gitlab_shell_secret and create a symlink to Rails root] action create
    • template[/var/opt/gitlab/gitlab-rails/etc/gitlab_shell_secret] action create (up to date)
    • link[Link /opt/gitlab/embedded/service/gitlab-rails/.gitlab_shell_secret to /var/opt/gitlab/gitlab-rails/etc/gitlab_shell_secret] action create (up to date)
      (up to date)
  • templatesymlink[Create a gitlab_pages_secret and create a symlink to Rails root] action create (skipped due to only_if)
  • link[/opt/gitlab/embedded/service/gitlab-rails/config/initializers/relative_url.rb] action delete (up to date)
  • file[/var/opt/gitlab/gitlab-rails/etc/relative_url.rb] action delete (up to date)
  • env_dir[/opt/gitlab/etc/gitlab-rails/env] action create
    • directory[/opt/gitlab/etc/gitlab-rails/env] action create (up to date)
    • file[/opt/gitlab/etc/gitlab-rails/env/HOME] action create (up to date)
    • file[/opt/gitlab/etc/gitlab-rails/env/RAILS_ENV] action create (up to date)
    • file[/opt/gitlab/etc/gitlab-rails/env/LD_PRELOAD] action create (up to date)
    • file[/opt/gitlab/etc/gitlab-rails/env/SIDEKIQ_MEMORY_KILLER_MAX_RSS] action create (up to date)
    • file[/opt/gitlab/etc/gitlab-rails/env/BUNDLE_GEMFILE] action create (up to date)
    • file[/opt/gitlab/etc/gitlab-rails/env/PATH] action create (up to date)
    • file[/opt/gitlab/etc/gitlab-rails/env/ICU_DATA] action create (up to date)
    • file[/opt/gitlab/etc/gitlab-rails/env/PYTHONPATH] action create (up to date)
    • file[/opt/gitlab/etc/gitlab-rails/env/EXECJS_RUNTIME] action create (up to date)
    • file[/opt/gitlab/etc/gitlab-rails/env/TZ] action create (up to date)
      (up to date)
  • link[/opt/gitlab/embedded/service/gitlab-rails/tmp] action create (up to date)
  • link[/opt/gitlab/embedded/service/gitlab-rails/public/uploads] action create (up to date)
  • link[/opt/gitlab/embedded/service/gitlab-rails/log] action create (up to date)
  • link[/var/log/gitlab/gitlab-rails/sidekiq.log] action create (skipped due to not_if)
  • file[/opt/gitlab/embedded/service/gitlab-rails/db/schema.rb] action create (up to date)
  • remote_file[/var/opt/gitlab/gitlab-rails/VERSION] action create (up to date)
  • remote_file[/var/opt/gitlab/gitlab-rails/REVISION] action create (up to date)
  • file[/var/opt/gitlab/gitlab-rails/RUBY_VERSION] action create (up to date)
  • execute[clear the gitlab-rails cache] action nothing (skipped due to action :nothing)
  • file[/var/opt/gitlab/gitlab-rails/config.ru] action delete (up to date)
    Recipe: gitlab::add_trusted_certs
  • directory[/etc/gitlab/trusted-certs] action create (up to date)
  • directory[/opt/gitlab/embedded/ssl/certs] action create (up to date)
  • file[/opt/gitlab/embedded/ssl/certs/README] action create (up to date)
  • ruby_block[Move existing certs and link to /opt/gitlab/embedded/ssl/certs] action run (skipped due to only_if)
    Recipe: gitlab::default
  • service[create a temporary unicorn service] action nothing (skipped due to action :nothing)
  • service[create a temporary puma service] action nothing (skipped due to action :nothing)
  • service[create a temporary sidekiq service] action nothing (skipped due to action :nothing)
  • service[create a temporary mailroom service] action nothing (skipped due to action :nothing)
    Recipe: package::runit_systemd
  • directory[/usr/lib/systemd/system] action create (up to date)
  • cookbook_file[/usr/lib/systemd/system/gitlab-runsvdir.service] action create (up to date)
  • file[/etc/systemd/system/default.target.wants/gitlab-runsvdir.service] action delete (up to date)
  • file[/etc/systemd/system/basic.target.wants/gitlab-runsvdir.service] action delete (up to date)
  • execute[systemctl daemon-reload] action nothing (skipped due to action :nothing)
  • execute[systemctl enable gitlab-runsvdir] action nothing (skipped due to action :nothing)
  • execute[systemctl start gitlab-runsvdir] action nothing (skipped due to action :nothing)
    Recipe: postgresql::bin
  • ruby_block[check_postgresql_version] action run (skipped due to not_if)
  • ruby_block[Link postgresql bin files to the correct version] action run (skipped due to only_if)
    Recipe: redis::enable
  • account[user and group for redis] action create
    • group[user and group for redis] action create (up to date)
    • linux_user[user and group for redis] action create (up to date)
      (up to date)
  • group[Socket group] action create (up to date)
  • directory[/var/opt/gitlab/redis] action create (up to date)
  • directory[/var/log/gitlab/redis] action create (up to date)
  • template[/var/opt/gitlab/redis/redis.conf] action create (up to date)
    Recipe:
  • service[redis] action nothing (skipped due to action :nothing)
    Recipe: redis::enable
  • runit_service[redis] action enable
    • ruby_block[restart_service] action nothing (skipped due to action :nothing)
    • ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    • ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    • directory[/opt/gitlab/sv/redis] action create (up to date)
    • template[/opt/gitlab/sv/redis/run] action create (up to date)
    • directory[/opt/gitlab/sv/redis/log] action create (up to date)
    • directory[/opt/gitlab/sv/redis/log/main] action create (up to date)
    • template[/opt/gitlab/sv/redis/log/run] action create (up to date)
    • template[/var/log/gitlab/redis/config] action create (up to date)
    • ruby_block[verify_chown_persisted_on_redis] action nothing (skipped due to action :nothing)
    • directory[/opt/gitlab/sv/redis/env] action create (up to date)
    • ruby_block[Delete unmanaged env files for redis service] action run (skipped due to only_if)
    • template[/opt/gitlab/sv/redis/check] action create (skipped due to only_if)
    • template[/opt/gitlab/sv/redis/finish] action create (skipped due to only_if)
    • directory[/opt/gitlab/sv/redis/control] action create (up to date)
    • link[/opt/gitlab/init/redis] action create (up to date)
    • file[/opt/gitlab/sv/redis/down] action delete (up to date)
    • directory[/opt/gitlab/service] action create (up to date)
    • link[/opt/gitlab/service/redis] action create (up to date)
    • ruby_block[wait for redis service socket] action run (skipped due to not_if)
      (up to date)
      Recipe: gitaly::enable
  • directory[/var/opt/gitlab/gitaly] action create (up to date)
  • directory[/var/log/gitlab/gitaly] action create (up to date)
  • env_dir[/opt/gitlab/etc/gitaly/env] action create
    • directory[/opt/gitlab/etc/gitaly/env] action create (up to date)
    • file[/opt/gitlab/etc/gitaly/env/HOME] action create (up to date)
    • file[/opt/gitlab/etc/gitaly/env/PATH] action create (up to date)
    • file[/opt/gitlab/etc/gitaly/env/TZ] action create (up to date)
    • file[/opt/gitlab/etc/gitaly/env/PYTHONPATH] action create (up to date)
    • file[/opt/gitlab/etc/gitaly/env/ICU_DATA] action create (up to date)
    • file[/opt/gitlab/etc/gitaly/env/SSL_CERT_DIR] action create (up to date)
    • file[/opt/gitlab/etc/gitaly/env/GITALY_PID_FILE] action create (up to date)
    • file[/opt/gitlab/etc/gitaly/env/WRAPPER_JSON_LOGGING] action create (up to date)
      (up to date)
  • template[Create Gitaly config.toml] action create (up to date)
    Recipe:
  • service[gitaly] action nothing (skipped due to action :nothing)
    Recipe: gitaly::enable
  • runit_service[gitaly] action enable
    • ruby_block[restart_service] action nothing (skipped due to action :nothing)
    • ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    • ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    • directory[/opt/gitlab/sv/gitaly] action create (up to date)
    • template[/opt/gitlab/sv/gitaly/run] action create (up to date)
    • directory[/opt/gitlab/sv/gitaly/log] action create (up to date)
    • directory[/opt/gitlab/sv/gitaly/log/main] action create (up to date)
    • template[/opt/gitlab/sv/gitaly/log/run] action create (up to date)
    • template[/var/log/gitlab/gitaly/config] action create (up to date)
    • ruby_block[verify_chown_persisted_on_gitaly] action nothing (skipped due to action :nothing)
    • directory[/opt/gitlab/sv/gitaly/env] action create (up to date)
    • ruby_block[Delete unmanaged env files for gitaly service] action run (skipped due to only_if)
    • template[/opt/gitlab/sv/gitaly/check] action create (skipped due to only_if)
    • template[/opt/gitlab/sv/gitaly/finish] action create (skipped due to only_if)
    • directory[/opt/gitlab/sv/gitaly/control] action create (up to date)
    • link[/opt/gitlab/init/gitaly] action create (up to date)
    • file[/opt/gitlab/sv/gitaly/down] action delete (up to date)
    • directory[/opt/gitlab/service] action create (up to date)
    • link[/opt/gitlab/service/gitaly] action create (up to date)
    • ruby_block[wait for gitaly service socket] action run (skipped due to not_if)
      (up to date)
  • file[/var/opt/gitlab/gitaly/VERSION] action create (up to date)
  • consul_service[gitaly] action delete
    • file[/var/opt/gitlab/consul/config.d/gitaly-service.json] action delete (up to date)
      (up to date)
      Recipe: postgresql::user
  • account[Postgresql user and group] action create
    • group[Postgresql user and group] action create (up to date)
    • linux_user[Postgresql user and group] action create (up to date)
      (up to date)
      Recipe: postgresql::enable
  • directory[/var/opt/gitlab/postgresql] action create (up to date)
  • directory[/var/opt/gitlab/postgresql/data] action create (up to date)
  • directory[/var/log/gitlab/postgresql] action create (up to date)
  • link[/var/opt/gitlab/postgresql/data] action create (skipped due to not_if)
  • file[/var/opt/gitlab/postgresql/.profile] action create (up to date)
  • gitlab_sysctl[kernel.shmmax] action create
    • directory[create /etc/sysctl.d for kernel.shmmax] action create (up to date)
    • file[create /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.shmmax.conf kernel.shmmax] action create (up to date)
    • link[/etc/sysctl.d/90-omnibus-gitlab-kernel.shmmax.conf] action create (up to date)
    • execute[load sysctl conf kernel.shmmax] action nothing (skipped due to action :nothing)
      (up to date)
  • gitlab_sysctl[kernel.shmall] action create
    • directory[create /etc/sysctl.d for kernel.shmall] action create (up to date)
    • file[create /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.shmall.conf kernel.shmall] action create (up to date)
    • link[/etc/sysctl.d/90-omnibus-gitlab-kernel.shmall.conf] action create (up to date)
    • execute[load sysctl conf kernel.shmall] action nothing (skipped due to action :nothing)
      (up to date)
  • gitlab_sysctl[kernel.sem] action create
    • directory[create /etc/sysctl.d for kernel.sem] action create (up to date)
    • file[create /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.sem.conf kernel.sem] action create (up to date)
    • link[/etc/sysctl.d/90-omnibus-gitlab-kernel.sem.conf] action create (up to date)
    • execute[load sysctl conf kernel.sem] action nothing (skipped due to action :nothing)
      (up to date)
  • execute[/opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8] action run (skipped due to not_if)
  • file[/var/opt/gitlab/postgresql/data/server.crt] action create (up to date)
  • file[/var/opt/gitlab/postgresql/data/server.key] action create (up to date)
  • template[/var/opt/gitlab/postgresql/data/postgresql.conf] action create (up to date)
  • template[/var/opt/gitlab/postgresql/data/runtime.conf] action create (up to date)
  • template[/var/opt/gitlab/postgresql/data/pg_hba.conf] action create (up to date)
  • template[/var/opt/gitlab/postgresql/data/pg_ident.conf] action create (up to date)
    Recipe:
  • service[postgresql] action nothing (skipped due to action :nothing)
    Recipe: postgresql::enable
  • runit_service[postgresql] action enable
    • ruby_block[restart_service] action nothing (skipped due to action :nothing)
    • ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    • ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    • directory[/opt/gitlab/sv/postgresql] action create (up to date)
    • template[/opt/gitlab/sv/postgresql/run] action create (up to date)
    • directory[/opt/gitlab/sv/postgresql/log] action create (up to date)
    • directory[/opt/gitlab/sv/postgresql/log/main] action create (up to date)
    • template[/opt/gitlab/sv/postgresql/log/run] action create (up to date)
    • template[/var/log/gitlab/postgresql/config] action create (up to date)
    • ruby_block[verify_chown_persisted_on_postgresql] action nothing (skipped due to action :nothing)
    • directory[/opt/gitlab/sv/postgresql/env] action create (up to date)
    • ruby_block[Delete unmanaged env files for postgresql service] action run (skipped due to only_if)
    • template[/opt/gitlab/sv/postgresql/check] action create (skipped due to only_if)
    • template[/opt/gitlab/sv/postgresql/finish] action create (skipped due to only_if)
    • directory[/opt/gitlab/sv/postgresql/control] action create (up to date)
    • template[/opt/gitlab/sv/postgresql/control/t] action create (up to date)
    • link[/opt/gitlab/init/postgresql] action create (up to date)
    • file[/opt/gitlab/sv/postgresql/down] action delete (up to date)
    • directory[/opt/gitlab/service] action create (up to date)
    • link[/opt/gitlab/service/postgresql] action create (up to date)
    • ruby_block[wait for postgresql service socket] action run (skipped due to not_if)
    • directory[/opt/gitlab/service/postgresql/supervise] action create (up to date)
    • directory[/opt/gitlab/service/postgresql/log/supervise] action create (up to date)
    • file[/opt/gitlab/sv/postgresql/supervise/ok] action touch (skipped due to only_if)
    • file[/opt/gitlab/sv/postgresql/log/supervise/ok] action touch (skipped due to only_if)
    • file[/opt/gitlab/sv/postgresql/supervise/status] action touch
    • change owner from ‘root’ to ‘gitlab-psql’
    • change group from ‘root’ to ‘gitlab-psql’
    • update utime on file /opt/gitlab/sv/postgresql/supervise/status
    • file[/opt/gitlab/sv/postgresql/log/supervise/status] action touch
    • change owner from ‘root’ to ‘gitlab-psql’
    • change group from ‘root’ to ‘gitlab-psql’
    • update utime on file /opt/gitlab/sv/postgresql/log/supervise/status
    • file[/opt/gitlab/sv/postgresql/supervise/control] action touch (skipped due to only_if)
    • file[/opt/gitlab/sv/postgresql/log/supervise/control] action touch (skipped due to only_if)
  • template[/opt/gitlab/etc/gitlab-psql-rc] action create (up to date)
  • postgresql_user[gitlab] action create
    • execute[create gitlab postgresql user] action run (skipped due to not_if)
      (up to date)
  • execute[create gitlabhq_production database] action run (skipped due to not_if)
  • postgresql_user[gitlab_replicator] action create
    • execute[create gitlab_replicator postgresql user] action run (skipped due to not_if)
    • execute[set options for gitlab_replicator postgresql user] action run (skipped due to not_if)
      (up to date)
  • postgresql_extension[pg_trgm] action enable
    • postgresql_query[enable pg_trgm extension] action run (skipped due to only_if)
      (up to date)
  • ruby_block[warn pending postgresql restart] action run (skipped due to only_if)
  • execute[reload postgresql] action nothing (skipped due to action :nothing)
  • execute[start postgresql] action nothing (skipped due to action :nothing)
    Recipe: gitlab::database_migrations
  • bash[migrate gitlab-rails database] action run

[execute]

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/lib/tasks/gitlab/db.rake:48:in block (3 levels) in <top (required)>' /opt/gitlab/embedded/bin/bundle:23:inload’
/opt/gitlab/embedded/bin/bundle:23:in `’
Tasks: TOP => gitlab:db:configure
(See full trace by running task with –trace)

================================================================================

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-script20190929-4320-1nxfn5f” —-
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/lib/tasks/gitlab/db.rake:48:in block (3 levels) in <top (required)>' /opt/gitlab/embedded/bin/bundle:23:inload’
/opt/gitlab/embedded/bin/bundle:23:in `’
Tasks: TOP => gitlab:db:configure
(See full trace by running task with –trace)
STDERR:
—- End output of “bash” “/tmp/chef-script20190929-4320-1nxfn5f” —-
Ran “bash” “/tmp/chef-script20190929-4320-1nxfn5f” returned 1

Resource Declaration:

In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/database_migrations.rb

54: bash “migrate gitlab-rails database” do
55: code <<-EOH 56: set -e 57: log_file=”#{node[‘gitlab’][‘gitlab-rails’][‘log_directory’]}/gitlab-rails-db-migrate-$(date +%Y-%m-%d-%H-%M-%S).log” 58: umask 077 59: /opt/gitlab/bin/gitlab-rake gitlab:db:configure 2>& 1 | tee ${log_file}
60: STATUS=${PIPESTATUS[0]}
61: chown #{account_helper.gitlab_user}:#{account_helper.gitlab_group} ${log_file}
62: echo $STATUS > #{db_migrate_status_file}
63: exit $STATUS
64: EOH
65: environment env_variables unless env_variables.empty?
66: notifies :run, “execute[clear the gitlab-rails cache]”, :immediately
67: dependent_services.each do |svc|
68: notifies :restart, svc, :immediately
69: end
70: not_if “(test -f #{db_migrate_status_file}) && (cat #{db_migrate_status_file} | grep -Fx 0)”
71: only_if { node[‘gitlab’][‘gitlab-rails’][‘auto_migrate’] }
72: end
73:

Compiled Resource:

Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/database_migrations.rb:54:in `from_file’

bash(“migrate gitlab-rails database”) do
action [:run]
default_guard_interpreter :default
command nil
backup 5
interpreter “bash”
declared_type :bash
cookbook_name “gitlab”
recipe_name “database_migrations”
code ” set -e\n log_file=\”/var/log/gitlab/gitlab-rails/gitlab-rails-db-migrate-$(date +%Y-%m-%d-%H-%M-%S).log\”\n umask 077\n /opt/gitlab/bin/gitlab-rake gitlab:db:configure 2>& 1 | tee ${log_file}\n STATUS=${PIPESTATUS[0]}\n chown git:git ${log_file}\n echo $STATUS > /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-3440d0f6100\n exit $STATUS\n”
domain nil
user nil
not_if “(test -f /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-3440d0f6100) && (cat /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-3440d0f6100 | grep -Fx 0)”
only_if { #code block }
end

System Info:

chef_version=14.13.11
platform=ubuntu
platform_version=18.04
ruby=ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client

Running handlers:
There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 54) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
—- Begin output of “bash” “/tmp/chef-script20190929-4320-1nxfn5f” —-
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/lib/tasks/gitlab/db.rake:48:in block (3 levels) in <top (required)>' /opt/gitlab/embedded/bin/bundle:23:inload’
/opt/gitlab/embedded/bin/bundle:23:in `’
Tasks: TOP => gitlab:db:configure
(See full trace by running task with –trace)
STDERR:
—- End output of “bash” “/tmp/chef-script20190929-4320-1nxfn5f” —-
Ran “bash” “/tmp/chef-script20190929-4320-1nxfn5f” returned 1

Running handlers complete
Chef Client failed. 3 resources updated in 02 minutes 03 seconds

举报此广告

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK