本文介绍了升级到Ubuntu 18.04后Gitlab无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Ubuntu 16.04上成功将Gitlab升级到12.1.6,并检查了所有的工作.确保Ubuntu完全更新后,我再次检查:Gitlab工作.然后,我使用 do-release-upgrade 命令更新到Ubuntu 18.04.重新启动后,一切似乎都可以正常运行,但是Gitlab拒绝启动.

I have successfully upgraded Gitlab to 12.1.6 on Ubuntu 16.04 and checked that all was working. After making sure Ubuntu was fully up to date I checked again: Gitlab worked.I then used the do-release-upgrade command to update to Ubuntu 18.04. After restart, everything seems to work ok, but Gitlab refuses to start.

我收到以下错误:

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

我成功安装了runit,重新启动了机器,但错误仍然存​​在

I installed runit with success, rebooted the machine but the errors remain

我在这里发现了类似的问题:在Stackoverflow上 ,然后指令(yum-> apt),仍然没有成功

I found a similar issue here: on Stackoverflow, followed the instructions (yum --> apt), still no success

和此处在Gitlab上.建议运行

sudo systemctl restart gitlab-runsvdir
sudo gitlab-ctl restart

但是第一个命令永远不会结束

But the first command never finishes

我发现了这一点:在Gitlab上 指出要运行

I found this: on Gitlab which states to run

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服务器未运行.我不知道如何启动它.有什么想法吗?

which suggests that the Postgresql server is not running. I have no idea how to start it. Any ideas?

推荐答案

我遇到了类似的runsv错误,但只看到一次服务,而不是整个列表.这些步骤是我尝试使其工作的日志-可能不是直线,但是我本地的Gitlab现在可以工作了:

I ran into a similar runsv error, but only saw it for once service, not the whole list you have. These steps are a log of my attempts to get it working - probably not a direct line, but my local Gitlab does work now:

在CentOS虚拟机中:

In the CentOS vm:

  • vi/etc/gitlab/gitlab.rb

  • vi /etc/gitlab/gitlab.rb

sudo gitlab-ctl重新配置

sudo gitlab-ctl reconfigure

  • 首先观察到错误runsv未运行

yum更新-y

sudo gitlab-ctl状态

sudo gitlab-ctl status

sudo gitlab-ctl重新启动

sudo gitlab-ctl restart

sudo gitlab-ctl重新配置

sudo gitlab-ctl reconfigure

systemctl启动gitlab-runsvdir.service

systemctl start gitlab-runsvdir.service

systemctl状态gitlab-runsvdir.service

systemctl status gitlab-runsvdir.service

sudo gitlab-ctl重新配置

sudo gitlab-ctl reconfigure

  • 仍然多次看到关于runsv不在运行的错误,但它从来没有成为阻止程序,并且重新配置成功

在主机上

  • 导航到192.168.1.131

  • navigate to 192.168.1.131

请参阅提示输入root密码

See the prompt for root password

关于Postgres的问题,我不确定

As for the issue with Postgres, I'm not sure

这篇关于升级到Ubuntu 18.04后Gitlab无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 04:58