升级到 Ubuntu 18.04 后 Gitlab 未启动
Gitlab not starting after upgrade to Ubuntu 18.04
我已在 Ubuntu 16.04 上成功将 Gitlab 升级到 12.1.6,并检查一切正常。在确保 Ubuntu 完全最新后,我再次检查:Gitlab worked。
然后我使用 do-release-upgrade
命令更新到 Ubuntu 18.04。重启后,一切正常,但是Gitlab拒绝启动。
我收到以下错误:
fail: alertmanager: runsv not running
fail: gitaly: runsv not running
fail: gitlab-exporter: runsv not running
fail: gitlab-workhorse: runsv not running
fail: grafana: runsv not running
fail: logrotate: runsv not running
fail: nginx: runsv not running
fail: node-exporter: runsv not running
fail: postgres-exporter: runsv not running
fail: postgresql: runsv not running
fail: prometheus: runsv not running
fail: redis: runsv not running
fail: redis-exporter: runsv not running
fail: sidekiq: runsv not running
fail: unicorn: runsv not running
我试过:
gitlab-ctl reconfigure --> runs with success
我安装运行它成功,重新启动机器但错误仍然存在
我在这里发现了一个类似的问题:,按照说明操作(yum --> apt),仍然没有成功
和这里 on Gitlab。这建议运行
sudo systemctl restart gitlab-runsvdir
sudo gitlab-ctl restart
但是第一个命令永远不会完成
我发现了这个:on Gitlab 表示 运行
sudo gitlab-rake gitlab:env:info --trace
输出:
** Invoke gitlab:env:info (first_time)
** Invoke gitlab_environment (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab_environment
** Execute gitlab:env:info
System information
System: Ubuntu 18.04
Current User: git
Using RVM: no
Ruby Version: 2.6.3p62
Gem Version: 2.7.9
Bundler Version:1.17.3
Rake Version: 12.3.3
Redis Version: 3.2.12
Git Version: 2.24.1
Sidekiq Version:5.2.7
Go Version: unknown
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/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `initialize'
/opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `new'
/opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `connect'
这表明 Postgresql 服务器不是 运行ning。我不知道如何开始。有什么想法吗?
我 运行 遇到了类似的 runsv 错误,但只看到一次服务,而不是您拥有的整个列表。这些步骤是我尝试让它工作的日志 - 可能不是直线,但我的本地 Gitlab 现在可以工作了:
在 CentOS 虚拟机中:
vi /etc/gitlab/gitlab.rb
-
- 将 external_url 从 http://example.gitlab.com to http://192.168.1.131
更改为
sudo gitlab-ctl 重新配置
-
- 首先观察到错误运行不是运行
yum update -y
sudo gitlab-ctl status
sudo gitlab-ctl restart
sudo gitlab-ctl 重新配置
systemctl 启动gitlab-runsvdir.service
systemctl状态gitlab-runsvdir.service
sudo gitlab-ctl 重新配置
-
- 仍然多次看到有关 runsv not 运行 的错误,但它从来都不是阻塞,重新配置成功
在主机上
导航到 192.168.1.131
查看root密码提示
至于 Postgres 的问题,我不确定
遇到了同样的问题,我手动结束了运行 /opt/gitlab/embedded/bin/runsvdir-start
。我解决了我的问题,启动了重新配置,然后它就开始工作了。
我想 post 上面的问题。对我来说,当我每月对我们的 GitLab 进行 upgrade/updates 时,它就会发生。我以前尝试过你的解决方案,但对我来说他们没有解决问题。
我提出了我的解决方案,但请谨慎使用这些提示,因为有时我仍然会以不同的方式解决这个问题。
我组合了这些命令,这些步骤的顺序非常重要(!):
- sudo systemctl disable gitlab-runsvdir.service
- sudo gitlab-ctl 重新配置
- sudo gitlab-rake db:migrate
- sudo gitlab-ctl 重新启动 gitlab-runsvdir-- 必须中止 Ctrl-C
- sudo /opt/gitlab/embedded/bin/runsvdir-start--必须中止 Ctrl-C
参考:
本期Stan Hu的回答对我有帮助:
https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/3744
昨天我搞砸了,没有做第一步,这可能会导致我的问题,因为不知何故,postgresql 服务器停机了 10 个小时,无法恢复再次.
如果我坚持这个顺序,也许它不会发生,因为它在过去没有发生,而我 upgraded/updated GitLab 几次。
This was the connection error yesterday, same issue as questioner's
Automatic restart this morning
今天早上 7:13 上午的服务器神奇地再次接受连接。 (虽然我昨天尝试重新启动它,但它没有任何区别)
截至 7:30 am,仍然无法通过 Web 浏览器在线访问 GitLab。
一小时后,在运行了一些 vdir restarting/starting 命令(将其添加到命令顺序中)之后,GitLab 开始工作了。我不知道为什么。
更新: 从那时起,我找到了一个答案,由于某种原因,在 reboot 命令中,runsv 进程卡住了。要解决此问题,您必须:
- sudo 服务gitlab-runsvdir启动
- sudo gitlab-ctl 重新配置
- sudo gitlab-ctl 重启
我已在 Ubuntu 16.04 上成功将 Gitlab 升级到 12.1.6,并检查一切正常。在确保 Ubuntu 完全最新后,我再次检查:Gitlab worked。
然后我使用 do-release-upgrade
命令更新到 Ubuntu 18.04。重启后,一切正常,但是Gitlab拒绝启动。
我收到以下错误:
fail: alertmanager: runsv not running
fail: gitaly: runsv not running
fail: gitlab-exporter: runsv not running
fail: gitlab-workhorse: runsv not running
fail: grafana: runsv not running
fail: logrotate: runsv not running
fail: nginx: runsv not running
fail: node-exporter: runsv not running
fail: postgres-exporter: runsv not running
fail: postgresql: runsv not running
fail: prometheus: runsv not running
fail: redis: runsv not running
fail: redis-exporter: runsv not running
fail: sidekiq: runsv not running
fail: unicorn: runsv not running
我试过:
gitlab-ctl reconfigure --> runs with success
我安装运行它成功,重新启动机器但错误仍然存在
我在这里发现了一个类似的问题:
和这里 on Gitlab。这建议运行
sudo systemctl restart gitlab-runsvdir
sudo gitlab-ctl restart
但是第一个命令永远不会完成
我发现了这个:on Gitlab 表示 运行
sudo gitlab-rake gitlab:env:info --trace
输出:
** Invoke gitlab:env:info (first_time)
** Invoke gitlab_environment (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab_environment
** Execute gitlab:env:info
System information
System: Ubuntu 18.04
Current User: git
Using RVM: no
Ruby Version: 2.6.3p62
Gem Version: 2.7.9
Bundler Version:1.17.3
Rake Version: 12.3.3
Redis Version: 3.2.12
Git Version: 2.24.1
Sidekiq Version:5.2.7
Go Version: unknown
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/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `initialize'
/opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `new'
/opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `connect'
这表明 Postgresql 服务器不是 运行ning。我不知道如何开始。有什么想法吗?
我 运行 遇到了类似的 runsv 错误,但只看到一次服务,而不是您拥有的整个列表。这些步骤是我尝试让它工作的日志 - 可能不是直线,但我的本地 Gitlab 现在可以工作了:
在 CentOS 虚拟机中:
vi /etc/gitlab/gitlab.rb
-
- 将 external_url 从 http://example.gitlab.com to http://192.168.1.131 更改为
sudo gitlab-ctl 重新配置
-
- 首先观察到错误运行不是运行
yum update -y
sudo gitlab-ctl status
sudo gitlab-ctl restart
sudo gitlab-ctl 重新配置
systemctl 启动gitlab-runsvdir.service
systemctl状态gitlab-runsvdir.service
sudo gitlab-ctl 重新配置
-
- 仍然多次看到有关 runsv not 运行 的错误,但它从来都不是阻塞,重新配置成功
在主机上
导航到 192.168.1.131
查看root密码提示
至于 Postgres 的问题,我不确定
遇到了同样的问题,我手动结束了运行 /opt/gitlab/embedded/bin/runsvdir-start
。我解决了我的问题,启动了重新配置,然后它就开始工作了。
我想 post 上面的问题。对我来说,当我每月对我们的 GitLab 进行 upgrade/updates 时,它就会发生。我以前尝试过你的解决方案,但对我来说他们没有解决问题。
我提出了我的解决方案,但请谨慎使用这些提示,因为有时我仍然会以不同的方式解决这个问题。
我组合了这些命令,这些步骤的顺序非常重要(!):
- sudo systemctl disable gitlab-runsvdir.service
- sudo gitlab-ctl 重新配置
- sudo gitlab-rake db:migrate
- sudo gitlab-ctl 重新启动 gitlab-runsvdir-- 必须中止 Ctrl-C
- sudo /opt/gitlab/embedded/bin/runsvdir-start--必须中止 Ctrl-C
参考: 本期Stan Hu的回答对我有帮助: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/3744
昨天我搞砸了,没有做第一步,这可能会导致我的问题,因为不知何故,postgresql 服务器停机了 10 个小时,无法恢复再次.
如果我坚持这个顺序,也许它不会发生,因为它在过去没有发生,而我 upgraded/updated GitLab 几次。
This was the connection error yesterday, same issue as questioner's
Automatic restart this morning
今天早上 7:13 上午的服务器神奇地再次接受连接。 (虽然我昨天尝试重新启动它,但它没有任何区别) 截至 7:30 am,仍然无法通过 Web 浏览器在线访问 GitLab。 一小时后,在运行了一些 vdir restarting/starting 命令(将其添加到命令顺序中)之后,GitLab 开始工作了。我不知道为什么。
更新: 从那时起,我找到了一个答案,由于某种原因,在 reboot 命令中,runsv 进程卡住了。要解决此问题,您必须:
- sudo 服务gitlab-runsvdir启动
- sudo gitlab-ctl 重新配置
- sudo gitlab-ctl 重启